gpt4 book ai didi

microsoft-fakes - 忽略 Fakes 程序集中的 CS7035 "Specified version does not conform to the recommended format"

转载 作者:行者123 更新时间:2023-12-04 06:54:39 26 4
gpt4 key购买 nike

我使用 VS 2015 U1。
我使用带有奇怪版本控制的外部库 - 1.0.4056.40164 .

我为这个库添加了一个 .Fakes 文件。当构建 fakes 程序集时,我收到以下警告:

C:\Somewhere.Test\f.cs(21,58): warning CS7035: The specified version string does not conform to the recommended format - major.minor.build.revision [C:\Somewhere.Test\obj\Debug\Fakes\rs\f.csproj]

我在我的 .Fakes 文件中指定了:
 <Compilation>
<Property Name="NoWarn">CS7035,7035</Property>
<Property Name="DisabledWarnings">7035;1607</Property>
</Compilation>

没有运气。

我还将它添加到我的 Somewhere.Test.csproj 中:
  <NoWarn>CS7035;7035</NoWarn>

由于我不控制此第三方库,因此在其他干净的解决方案中观看此警告令人相当沮丧。

我怎么能只为了这个假货组装而抑制它?

最佳答案

我已经成功地抑制了这个警告

<NoWarn>7035</NoWarn>

但在我的项目文件中。我需要在所有可能的配置和平台选择中添加它。我有两个,所以我最终得到:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>7035</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>7035</NoWarn>
</PropertyGroup>

希望这可以帮助

关于microsoft-fakes - 忽略 Fakes 程序集中的 CS7035 "Specified version does not conform to the recommended format",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36283133/

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