views:

138

answers:

1

I'm developing a unit test project (let's say XXX.UnitTest) to test ViewModels in another project (XXX) in my solution. I can add the reference but when I build, an error states that it cannot find that same project (XXX)

Error 42 Could not load file or assembly 'XXX, Version=1.0.2.66, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. XXX.UnitTest

Does anyone know what else can cause this problem?

A: 

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

  • This problem happened regardless if I used a mapped drive or an UNC path.

  • This problem happened even with a Code Access Security Policy of "Full Trust" for the URL.

  • I believe the problem occurs on Windows XP computers and not Windows 7 computers, but have not tested or verified.

  • I believe it has something to do with the Share permissions.

    • If I try to use "offline folders" for the network resource, I get "access is denied".

    -.

  • Setting NTFS permissions has no effect.

  • Adding user to administrators group has no effect.

  • I did not test to see if problem exists on removable local drives.

Work Around

Move solution and projects to a local hard drive.

Comment

I think this is a bug in Visual Studio 2010.

AMissico
I found a temporary fix was to reference the assembly in the working folder, which in this case is a deployment folder I am debugging out of. Your fix seems to be related and interesting, in that it is also path-related.
Blanthor