开发者

Teamcity not DLL's for some NUnit Test projects

开发者 https://www.devze.com 2023-01-15 11:26 出处:网络
I get开发者_StackOverflow this error when running my Moq tests through Teamcity 5 Test(s) failed. System.IO.FileNotFoundException :

I get开发者_StackOverflow this error when running my Moq tests through Teamcity 5

Test(s) failed. System.IO.FileNotFoundException : Could not load file or assembly 'Moq, Version=3.1.416.3, Culture=neutral, PublicKeyToken=69f491c39445e920' or one of its dependencies. The system cannot find the file specified. at MyCode.Tests.SomeHandlerTests.Setup()

The tests run fine on my local; they just fail on the build server.

I made sure the assemblies are in the Bin (looking at them now over RDP just be double sure).


So the issue was to do with the Test DLL search path under the nunit settings

It was:

..\Tests\**\*Test*.dll

But is now:

..\Tests\*\bin\Debug\*Test*.dll

And things work nicely

UPDATE

http://confluence.jetbrains.com/display/TCD8/NUnit

You can use this pattern

**\*.dll

as long as you add this pattern in the "Do not run tests from" field

**\obj\**\*.dll


I had a similar issue, but found that I had different version's of Moq between my 2 Test projects.

The issue that I had was that the correct version was not available.

Just do

Update-Package Moq

From the Package Manager command line

0

精彩评论

暂无评论...
验证码 换一张
取 消