Added '--cache-path' command line option#778
Merged
filipw merged 6 commits intodotnet-script:masterfrom Nov 12, 2025
Merged
Conversation
Added a new command-line option "--cache-path" (or "-p") to allow users to specify the temporary directory used to build the script. This is equivalent to the 'DOTNET_SCRIPT_CACHE_LOCATION' environment but is far more convenient when scripts are run as part of MSBuild. In particular, parallel runs of a script can specify different cache paths preventing the "script.csproj is in use" failure that can happen. (Re: issues dotnet-script#507, dotnet-script#596, dotnet-script#540)
filipw
reviewed
Nov 6, 2025
| Assert.False(thirdResultOfScriptB.Cached); | ||
| } | ||
|
|
||
| [Fact] |
Member
There was a problem hiding this comment.
could you additionally update these tests so that all of them are executed for both default cache path and custom path?
Member
|
Thanks a lot for the PR! I think this is a very welcome addition 😄 |
filipw
reviewed
Nov 6, 2025
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <Description>A cross platform library allowing you to run C# (CSX) scripts with support for debugging and inline NuGet packages. Based on Roslyn.</Description> | ||
| <VersionPrefix>1.6.0</VersionPrefix> |
Member
There was a problem hiding this comment.
could you rev all of these up to 1.7.0?
Member
|
The linux test failures are unrelated to your PR. They will be resolved once we merge #779 |
Contributor
Author
Ah, I was wondering about these errors. Good to know, thanks |
Member
|
thanks! |
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.
Added a new command-line option "--cache-path" (or "-p") to allow users to specify the temporary directory used to build the script. This is equivalent to the 'DOTNET_SCRIPT_CACHE_LOCATION' environment variable but is far more convenient when scripts are run as part of MSBuild. In particular, parallel runs of a script can specify different cache paths preventing the "script.csproj is in use" error that can happen. (Re: issues #507, #596, #540)
For example,