質問

I have a unit test project that uses Visual Studio Fakes. The unit test builds and runs fine on my machine but on build machine, it isn't able to find the dynamically generated fake assembly. I get an error such as

The type or namespace name 'Fakes' does not exist in the namespace 'MyOriginalClass' (are you missing an assembly reference?)

When i go to the build machine and check the assembly file, it is there, and building the project locally using msbuild.exe works, so i am really confused. There are other unit tests in the solution that use fakes without a problem, so i am not sure why ti is failing. The gate is using Visual Studio Test Runner and msbuild.exe in 12.0 folder.

役に立ちましたか?

解決

I was having a similar issue, that was solved by using the 12.0 version of msbuild.exe, which you already are doing, and running the tests with Vstest.exe instead of mstest.exe.

http://msdn.microsoft.com/en-us/library/jj155796.aspx

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top