DLL version mismatches between NuGet package and CRA.ClientLibrary DLL
Closed this issue · 2 comments
When I create a simple .NET Framework console program that depends on the CRA NuGet package and instantiates a CRAWorker object, the program crashes with the following exception:
System.IO.FileLoadException: 'Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.3.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'
After inspecting the DLLs in my program's bin
directory and the solution's packages
directory with the "ildasm" disassembler, it looks like what is happening is that the CRA NuGet package pulls in a dependency on WindowsAzure.Storage NuGet package version 9.2.0, which includes Microsoft.WindowsAzure.Storage.dll version 9.2.0.0, but then the copy of CRA.ClientLibrary.dll included with the CRA NuGetPackage has a manifest that lists a dependency on Microsoft.WindowsAzure.Storage.dll version 9.3.2.0.
If I manually upgrade my program's WindowsAzure.Storage NuGet dependency to version 9.3.2, it fixes this specific problem, but the program then crashes with a similar error for the Aqua dependency. The Aqua error is also fixed by manually upgrading the version of the aqua-core NuGet package from 4.2.0 to 4.5.1.
Below I've included the code for a minimal repro, but you can also reproduce the bug by changing the CRA.Worker project in this repo to depend on the CRA NuGet package instead of the CRA.ClientLibrary project in its solution.
namespace CRATest
{
class Program
{
static void Main(string[] args)
{
CRAWorker worker = new CRAWorker("dummyInstance", "127.0.0.1", 1500, "dummyConnectionString");
worker.Start();
}
}
}
I have updated the Nuspec (7f559c5) and pushed a new build for a NuGet package. Let me know if this fixes the issue. Thanks!
It looks like that change fixed it. Thanks!