Incorrect version of System.Runtime, packaged

We have created a service that will be deployed to Azure. This consists of a DLL with the Worker Role class and an Azure Cloud Service project, as shown below: enter image description here

Build steps:

  • Create ccproj in the "Release" configuration.
  • Run NuGet "spec", then "pack" to get the .nupkg file.
  • Deploy the .nupkg file to the Azure Cloud service.

This worked fine until we upgraded to .NET 4.6.2, and also updated several other links, including System.Runtime (now v4.3.1). Now, despite the fact that we (perhaps unnecessarily) added a NuGet link to each individual project in the solution, pointing to System.Runtime 4.3.1, the version of System.Runtime.dll that is being deployed is an older version, as a result bringing in a dll ad on a service that then fails to start. If we manually copy the correct version of System.Runtime.dll, everything will work again.

Where is this the wrong version of System.Runtime? And how do we convince the villainous software / hardware to use the correct version?

UPDATE: The trail is getting warmer. On my development machine, the bin folder of the EventWorker project contains the correct version of System.Runtime.dll. But ... the folder EventProcessor\obj\debug\EventWorker contains the old version! I deleted the obj folder and recompiled the project - and the old version of the DLL appears again.

Where does it come from and how to fix it?

0
c # nuget azure azure-cloud-services
Nov 13 '16 at 10:23
source share
2 answers

Ok, I fixed it, but I'm not sure why this worked. I removed the NuGet link to System.Runtime from the EventWorker project. And now EventProcessorRole using the correct version of the DLL.

I will mark this as an answer in the meantime, but if anyone can explain this behavior, I will give you an answer ...

0
Nov 14 '16 at 12:08
source share

You have the right idea in terms of hunting for an infringing DLL. Do you have a dependent DLL that might use the wrong version? In addition, when running locally, it gives you a warning about a DLL conflict in the error window, allowing you to determine where? Take a look at your configuration file and see if you have a link to the version of the DLL in the redirection section, update it or create a new one to indicate the latest version.

0
Nov 13 '16 at 12:29
source share



All Articles