Skip to content

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented Nov 30, 2021

Turn on <TreatWarningsAsErrors> for Release builds only.

Also, Mono's net6.0 (MSBuild 16) support causes warnings so we aren't going to enable it there.

warning NETSDK1182: Targeting .NET 6.0 in Visual Studio 2019 is not supported. 
warning CS8032: An instance of analyzer System.Text.Json.SourceGeneration.JsonSourceGenerator cannot be created from /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.NETCore.App.Ref/6.0.0/analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll : Could not resolve type with token 01000027 from typeref (expected class 'Microsoft.CodeAnalysis.IIncrementalGenerator' in assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35') assembly:Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 type:Microsoft.CodeAnalysis.IIncrementalGenerator member:(null). [/Users/runner/work/1/s/src/Xamarin.Android.Tools.Bytecode/Xamarin.Android.Tools.Bytecode.csproj]

We also saw these warnings on Windows before we moved to Visual Studio 2022 agents.

@dotnet dotnet deleted a comment from azure-pipelines bot Dec 2, 2021
@jpobst jpobst marked this pull request as ready for review December 2, 2021 20:19
@jonpryor jonpryor merged commit 111ebca into main Dec 3, 2021
@jonpryor jonpryor deleted the warn-as-error branch December 3, 2021 21:46
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants