When building a unit test project, VS 2010 cannot find the reference assembly for testing

I am developing a unit test project (say XXX.UnitTest) to test ViewModels in another project (XXX) in my solution. I can add a link, but when I create, an error indicates that it cannot find the same project (XXX)

Error 42 Failed to load the file or assembly 'XXX, version = 1.0.2.66, Culture = neutral, PublicKeyToken = null' or one of its dependencies. The system cannot find the file indicated. XXX.UnitTest

  • I did a clean overhaul of all the projects in my solution.
  • I checked that the assembly with this version number (1.0.2.66) did exist in the path I was referring to.
  • I deleted and added the link both in the project and through the Overview tab.
  • I made sure that the version number is not listed in the csproj file.
  • I checked the reference build with Dependency Walker.
  • I confirmed that both projects are targeting the x86 platform. (As suggested here Debugging Tips “Failed to load file or assembly X or one of its dependencies” )

Does anyone know what else could cause this problem?

+5
source share
3 answers

Last week I had the same problem. It turns out that my solution and projects were on a network resource. If I moved the solution to a local drive, the problem disappeared.

  • This issue occurred regardless of whether I used a mapped drive or a UNC path.

  • " " URL-.

  • , Windows XP, Windows 7, .

  • , - Share.

    • " " , " ".

    -.

  • NTFS .

  • .

  • , .

.

, Visual Studio 2010.

+1

. . QTAgent32.exe devenv.exe C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE :

<runtime>
    <loadFromRemoteSources enabled="true" /> 
</runtime>

(C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Config\machine.config) VS2010. , machine.config.

. : http://msdn.microsoft.com/en-us/library/dd409252%28VS.100%29.aspx

+1

. VS 2010 Windows Server 2003; Mac. VS Mac (~/), Z:\ Windows. VS studio , , UnitTests.dll . . Windows C: \, dll , . Blanthor, .

0

All Articles