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

Publish to osx, on a PC, using cspro and profilej, always uses DEBUG information #1392

Open
pmespace opened this issue Jul 12, 2023 · 0 comments

Comments

@pmespace
Copy link

I'm trying to publish a .net 6.0 console app to win-x64, osx-x64 and osx-arm64 using my csproj and various profiles defined before but all indicating using "Release", "ProduceSingleFile" and "SelfContained".

I've added the following inside my csproj:

<PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net6.0</TargetFramework> <RuntimeIdentifiers>win-x64;osx-x64;osx-arm64</RuntimeIdentifiers> </PropertyGroup> <Target Name="PostBuild" AfterTargets="PostBuildEvent"> <Exec Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'" Command="dotnet publish -p:PublishProfile=win-x64 --no-build" /> <Exec Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'" Command="dotnet publish -c Release -p:PublishProfile=osx-x64 --no-build" /> <Exec Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'" Command="dotnet publish -c Release -p:PublishProfile=osx-arm64 --no-build" /> </Target>

Please not the -c Release in the osx publish. I do not add them when publishing to osx... the publish process ALWAYS tries to retrieve singlefilehost from the DEBUG folder instead of the RELEASE one.

Adding -c Release allows bypassing the issue.

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