Skip to content

Do not generate SupportedOSPlatformAttribute type on net6? #777

@radekdoulik

Description

@radekdoulik

Commit da12df4 added support for using SupportedOSPlatformAttribute.

In XA it breaks CI builds as we are getting this warning in DotNetBuild test and the test fails when we get any warning:

/Users/runner/work/1/s/bin/TestRelease/temp/DotNetBuildandroid.21-armandroid.21-arm64android.21-x86android.21-x64False/obj/Debug/net6.0-android/UnnamedProject.AssemblyInfo.cs(21,38): warning CS0436: The type 'SupportedOSPlatformAttribute' in '/Users/runner/work/1/s/bin/TestRelease/temp/DotNetBuildandroid.21-armandroid.21-arm64android.21-x86android.21-x64False/obj/Debug/net6.0-android/generated/src/__NamespaceMapping__.cs' conflicts with the imported type 'SupportedOSPlatformAttribute' in 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Using the type defined in '/Users/runner/work/1/s/bin/TestRelease/temp/DotNetBuildandroid.21-armandroid.21-arm64android.21-x86android.21-x64False/obj/Debug/net6.0-android/generated/src/__NamespaceMapping__.cs'. [/Users/runner/work/1/s/bin/TestRelease/temp/DotNetBuildandroid.21-armandroid.21-arm64android.21-x86android.21-x64False/UnnamedProject.csproj]

Complete build.log from dotnet/android#5444 CI build

Looks like we should not be generating own SupportedOSPlatformAttribute type on net6?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions