I use VS 2015 U1.
I use an external library with a strange versioning - 1.0.4056.40164
.
I added a .Fakes file for this library. When fakes assembly is built, I get the following warning:
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]
I have specified in my .Fakes file:
<Compilation>
<Property Name="NoWarn">CS7035,7035</Property>
<Property Name="DisabledWarnings">7035;1607</Property>
</Compilation>
with no luck.
I also added this to my Somewhere.Test.csproj:
<NoWarn>CS7035;7035</NoWarn>
Since I do not control this third party library, it makes it fairly frustrating to watch this warning in an otherwise clean solution.
How can I suppress it just for this fakes assembly?
I've successfully suppressed this warning with
<NoWarn>7035</NoWarn>
but in my project file. I needed to add it in all possible configuration and platform choices. I have two, so I ended up with:
<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>
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With