Skip to content

Specify output path for "dotnet publish"#1952

Closed
Beau-Gosse-dev wants to merge 1 commit intodotnet:masterfrom
Beau-Gosse-dev:patch-2
Closed

Specify output path for "dotnet publish"#1952
Beau-Gosse-dev wants to merge 1 commit intodotnet:masterfrom
Beau-Gosse-dev:patch-2

Conversation

@Beau-Gosse-dev
Copy link
Contributor

Without this, when benchmarking CoreRT (like from https://github.com/dotnet/performance ) the publish directory ends up being inside of the bin directory of the host console app, and not the sub-directory bin directory of the generated project.

For example when the publish command is this (before this change): start dotnet publish -c Release /p:DebugType=portable -bl:benchmarkdotnet.binlog -r win-x64 --no-build --no-restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true in C:\Code\Local Spikes\performance\performance\artifacts\bin\MicroBenchmarks\Debug\net6.0\Job-PALSMU

Then it will result in this: Executable C:\Code\Local Spikes\performance\performance\artifacts\bin\MicroBenchmarks\Debug\net6.0\Job-PALSMU\bin\Release\net6.0\win-x64\publish\Job-PALSMU.exe not found

because the executable was actually published to C:\Code\Local Spikes\performance\performance\artifacts\bin\BenchmarkDotNet.Autogenerated\Release\net6.0\win-x64\publish

Without this, when benchmarking CoreRT (like from https://github.com/dotnet/performance ) the publish directory ends up being inside of the bin directory of the host console app, and not the sub-directory bin directory of the generated project.

For example when the publish command is this (before this change): ```start dotnet publish -c Release /p:DebugType=portable -bl:benchmarkdotnet.binlog -r win-x64 --no-build --no-restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true in C:\Code\Local Spikes\performance\performance\artifacts\bin\MicroBenchmarks\Debug\net6.0\Job-PALSMU```

Then it will result in this: ```Executable C:\Code\Local Spikes\performance\performance\artifacts\bin\MicroBenchmarks\Debug\net6.0\Job-PALSMU\bin\Release\net6.0\win-x64\publish\Job-PALSMU.exe not found``` 

because the executable was actually published to ```C:\Code\Local Spikes\performance\performance\artifacts\bin\BenchmarkDotNet.Autogenerated\Release\net6.0\win-x64\publish```
@Beau-Gosse-dev
Copy link
Contributor Author

Replaced with #1955

@Beau-Gosse-dev Beau-Gosse-dev deleted the patch-2 branch March 18, 2022 21:05
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

Successfully merging this pull request may close these issues.

1 participant