gpt4 book ai didi

.net - 发布期间针对 .Net 4.5.2 时如何绕过警告

转载 作者:行者123 更新时间:2023-12-03 18:35:55 26 4
gpt4 key购买 nike

我的 Azure 服务以 .Net 4.5.2 为目标,并且在开发中运行良好。但是,构建会产生警告:

Warning The project 'SurfInfoWeb' targets .NET Framework 4.5.2. To make sure that the role starts, this version of the .NET Framework must be installed on the virtual machine for this role. You can use a startup task to install the required version, if it is not already installed as part of the Microsoft Azure guest OS.

我相信这些(本地)警告会导致发布立即失败(并且这些是错误列表中唯一的警告)。

根据 MS 的说法,4.5.2 预计将于 2016 年 1 月发布(我不确定确切的日期,但我想我已经读过 1 月 12 日或 1 月 16 日)。

我无法以正常方式抑制这些警告,因为它们没有警告代码。

1) .Net 4.5.2 在 Azure 上实际可用

2)有没有办法抑制没有代码的警告?

3)还有什么我没有想到的吗?

我使用的是 SDK 2.8.1。和 OSVersion="*"。

最佳答案

Is .Net 4.5.2 actually available on Azure?

Yes 。 .NET 4.5.2 在当前 osVersion 中可用* osFamily 2、3 和 4。

Is there a way to suppress warnings that don't have codes?

升级到 Azure SDK 2.9 的云服务项目不再生成此警告。使用早期版本 SDK 的项目(即使安装了 2.9 版本)仍然会生成此警告。要抑制此警告而不将项目升级到 SDK 2.9,您可以将以下代码段添加到您的 .ccproj 文件中。


<ItemGroup>
<WindowsAzureFrameworkMoniker Include=".NETFramework,Version=v4.5.2" />
</ItemGroup>

关于.net - 发布期间针对 .Net 4.5.2 时如何绕过警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34881724/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com