Skip to content

Known issues in .NET

Jonathan Peppers edited this page Apr 11, 2023 · 22 revisions

.NET 8 Preview 3

In some apps, Release builds may fail to fully launch:

A workaround is to specify <AndroidEnableMarshalMethods>false</AndroidEnableMarshalMethods> in your .csproj file.

We hope to address this in a future release.

Specifying both -f and -r to dotnet build fails to restore for multi-targeted projects

This will manifest as a build error like this:

error : The RuntimeIdentifier 'android-arm64' is invalid.

The cause is that by passing -r <runtime identifier> to 'dotnet build' that runtime identifier is used for all target frameworks in the project file when the project is restored, while it's only a valid runtime identifier for one of the target frameworks.

Potential workaround is to restore manually, and build without restoring:

$ dotnet restore
$ dotnet build --no-restore -f net6.0-android -r android-arm64

This happens with dotnet publish as well.

This will be fixed in a future version of NuGet.

Ref: https://github.com/dotnet/sdk/issues/21877.
Ref: https://github.com/NuGet/Home/issues/11653.

Clone this wiki locally