Microsoft.Threading.Tasks
assembly you are missing is in Microsoft.Bcl.Async
NuGet package. Not sure why but your packages.config
file is missing a bunch of dependent assemblies. You may want to un-install and install again your NuGet packages to bring back the dependencies.
Missing Microsoft.Threading.Tasks with azure SDK
-
11-10-2022 - |
Question
I'm attempting to use the Microsoft Azure SDK for .net version 0.9.5-preview. I am basically attempting to just get the sample for listing locations and services from the Readme working. However I'm running into an exception
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.WindowsAzure.Management.dll
Additional information: Could not load file or assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Information about this assembly is pretty sparse. I've found some references to it in relation to PCLs and windows phone but this is just a console application using the full 4.5.1(although I have also tried 4.5).
I've found a copy of the dll in a google repository and throwing that in the bin directory does make the application work, however that seems like a spectacular hack. I'd rather see a better solution. Any ideas?
The packages.config contents are
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.WindowsAzure.Common" version="0.9.8-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="0.9.5-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="0.9.9-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Libraries" version="0.9.6-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Monitoring" version="0.9.2-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Scheduler" version="0.9.8-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.ServiceBus" version="0.9.3-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Sql" version="0.9.4-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="0.9.3-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.VirtualNetworks" version="0.9.3-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.WebSites" version="0.9.3-preview" targetFramework="net45" />
</packages>
Solution
OTHER TIPS
Can you verify that you have the latest versions of the dependent assemblies from the dependencies NuGet package, installed with -Pre
?
http://www.nuget.org/packages/Microsoft.WindowsAzure.Common.Dependencies/