I have a very strange problem with me during unit testing (MSTest in Visual Studio-.NET 3.5 SP1):
- I click "Run all tests in solution"
- All tests pass, with the exception of one specific class, where each test throws the following exception: "System.IO.FileLoadException: loading this assembly will create another set of grants from other instances. (Exception from HRESULT: 0x80131401)."
- Then I go over and set a breakpoint in the class. Result: all tests in the class pass (the same tests that have not been performed before).
- I click "Run All Tests in solution". All tests pass, with the exception of another class.
- I set a breakpoint in the class. Result: all tests in the class pass
- I click "Run All Tests in solution". All tests pass, with the exception of the first test class.
- and etc.
As you can see, the problem is very incompatible, which makes debugging difficult.
I tried using the Fusion Log Viewer, but it gave me confusing results that I did not quite understand.
What should I look for? Has anyone else experienced this issue?
Update:
Additional information was requested.
The tests went well for several months - I think the last time I ran them was on Thursday, and then they worked great. I'm trying to study the history of version control to see if something has changed, but nothing out of the ordinary.
I could track and check the project on different days ago, but we use Visual Source Safe (I know - not my descission :-(), so I do not dare to do this.
- , Moq -... , , .
, .