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 564313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:45:11+00:00 2026-05-13T12:45:11+00:00

I am developing an assembly which has to be installed in the GAC, and

  • 0

I am developing an assembly which has to be installed in the GAC, and as part of a post-build step I ensure that the GAC gets updated after each build. If I create a (Visual Studio) unit test (in a seperate tests assembly) to call a new method on a class under test, then implement the method on the class under test (TDD style), then run the test (CTRL R, T) the assembly under test and the unit test project get built (and the assembly is updated in the GAC).

The test fails (throws a System.MissingMethodException for the new method). If I now debug the test the test passes and thereafter I can run the test and it will pass.

As part of my investigation I added an endless loop to the test and then ran it. I used Process Explorer to find the path of the dll that gets loaded during the test. I find that
there is a handle to an assembly in C:\WINDOWS\assembly\temp\4XY349E7C5. Using the trick I found here to look in that directory I find an older version of my dll than is in the GAC, and if I use Reflector to examine the dll I find it does not contain the new method I added which explains the MissingMethodException.

So why does VSTestHost.exe load the dll in the temp directory, and is there some way for me to ensure the correct dll is used?

  • 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-13T12:45:12+00:00Added an answer on May 13, 2026 at 12:45 pm

    Reading this article pointed me towards the reason for the problem – VSTestHost.exe is keeping the old version of the assembly loaded (i.e. the version refered to in the gac\temp folder, which fusion will unload when VSTestHost exits).

    The solution to the problem was to change the setting in Tools/Options/Test Tools/Test Execution – uncheck “Keep test execution engine running between tests”. Now VSTestHost starts a new instance for each test run and loads the correct version of my dll from the GAC.

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

Sidebar

Related Questions

I m developing a bootloader for which i have a bin file whose assembly
I created a setup project with VS2005 for an application that I'm developing, which
I am developing a software using C# 2.0 that has an windows application and
I'm developing a C# assembly which is to be called via COM from a
I am developing a WCF service which follows MSDN's service archetype . That said,
I'm developing a site that uses OpenID for authentication, which is working fine however...
Iam developing one application.In that iam placing the radio buttons(uiimageview) on table view and
iam developing one application.In that i need to get the music files from the
I am developing a Windows service that exposes a WCF service intended to be
I am developing a nuget package which will set up the current project to

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.