2

I'm trying to build a .NET 6 Xamarin iOS app using .NET CLI.

This question is a follow up of this one.

Now the problem is that after a while, the build fails with the following error:

#[error]CSC(0,0): Error CS2001: Source file '/Users/runner/work/1/s/TestApplication/obj/arm64/ReleaseiPhone/net6.0-ios16.0/ios-arm64/TestApplication.GeneratedMSBuildEditorConfig.editorconfig' could not be found.

AFAIK this file is used by Visual Studio and has nothing to do with the .NET CLI.

This seems to be the Roslyn compiler that looks for it.

/analyzerconfig:"obj/arm64/Release|iPhone/net6.0-ios16.0/ios-arm64/TestApplication.GeneratedMSBuildEditorConfig.editorconfig" /analyzerconfig:/Users/runner/hostedtoolcache/dotnet/sdk/6.0.402/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_6_default.editorconfig 

EDIT:

/p:RunAnalyzersDuringBuild=false

does not help.


EDIT 2:

This seems to be a new behavior of a .NET 6 build. Originaly, my project is not .NET 6, it has been upgraded to it.

1 Answers1

0

I had this error, but then updated to the latest VS2022. Now the error is gone.

The version I'm now using (which is working fine) is:

Microsoft Visual Studio Professional 2022 (64-bit) - Current
Version 17.6.5
StayOnTarget
  • 11,743
  • 10
  • 52
  • 81