[英]Can't add WCF service reference hosted on Azure VM to VS2015 project
[英]Can't Install Package Azure.Storage.Blobs.12.5.1 in VS2015
我正在尝试开始使用 Azure Blob 存储。 我正在运行 VS2015,但我安装了 .NET 4.8 SDK 并将我的项目设置为目标。 当我尝试安装 NuGet 包时,我得到以下信息:
Could not install package 'Azure.Storage.Blobs 12.5.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', but the package does not contain any assembly references or content files that are compatible with that framework.
根据这个https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support .NET 4.7.2 相当于.NET standard 2.0,这似乎是什么包想要。 但是我已经尝试过 .NET 4.7.2 和 4.8 并且该软件包没有安装。
Azure.Storage.Blobs
仅适用于 .NET Standard。
我相信您需要将Microsoft.Azure.Storage.Blob
用于 .NET Framework(最低 4.5.2)
链接到 Nuget 在这里。
预计到达时间:
我刚读了你问题的另一半。 .NET Framework 4.6.1 符合 .NET Standard 2.0。
我打算在这里说一下,Visual Studio 2015 和 .NETStandard 2.0 包之间存在某种不兼容。 我在 Visual Studio 2019 上的 .NET Framework 4.6.1 项目上对其进行了测试,并且安装包很好。
刚刚查了一下,确实是这样。 您至少需要 Visual Studio 2017。 至少您仍然可以使用Microsoft.Azure.Storage.Blob
。
所以 Azure 真的希望你使用 VS 2017 或更高版本。
为了在从 TFS 中提取后在 VS 2015 上工作,我执行了以下操作:
https://www.nuget.org/downloads
https://www.nuget.org/packages/Azure.Storage.Blobs/
.vbproj
文件。 在第一个PropertyGroup
下,在结束标记之前添加以下行: <ImplicitlyExpandDesignTimeFacades>false</ImplicitlyExpandDesignTimeFacades>
它不是 Visual Studio(在 VS 2017、2019 中得到相同的错误),而是项目需要是 .Net Core 而不是 .Net Framework。 如前所述,您可以安装 Microsoft.Azure.Storage.Blob,但您会收到一条警告,指出包已被弃用(并且说使用 Azure.Storage.Blob 代替)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.