Closed roxk closed 2 years ago
Seems we can ignore the error: https://github.com/novotnyllc/MSBuildSdkExtras/issues/161
Oh, seems like we can target dotnet 6 https://devblogs.microsoft.com/xamarin/tips-for-porting-your-xamarin-library-to-dotnet-maui/, which include the new build tools that allow multi-targeting by default. It also makes it compatible with MAUI by default :D
Updating tfm indeed allow dotnet pack
to work as expected. However, as the resultant dll now targets net6.0, and net6.0-$platform, they are now not consumable by xamarin project (mostly .net5). One trick we can try is to modify the output folders so net6.0-android -> MonoAndroid12.0 before packaging, to see if the correct dll would be picked up by xamarin project, but that looks too hacky. Will try to see if we can simply ignore the error or has other workaround.
Decide to simply use github action to build for now. Goal:
Nuget supports scoped API key: https://docs.microsoft.com/en-us/nuget/nuget-org/scoped-api-keys so it's safe to publish to nuget servers in CI.
https://github.com/actions/upload-artifact
Github action as expected support artifact uploading and retention/expiry :) Not sure if it has any additional fees by default though.
:tada:
dotnet msbuild
doesn't work with "MSBuild.Sdk.Extras" (Yet?)