Skip to content

[macOS] dotnet publish cannot write pkg file #24348

Closed
@xperiandri

Description

@xperiandri

Description

When I call dotnet publish -f net6.0-macos /p:_platformName=macOS -r osx-x64 I get error productbuild directory "bin/Release/net6.0-macos/osx-x64/publish" does not exist for writing "Transmission.Client.Mobile-1.0.pkg".

Reproduction Steps

  1. Create Uno Platform app .NET 6 from template
  2. Add <TargetFrameworks Condition="'$(_PlatformName)' == 'macOS'">net6.0-macos</TargetFrameworks> to Mobile.csproj
  3. Call dotnet 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 from csproj file but from some other path

t.macOS.binlog.zip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions