I am attempting to debug this message:
The type 'Logging.LoggingProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'Logging.LoggingProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=71561dfc7a07d5da'.
I have several nuget packages that depend on each other in a chain. When digging into the project files that build these packages i have found that the way assemblies are being referenced is slightly different. Some have the key in them and others do not. this had led me to believe that if i find a way to make the references created by nuget consistent my problem will go away.
The assemblies were at one time signed. I thought the reference behaviour changed if i removed signed assemblies = false from the project, but that does not seem to be the case.
Eg in 1 solution i have used the same nuget package and version in 2 different projects the references are different
The incorrect one (or at least undesirable)
<Reference Include="Logging.LoggingProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=71561dfc7a07d5da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Logging.LoggingProvider.1.0.24\lib\Logging.LoggingProvider.dll</HintPath>
</Reference>
and in another project the correct one is
<Reference Include="Logging.LoggingProvider, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Logging.LoggingProvider.1.0.24\lib\Logging.LoggingProvider.dll</HintPath>
</Reference>
What could be causing this? I am quite literally adding the nuget package to 1 project then the next.. One works and the other doesn’t – I cant see anything in the project files explaining why.
NuGet uses the underlying VS layer to add references while installing a package.
What is the behavior when you try to add this reference to those projects manually ?