Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix masking assembly load failure error message #382

Merged
merged 1 commit into from
Mar 20, 2018

Conversation

smadala
Copy link
Contributor

@smadala smadala commented Mar 19, 2018

  • Show the right error message on assembly load failures.
  • Remove SILVERLIGHT specific code.

Before fix

[MSTest][Discovery][D:\g\samples\Test Explorer fails to show tests\ClassLibrary.Tests\bin\Debug\ClassLibrary.Tests.dll] Failed to discover tests from assembly D:\g\samples\Test Explorer fails to show tests\ClassLibrary.Tests\bin\Debug\ClassLibrary.Tests.dll. Reason:The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
No test is available in D:\g\samples\Test Explorer fails to show tests\ClassLibrary.Tests\bin\Debug\ClassLibrary.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

Additionally, path to test adapters can be specified using /TestAdapterPath command. Example  /TestAdapterPath:<pathToCustomAdapters>.

After fix (Displays assembly name in warning.)

[MSTest][Discovery][D:\g\samples\Test Explorer fails to show tests\ClassLibrary.Tests\bin\Debug\ClassLibrary.Tests.dll] Failed to discover tests from assembly D:\g\samples\Test Explorer fails to show tests\ClassLibrary.Tests\bin\Debug\ClassLibrary.Tests.dll. Reason:Could not load file or assembly 'System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
No test is available in D:\g\samples\Test Explorer fails to show tests\ClassLibrary.Tests\bin\Debug\ClassLibrary.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

Additionally, path to test adapters can be specified using /TestAdapterPath command. Example  /TestAdapterPath:<pathToCustomAdapters>.

#241 (comment)

@smadala smadala merged commit 804ea28 into microsoft:master Mar 20, 2018
mayankbansal018 added a commit that referenced this pull request Apr 3, 2018
* Fixing Key collision for test run parameters (#328)

* Base commit

* Adding Unit Test

* PR comments

* Adding logs for diagnostics

* Ignoring Test Temporarily

* Removing ignore

# Conflicts:
#	test/UnitTests/MSTest.CoreAdapter.Unit.Tests/Execution/TestExecutionManagerTests.cs

* Fixing the copyright in the nuspec files. (#350)

* Today even if classInit wasnt called we used to call class cleanup. f… (#372)

* Today even if classInit wasnt called we used to call class cleanup. fixing that and adding a test to cover the scenario
# Conflicts:
#	src/Adapter/MSTest.CoreAdapter/Execution/TestClassInfo.cs

* [Symbol archiving]Converting Portable pdb to full (#375)

* COnverting portable pdbs to full for Symbol archiving

* Fixing nuget package path

* Test fix

* Indent fix

* Update Fileversion for adapter and framework dlls (#337)

* File version update

* Moving to 15.6

* PR comments

* More PR comments

* Throwing exception only if it is of type TestPlatformFormatException (#332)

* Throwing exception only if it is of type TestPlatformFormatException

* test

* Fail discovery if any exception thrown in IDiscoveryContext.GetTestCaseFilter

* Fix masking assembly load faolure error message (#382)


# Conflicts:
#	src/Adapter/MSTest.CoreAdapter/Discovery/AssemblyEnumeratorWrapper.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants