I'm using Code Contracts to generate satellite assemblies for my project. Basically it creates a MyAssembly.Contracts.dll for the project's MyAssembly.dll. This is supposed to be put beside your assembly but not referenced by any app -- it's used only by the contracts tools.
I'm trying to include this in my nuget package, but when I then install that package into another app, the Contracts assembly is included as a reference which creates problems.
According to the .nuspec reference, this should be as simple as adding a references
element, but it seems to be ignored. My current theory is that this is because I'm using a .csproj for replacement tokens, and it's reading references from the .csproj and not the .nuspec.
Has anyone done this before? Any ideas?
Here are the relevant parts of my .nuspec:
<?xml version="1.0"?>
<package>
<metadata>
<references>
<reference file="MyAssembly.dll"/>
</references>
</metadata>
<files>
<file src="bin\Release\CodeContracts\*.dll" target="lib\net45"/>
</files>
</package>