TFS does not deploy reference assembly to test dir on assembly server

I have a Coded-UI test project that has links to other assemblies in the solution. Somehow, some assemblies are not copied to the directory TestResults/Out, while others are copied. All assemblies have an option Copy Local true(I don’t know if this really matters) and are absolutely equal in other versions. All assemblies are copied the first time the test is run from VS2010, but not on the build server.

If I use the attribute [DeploymentItem]to force the deployment of these "naughty" assemblies, they are successfully deployed.

I can’t figure it out. I always thought that if you reference the assembly (in the section References Solution Explorer), the assembly will be copied to TestResults/Outand [DeploymentItem]in order to copy some. xml and other configuration files.

+5
source share
1 answer

I have seen this before. Your test project refers to other projects, but when you run the tests, you will notice that the assemblies are not present in the TestRun Out folder.

Unlike other test runners who run unit tests from a fixed location, MSTest copies the builds it needs to the test run folder where the tests are run. The design allows you to compare test results, coverage, yields between test runs.

, , " ", - , , . MSTest , , .

, , , , . , IL (DotPeek, Reflector ..), . ( WPF, XAML.)

, DeploymentSettings ; . , IL, :

var type = typeof(AssemblyNotBeingCopied.MyClass);
+12

All Articles