I'm trying to configure a GitHub workflow that builds my multi-target NuGet package (to be used with Xamarin.Forms) and pushes this package to GitHub and Nuget. I discussed the issue here, and it all seems to boil down to the following:
I cannot use dotnet pack
in my workflow, it results in the following error:
C:\Users\user\.nuget\packages\msbuild.sdk.extras\2.1.2\Build\Workarounds.targets(27,5): error : If you are building projects that require targets from full MSBuild or MSBuildFrameworkToolsPath, you need to use desktop msbuild ('msbuild.exe') instead of 'dotnet build' or 'dotnet msbuild' [C:\path\to.csproj]
When I use MSBuild (either manually on my computer, or through the workflow), only the UWP declarations are available, and for all target platforms (Android, iOS, UWP).
When I right-click the class library project and click the Pack command, the resulting package works as expected. All platforms can call the platform-specific declarations.
Question:
Simple, what commands are behind the [Right-click csproj-file] → Pack? I want to try and run these commands manually to figure out what's going on...
Information:
- msbuild version on my pc: 16.7.0.37604 (located at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin)
- msbuild version on GitHub CI: 16.7.0+b89cb5fde
- dotnet version on GitHub CI: 3.1.301