Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate msbuild -t:pack that work cross platform #17

Closed
roxk opened this issue May 13, 2022 · 7 comments
Closed

Investigate msbuild -t:pack that work cross platform #17

roxk opened this issue May 13, 2022 · 7 comments

Comments

@roxk
Copy link
Contributor

roxk commented May 13, 2022

dotnet msbuild doesn't work with "MSBuild.Sdk.Extras" (Yet?)

@roxk
Copy link
Contributor Author

roxk commented May 16, 2022

Seems we can ignore the error: novotnyllc/MSBuildSdkExtras#161

@roxk
Copy link
Contributor Author

roxk commented May 16, 2022

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

@roxk
Copy link
Contributor Author

roxk commented May 16, 2022

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.

@roxk
Copy link
Contributor Author

roxk commented May 16, 2022

Decide to simply use github action to build for now. Goal:

  1. Minimal: manual publish based on tag/whatever git conditionals
  2. Consider adding nuget api token so CI can auto-publish as well. Again, must be tag/git-ref based

@roxk
Copy link
Contributor Author

roxk commented May 16, 2022

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.

@roxk
Copy link
Contributor Author

roxk commented May 16, 2022

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.

@roxk
Copy link
Contributor Author

roxk commented May 16, 2022

🎉
image

roxk added a commit that referenced this issue May 16, 2022
@roxk roxk closed this as completed May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant