specify the project file name when running dotnet publish to avoid issues when the folder contains a solution file#1170
Merged
sebastienros merged 1 commit intoaspnet:masterfrom Aug 6, 2019
Conversation
…sues when a folder contains a project and solution in such case, without the project file name specified entire solution is published and in case of the performance repo, fails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While building the performance culture in CoreFX I have noticed that most of the devs can now easily run the performance repo microbenchmarks on their machine, however very few run Linux vs Windows comparison.
@sebastienros has recently shown me how to run BenchmarkDotNet benchmarks using this amazing repository and infrastructure.
I think that it would be great if we could use it to quickly compare .NET Core performance on Linux vs Windows on the same hardware. Disclaimer: I don't want the entire CoreFX Team to start pushing a lot of jobs to the ASP.NET Perf infra, I just want to make it easy for the Team to measure the OS difference quickly when needed.
I have already introduced some changes to the performance repository to make it possible:
dotnet/performance#591
dotnet/performance#592
dotnet/performance#594
The last problem that remains active is addressed by this PR.
If we run
dotnet publishin given folder without specifying the project name:.slnfile, but a.csprojonly, dotnet publish publishes only the.csproj(99.9% of the cases, worked for everyone so far).slnfile, dotnet publish tries to publish all projects in given solution, including test projects etc. This is the problem in the performance repo where we have a solution file and a project file in the same folder. dotnet publish tries to publish a self-contained version of xunit test project and it fails.The solution is to provide the project name when doing
dotnet publish $projectName.This should not be an issue, because this particular command expects user to provide the path via
--project-filewhen running BenchmarkDriver. It's already used to get theWorkingDirectoryfordotnet publishBenchmarks/src/BenchmarksServer/Startup.cs
Lines 1423 to 1424 in 0969d63
Benchmarks/src/BenchmarksServer/Startup.cs
Lines 1792 to 1793 in 0969d63