-
Notifications
You must be signed in to change notification settings - Fork 177
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
Support --no-restore #1333
Comments
Hi bcollamore. In our experience we cannot do a successful project analysis without a manual nuget restore because buildalyzer does a clean as well. So the clean will have to be disabled as well. |
This feature is not implemented per se, but design and workflow have changed, especially with PR #2975. Stryker now does Hope this helps |
Stryker.NET always performs a 'restore'. CI/CD pipelines may have already performed this step. My specific context: I am trying to run stryker.net in a dockerized GitHub Action. Some projects' nuget.config rely on a private Nuget feed that needs credentials. We do not want to flow the [1..n] set of credentials into this GitHub Action - we want it generic. (The burden is on that repo to sort out how to do a "dotnet restore" independent of Stryker earlier in the pipeline.)
Describe the solution you'd like:
A command-line parameter --restore. default to true for backwards compatibility. Support --restore:false. The InputFileAnalyzer's ResolveInput() then constructs an EnvironmentOptions:
var environmentOptions = new EnvironmentOptions
{
Restore = options.Restore
};
and passes it to the 2 calls to AnalyzeProject via a new overload that supports an EnvironmentOptions object; that object is passed into BuildAnalyzer's existing Build(EnvironmentOptions) overload.
Additional context:
BuildAnalyzer does not appear to support Restore=false in a netcore environment. It always calls "dotnet msbuild" (rather than "dotnet build"), which always does a restore. phmonte/Buildalyzer#154 filed for this situation.
The text was updated successfully, but these errors were encountered: