Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 222405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:07:27+00:00 2026-05-11T19:07:27+00:00

I have a very wierd problem happening to me during unit testing (MSTest in

  • 0

I have a very wierd problem happening to me during unit testing (MSTest in Visual Studio – .NET 3.5 SP1):

  1. I click “Run All Tests in solution”
  2. All tests passes, except for one particular class, where every tests throws the following exception: “System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401).”
  3. I then go and set a breakpoint in the class. Result: all tests in the class passes (the same tests that failed before).
  4. I click “Run All Tests in solution”. All tests passes, except for another class.
  5. I go set a breakpoint in the class. Result: All tests in the class passes
  6. I click “Run All Tests in solution”. All tests passes, except for the first testclass again.
  7. etc.

As you can see the problem is very inconsistent, making it hard to debug.

I’ve tried using Fusion Log Viewer, but that gave me confusing results I didn’t quite understand.

What should I be looking for? Has anyone else experienced this problem?

Update:
Some additional info was requested.

The tests has run fine for months – I think last time I ran them was thursday, and then they ran fine. I’ve been trying to examine the source control history, to see if something has changed, but nothing out of the ordinary.

I could track back and check out the project at different days back in time, but we’re using Visual Source Safe (I know – not my descission 🙁 ) so I’m hesitating to do that.

The tests are regular unit tests, and I’m using Moq for mock-objects… But as I said – it has worked fine until recently.

I was just hoping for some advice on how to debug this issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:07:27+00:00Added an answer on May 11, 2026 at 7:07 pm

    We encountered this issue as well, though it only happened on our build server (where we have VS2008 installed in order to use MSTest with MSBuild), not locally. We installed this hotfix in the version of VS2008 on the build server and that eliminated this problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very wierd problem. When i run the file from a different
I got a VERY weird problem happening with ALL my DocumentCompleteEventHandlers. Say I have
I have a very weird problem. I have a VB.NET 2.0 application that takes
I have a very wierd problem. I created a login system with ajax and
So I have a very weird problem. I am writing some code in VB.Net
I have a very weird problem: sometimes when I call nHibernate update to an
I have a very weird problem.. I really do hope someone has an answer
I have a very weird problem in Firefox ( version 3.5.2), and I am
I have a very weird problem with PROLOG. I have used it before, but
Hello I have a very weird problem in chrome I just cannot figure out!

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.