views:

38

answers:

1

My Solution Built fine last Friday.

Today I fired it up and I am getting this error message:

Could not load file or assembly 'MyApplication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

This is failing in my Smart Device Unit Test project.

I have Googled around for this. And while others have had my problem, I can't seem to find a fix that works.

When I double click on the error it takes me to Microsoft.TeamTest.targets. This is the target in question:

  <Target Name="ResolveTestReferences" Condition="'@(Shadow)'!=''">
    <BuildShadowTask
        CurrentResolvedReferences="@(ReferencePath)"
        CurrentCopyLocalFiles="@(ReferenceCopyLocalPaths)"
        Shadows="@(Shadow)"
        ProjectPath="$(ProjectDir)"
        IntermediatePath="$(IntermediateOutputPath)"
        SignAssembly="$(SignAssembly)"
        KeyFile="$(AssemblyOriginatorKeyFile)"
        DelaySign="$(DelaySign)">
      <Output TaskParameter="FixedUpReferences" ItemName="ReferencePath"/>
      <Output TaskParameter="NewCopyLocalAssemblies" ItemName="ReferenceCopyLocalPaths"/>
    </BuildShadowTask>
  </Target>

If I just build my actual project (not the test project) then it works fine.

Any Ideas?

A: 

Add a dependency on your unit test project to your actual product project in the solution properties window on the "Project Dependencies" dialogue.

That should ensure the actual product gets built before the unit test project if it isn't built yet already.

Mike Atlas
Alas, there is already a dependency there...
Vaccano