Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit923f42c

Browse files
KevinRansombrettfo
authored andcommitted
Dev15.6 -- Fix multi-targetting / F# IDE (dotnet#4286)
* Fix multi-targetting* Refactor* address project relative paths
1 parent7c07673 commit923f42c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,21 @@ type internal FSharpProjectOptionsManager
226226

227227
[<Export>]
228228
/// This handles commandline change notifications from the Dotnet Project-system
229+
/// Prior to VS 15.7 path contained path to project file, post 15.7 contains target binpath
230+
/// binpath is more accurate because a project file can have multiple in memory projects based on configuration
229231
memberthis.HandleCommandLineChanges(path:string,sources:ImmutableArray<CommandLineSourceFile>,references:ImmutableArray<CommandLineReference>,options:ImmutableArray<string>)=
232+
letprojectId=
233+
match workspace.ProjectTracker.TryGetProjectByBinPath(path)with
234+
|true, project-> project.Id
235+
|false,_-> workspace.ProjectTracker.GetOrCreateProjectIdForPath(path, projectDisplayNameOf path)
236+
letproject= workspace.ProjectTracker.GetProject(projectId)
237+
letpath= project.ProjectFilePath
230238
letfullPath p=
231-
if Path.IsPathRooted(p)then p
239+
if Path.IsPathRooted(p)|| path=nullthen p
232240
else Path.Combine(Path.GetDirectoryName(path), p)
233241
letsourcePaths= sources|> Seq.map(fun s-> fullPath s.Path)|> Seq.toArray
234242
letreferencePaths= references|> Seq.map(fun r-> fullPath r.Reference)|> Seq.toArray
235-
letprojectId= workspace.ProjectTracker.GetOrCreateProjectIdForPath(path, projectDisplayNameOf path)
243+
236244
projectOptionsTable.SetOptionsWithProjectId(projectId, sourcePaths, referencePaths, options.ToArray())
237245
this.UpdateProjectInfoWithProjectId(projectId,"HandleCommandLineChanges", invalidateConfig=true)
238246

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp