Open xperiandri opened 2 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Also /p:OutDir
is not taken into account
Instead of /p:OutDir=$(build.binariesdirectory)/$(BuildConfiguration)
which expand to /p:OutDir=/Users/runner/work/1/b/Release
used an expanded path to the default location relative to csproj /Users/runner/work/1/a/../s/Client/Client.Mobile/bin/Release/net6.0-macos/osx-x64/Transmission.Client.Mobile.app/Contents/MacOS//Transmission.Client.Mobile
What I wanted to achive is that
[command]/Users/runner/hostedtoolcache/dotnet/dotnet publish /Users/runner/work/1/s/Client/Client.Mobile/Transmission.Client.Mobile.csproj -v:n -f net6.0-macos --no-restore /p:_PlatformName=macOS -c Release /p:OutDir=/Users/runner/work/1/b/Release -o /Users/runner/work/1/a /p:BuildProjectReferences=false
binaries appear in /p:OutDir=/Users/runner/work/1/b/Release
binaries directory
and a pkg
installer in -o /Users/runner/work/1/a
artifacts directory
I'm seeing this as well with Maui Blazor Hybrid:
dotnet publish -f net6.0-maccatalyst -c Release
Description
When I call
dotnet publish -f net6.0-macos /p:_platformName=macOS -r osx-x64
I get errorproductbuild directory "bin/Release/net6.0-macos/osx-x64/publish" does not exist for writing "Transmission.Client.Mobile-1.0.pkg".
Reproduction Steps
<TargetFrameworks Condition="'$(_PlatformName)' == 'macOS'">net6.0-macos</TargetFrameworks>
to Mobile.csprojdotnet publish -f net6.0-macos /p:_platformName=macOS -r osx-x64
Expected behavior
pkg file creates successfully
Actual behavior
Error
productbuild directory "bin/Release/net6.0-macos/osx-x64/publish" does not exist for writing "Transmission.Client.Mobile-1.0.pkg".
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
I suppose that command line arguments are incorrect
CommandLineArguments = /usr/bin/productbuild --product /Users/xperiandri/Projects/ITM/Client/Client.Mobile/obj/Release/net6.0-macos/osx-x64/Product.plist --component bin/Release/net6.0-macos/osx-x64/publish/Transmission.Client.Mobile.app /Applications bin/Release/net6.0-macos/osx-x64/publish/Transmission.Client.Mobile-1.0.pkg
And the path
bin/Release/net6.0-macos/osx-x64/publish/Transmission.Client.Mobile-1.0.pkg
is calculated not fromcsproj
file but from some other patht.macOS.binlog.zip