Hello,
I have added lately a new project to our solution as always, but I get the following error while building the assembly.
The type 'Ade.Documents.IDocument' is defined in an assembly that is not referenced. You must add a reference to assembly 'Ade.Core, version=1.0.0.0, Culture=neutral, PublicKeyToken=################'This is a public type in the assembly Ade.Core which is a project reference of the failing assembly. If I build with VS everything is ok. I have enabled the option 'Prevent signing of output assembly'on all projects. When I disable it on the failing assembly I get the expected error:
Referenced assembly 'Ade.Core' does not have a strong nameThis shows, that I have referenced the expected assembly. This is what I tried so far:
- Readding the reference to the project.
- Enabling the option 'Copy Referenced Assemblies To Workspace' on both projects.
- Defining Ade.Core as 'Implicit Project Dependency' on the failing project.
Nothing worked so far.
I am using NCrunch 2.7.0.5. The assembly is referenced as:
<ProjectReference Include="..\Ade.Core\Ade.Core.csproj">
<Project>{F341BF26-967F-4113-BBE1-98819370832C}</Project>
<Name>Ade.Core</Name>
</ProjectReference>
Best regards,
Tobias Wilker
EDITI have further information regarding this issue. I use a different assembly reference to an assembly called
Ade.Safety.Context.dll. I use a method - where the build error happens - called
ManipulateDocument(Ade.Documents.IDocument) The interface
Ade.Documents.IDocument was changed lately. My assembly uses the new version - because
Ade.Core is a project reference. The
Ade.Safety.Context.dll was compiled with the older version. Normally this would lead to an exception during runtime. Could it be,that NCrunch kind of anticipates this an therefore throws the build error? Can I force it to build nonetheless?