diff --git a/global.json b/global.json index 807ee97e..07b9742b 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.201", + "version": "6.0.400", "rollForward": "minor" } } \ No newline at end of file diff --git a/src/Ionide.ProjInfo/Library.fs b/src/Ionide.ProjInfo/Library.fs index 87300dca..51055a58 100644 --- a/src/Ionide.ProjInfo/Library.fs +++ b/src/Ionide.ProjInfo/Library.fs @@ -352,13 +352,39 @@ 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 ] + // let getGlobalProps (path: string) (tfm: string option) (globalProperties: (string * string) list) = + // dict [ + // "DesignTimeBuild", "true" + // "BuildingProject", "false" + // "BuildProjectReferences", "false" + // "SkipCompilerExecution", "false" + // "DisableRarCache", "false" + // "AutoGenerateBindingRedirects", "false" + // "CopyOutputSymbolsToOutputDirectory", "false" + // "CopyDocumentationFileToOutputDirectory", "false" + // "ComputeNETCoreBuildOutputFiles", "false" + // "SkipCopyBuildProduct", "true" + // "AddModules", "false" + // "NonExistentFile", Path.Combine("__NonExistentSubDir__", "__NonExistentFile__") + // "UseCommonOutputDirectory", "true" + // "GeneratePackageOnBuild", "false" + // "ProvideCommandLineArgs", "true" + // "GeneratePackageOnBuild", "false" + // "Configuration", "Debug" + // "DefineExplicitDefaults", "true" + // if tfm.IsSome then + // "TargetFramework", tfm.Value + // if path.EndsWith ".csproj" then + // "NonExistentFile", Path.Combine("__NonExistentSubDir__", "__NonExistentFile__") + // "DotnetProjInfo", "true" + // yield! globalProperties ] + /// /// These are a list of build targets that are run during a design-time build (mostly). @@ -382,7 +408,8 @@ module ProjectLoader = "_ComputeNonExistentFileProperty" "CoreCompile" |] else - [| "ResolveAssemblyReferencesDesignTime" + [| // "Clean" + "ResolveAssemblyReferencesDesignTime" "ResolveProjectReferencesDesignTime" "ResolvePackageDependenciesDesignTime" "_GenerateCompileDependencyCache" diff --git a/test/Ionide.ProjInfo.Tests/Tests.fs b/test/Ionide.ProjInfo.Tests/Tests.fs index 8bc2f83e..5e6558ba 100644 --- a/test/Ionide.ProjInfo.Tests/Tests.fs +++ b/test/Ionide.ProjInfo.Tests/Tests.fs @@ -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" @@ -1397,4 +1398,4 @@ let tests toolsPath = testProjectLoadBadData expensiveTests toolsPath WorkspaceLoader.Create csharpLibTest toolsPath WorkspaceLoader.Create - ] + ] \ No newline at end of file