Msbuild: WriteCodeFragment should add <auto-generated/> element in comment

Created on 29 Mar 2017  路  3Comments  路  Source: dotnet/msbuild

Currently $(AssemblyName).AssemblyInfo.cs files produced by dotnet Sdk are analyzed by Roslyn. Adding <auto-generated /> element to the file comment will prevent this.

Most helpful comment

This was fixed by #2207. Thanks @dasMulli! The fix will be available with VS 15.3 Preview 4 (and higher) and .NET Core SDK 2.0.0.

All 3 comments

We're getting reports of this in StyleCop Analyzers (DotNetAnalyzers/StyleCopAnalyzers#2314) as well. The source of the problematic string is here, and it's actually written to the output here.

Running into this right now with my team. We are using StyleCop Analyzers. Building through Visual Studio works fine, using dotnet publish (v1.0.4) creates this issue.

This was fixed by #2207. Thanks @dasMulli! The fix will be available with VS 15.3 Preview 4 (and higher) and .NET Core SDK 2.0.0.

Was this page helpful?
0 / 5 - 0 ratings