-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Set intermediate path sooner #74229
Set intermediate path sooner #74229
Conversation
src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/WorkspaceProject.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/ProjectSystem/ProjectSystemProjectFactory.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/ProjectSystem/ProjectSystemProjectFactory.cs
Outdated
Show resolved
Hide resolved
…stemProjectFactory.cs
@@ -160,6 +160,7 @@ public async Task SetBuildSystemPropertiesAsync(IReadOnlyDictionary<string, stri | |||
switch (name) | |||
{ | |||
case "AssemblyName": _project.AssemblyName = value; break; | |||
case "IntermediateAssembly": _project.CompilationOutputAssemblyFilePath = GetFullyQualifiedPath(valueOrNull); break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetFullyQualifiedPath
has a bug, where it won't work for a relative path, because it does Path.Combine(_project.FilePath, value)
, but _project.FilePath
is the full path to the actual project file (ie, .csproj
file). When value
is an absolute path, then that will be returned and all will be good, but the intermediate output path is a relative path, so we'd end up with CompilationOutputAssemblyFilePath
being something like C:\Goo\Bar.csproj\obj\Debug\net8.0
which is not correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, that was your comment about why it wasn't completely broken. The paths are coming in as absolute path so Path.Combine
is just using the second parameter. I think what I did will fix the issue
…oslyn into intermediate_path_fix
Pulled from #70913 (thanks @davidwengier!)
Razor uses the intermediate path for project key. Now that we're removing the file system from being involved in communicating project data, we need to make sure we're communicating the right data.
This fixes issues found in dotnet/vscode-csharp#7273 and will unblock that insertion