Skip to content

Commit

Permalink
FIX: Moves NonExistentFile to all project types (#162)
Browse files Browse the repository at this point in the history
For some reason in 6.0.400, CoreCompile was not getting executed and therfore we couldn't read the FscCommandLineArgs.  Hopefully addresses ionide/ionide-vscode-fsharp#1748
  • Loading branch information
TheAngryByrd authored Aug 20, 2022
1 parent f48168c commit 93d7afe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.201",
"version": "6.0.400",
"rollForward": "minor"
}
}
4 changes: 1 addition & 3 deletions src/Ionide.ProjInfo/Library.fs
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,12 @@ module ProjectLoader =
"DefineExplicitDefaults", "true"
"BuildProjectReferences", "false"
"UseCommonOutputDirectory", "false"
"NonExistentFile", Path.Combine("__NonExistentSubDir__", "__NonExistentFile__") // Required by the Clean Target
if tfm.IsSome then
"TargetFramework", tfm.Value
if path.EndsWith ".csproj" then
"NonExistentFile", Path.Combine("__NonExistentSubDir__", "__NonExistentFile__")
"DotnetProjInfo", "true"
yield! globalProperties ]


///<summary>
/// These are a list of build targets that are run during a design-time build (mostly).
/// The list comes partially from <see href="https://github.com/dotnet/project-system/blob/main/docs/design-time-builds.md#targets-that-run-during-design-time-builds">the msbuild docs</see>
Expand Down
5 changes: 3 additions & 2 deletions test/Ionide.ProjInfo.Tests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,8 @@ let testRender3 toolsPath workspaceLoader (workspaceFactory: ToolsPath -> IWorks

let loader = workspaceFactory toolsPath

let parsed = loader.LoadProjects [ projPath ] |> Seq.toList
let projDir = Path.GetDirectoryName projPath
let parsed = loader.LoadProjects([ projPath ], [], BinaryLogGeneration.Within(DirectoryInfo projDir)) |> Seq.toList

let l1Parsed = parsed |> expectFind l1 "the C# lib"

Expand Down Expand Up @@ -1397,4 +1398,4 @@ let tests toolsPath =
testProjectLoadBadData
expensiveTests toolsPath WorkspaceLoader.Create
csharpLibTest toolsPath WorkspaceLoader.Create
]
]

0 comments on commit 93d7afe

Please sign in to comment.