Remove fallback for obtaining file-based program XML when SDK is too old#80291
Closed
RikkiGibson wants to merge 1 commit intodotnet:mainfrom
Closed
Remove fallback for obtaining file-based program XML when SDK is too old#80291RikkiGibson wants to merge 1 commit intodotnet:mainfrom
RikkiGibson wants to merge 1 commit intodotnet:mainfrom
Conversation
JoeRobich
reviewed
Sep 16, 2025
| <Project> | ||
| <PropertyGroup> | ||
| <IncludeProjectNameInArtifactsPaths>false</IncludeProjectNameInArtifactsPaths> | ||
| <ArtifactsPath>{SecurityElement.Escape(artifactsPath)}</ArtifactsPath> |
Member
There was a problem hiding this comment.
In older SDKs ArtifactsPath doesn't exist. Consider settings the base output paths instead.
<BaseIntermediateOutputPath>{SecurityElement.Escape(artifactsPath)}\obj\</BaseIntermediateOutputPath>
<BaseOutputPath>{SecurityElement.Escape(artifactsPath)}\bin\</BaseOutputPath>
JoeRobich
reviewed
Sep 16, 2025
| Contract.ThrowIfFalse(PathUtilities.IsAbsolute(documentFilePath)); | ||
| var artifactsPath = GetArtifactsPath(documentFilePath); | ||
|
|
||
| var targetFramework = Environment.GetEnvironmentVariable("DOTNET_RUN_FILE_TFM") ?? "net10.0"; |
Member
There was a problem hiding this comment.
?? "net$(BundledNETCoreAppTargetFrameworkVersion)"
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.
Related to dotnet/vscode-csharp#8626
Currently working on reproing the original user's environment, but, I suspect that since only old SDKs were present, and that the bug report actually reported there was no .NET SDK detected, that this fallback path got used, and somehow the setup of
<ArtifactsPath>went wrong and resulted in artifacts being added to the user's source tree anyway.