You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to ignore .csproj file in visual studio code
I have got error
Build FAILED.
obj\Debug\netstandard1.6\InvoiceService.Common.AssemblyInfo.cs(1,1): error SA1412: Store files as UTF-8 with byte order mark [E:\xyz\InvoiceService\src\InvoiceService.Common\InvoiceService.Common.csproj]
C:\Program Files\dotnet\sdk\1.0.1\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5): error : Cannot find project info for 'E:\xyz\InvoiceService\src\InvoiceService.Common\InvoiceService.Common.csproj'. This can indicate a missing project reference. [E:\xyz\InvoiceService\src\InvoiceService.Entity\InvoiceService.Entity.csproj]
C:\Program Files\dotnet\sdk\1.0.1\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5): error : Cannot find project info for 'E:\xyz\InvoiceService\src\InvoiceService.Common\InvoiceService.Common.csproj'. This can indicate a missing project reference. [E:\xyz\InvoiceService\src\InvoiceService.DataAccess\InvoiceService.DataAccess.csproj]
C:\Program Files\dotnet\sdk\1.0.1\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(92,5): error : Cannot find project info for 'E:\xyz\InvoiceService\src\InvoiceService.Common\InvoiceService.Common.csproj'. This can indicate a missing project reference. [E:\xyz\InvoiceService\src\InvoiceService.Business\InvoiceService.Business.csproj]
First of all, the diagnostic is reported for obj\Debug\netstandard1.6\InvoiceService.Common.AssemblyInfo.cs, not for the project file, so being able to ignore files based on extension would not help you.
There is currently no way of having StyleCop Analyzers ignore specific files, but there is a Roslyn issue about adding support for this generically for all analyzers (dotnet/roslyn#3705).
It looks like the file in question is automatically generated during build (functionality possibly added in this issue: dotnet/sdk#57). The compiler itself is supposed to automatically skip analysis of generated files, so I suggest you report the problem in https://github.com/dotnet/sdk, for example suggesting to add the BOM to the generated file or making sure the file is generated in a way so that the compiler understands that it is generated.
Another way forward could be to manually write the AssemblyInfo file, if it is possible to turn off the auto generation. That way, you would have complete control over it.
How to ignore .csproj file in visual studio code
I have got error
Build FAILED.
My CSPROJ file
The text was updated successfully, but these errors were encountered: