-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
.Net Core environment with --no-restore not working #154
Comments
I think I understand the problem, but not sure I'm following the suggested solution. If I recall we always call MSBuild, either directly or indirectly depending on if it's a .NET Framework or .NET Core host. I.e. we'll end up calling one of these two commands:
That help unify the command line, especially for the arguments related to injecting the MSBuild logger that Buildalyzer uses to listen for build events. In the event
If The part I'm unclear on is why calling |
Agreed Dave. This is incorrect. After looking more into it, my problem seems more in line with #105. |
Per https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build:
"Running 'dotnet build' is equivalent to running 'dotnet msbuild -restore'"
In order to not restore in a net core environment, we need to pass --no-restore.
Therefore, setting Restore = false in EnvironmentOptions does not work, as the code currently sets "/restore" when Restore == true.
Suggest using 'dotnet build' rather than 'dotnet msbuild'. In ProjectAnalyzer.GetCommand, something akin to:
...
// Then, at the end of the same method... something akin to
Context: I'm trying to use Stryker.net in a dockerized GitHub Action, and I do not want to 'restore' in the CI/CD pipeline. (1) It has already been restored, and (2) Re-restoring will not work from within a GitHub Action unless credentials of (all) the private Package Feeds are flowed into the GitHub Action, which renders it specific to the project (more specifically, to the nuget.config) being built.
The text was updated successfully, but these errors were encountered: