From aaafa3da3a7a3eb6b7bae45eb344dfa3638c08a0 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Fri, 26 Feb 2021 21:56:38 -0800 Subject: [PATCH] Refactor vsix (#11159) --- DEVGUIDE.md | 4 +- VisualFSharp.sln | 15 + azure-pipelines.yml | 2 +- .../Microsoft.FSharp.Compiler.MSBuild.csproj | 70 ++--- .../Microsoft.FSharp.IDE.csproj | 5 +- setup/Swix/Microsoft.FSharp.IDE/Package.swr | 6 +- .../shims/Microsoft.FSharp.NetSdk.Shim.props | 2 +- .../Microsoft.FSharp.NetSdk.Shim.targets | 2 +- ...osoft.FSharp.Overrides.NetSdk.Shim.targets | 2 +- setup/shims/Microsoft.FSharp.Shim.targets | 2 +- .../Microsoft.Portable.FSharp.Shim.targets | 2 +- .../FSharp.Compiler.Service.fsproj | 19 -- .../FSharp.DependencyManager.Utilities.fs | 4 +- .../Properties/launchSettings.json | 2 +- .../VisualFSharp.Core.targets | 256 ++++++++++++++++++ .../VisualFSharpFull/VisualFSharpDebug.csproj | 55 ++++ .../VisualFSharpFull/VisualFSharpFull.csproj | 256 +----------------- .../SetGlobalPropertiesForSdkProjects.fs | 2 +- vsintegration/src/FSharp.VS.FSI/sessions.fs | 4 +- 19 files changed, 385 insertions(+), 325 deletions(-) create mode 100644 vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets create mode 100644 vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj diff --git a/DEVGUIDE.md b/DEVGUIDE.md index e1c8811019a..a5e92c63e6d 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -122,7 +122,7 @@ See (DEVGUIDE.md#Developing on Windows) for instructions to install what is need ### Quickly see your changes locally -First, ensure that `VisualFSharpFull` is the startup project. +First, ensure that `VisualFSharpDebug` is the startup project. Then, use the **f5** or **ctrl+f5** keyboard shortcuts to test your tooling changes. The former will debug a new instance of Visual Studio. The latter will launch a new instance of Visual Studio, but with your changes installed. @@ -136,7 +136,7 @@ If you'd like to "run with your changes", you can produce a VSIX and install it ``` VSIXInstaller.exe /u:"VisualFSharp" -VSIXInstaller.exe artifacts\VSSetup\Release\VisualFSharpFull.vsix +VSIXInstaller.exe artifacts\VSSetup\Release\VisualFSharpDebug.vsix ``` It's important to use `Release` if you want to see if your changes have had a noticeable performance impact. diff --git a/VisualFSharp.sln b/VisualFSharp.sln index 55dc1c07fed..0efd9f77e6d 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -158,6 +158,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", " EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service.Tests", "tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj", "{14F3D3D6-5C8E-43C2-98A2-17EA704D4DEA}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VisualFSharpDebug", "vsintegration\Vsix\VisualFSharpFull\VisualFSharpDebug.csproj", "{A422D673-8E3B-4924-821B-DD3174173426}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -924,6 +926,18 @@ Global {14F3D3D6-5C8E-43C2-98A2-17EA704D4DEA}.Release|Any CPU.Build.0 = Release|Any CPU {14F3D3D6-5C8E-43C2-98A2-17EA704D4DEA}.Release|x86.ActiveCfg = Release|Any CPU {14F3D3D6-5C8E-43C2-98A2-17EA704D4DEA}.Release|x86.Build.0 = Release|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Debug|x86.ActiveCfg = Debug|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Debug|x86.Build.0 = Debug|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Proto|Any CPU.ActiveCfg = Debug|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Proto|Any CPU.Build.0 = Debug|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Proto|x86.ActiveCfg = Debug|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Proto|x86.Build.0 = Debug|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Release|Any CPU.Build.0 = Release|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Release|x86.ActiveCfg = Release|Any CPU + {A422D673-8E3B-4924-821B-DD3174173426}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -998,6 +1012,7 @@ Global {0610FB97-7C15-422A-86FD-32335C6DF14D} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {B5A9BBD9-2F45-4722-A6CA-BAE3C64CD4E2} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77} {14F3D3D6-5C8E-43C2-98A2-17EA704D4DEA} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} + {A422D673-8E3B-4924-821B-DD3174173426} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {48EDBBBE-C8EE-4E3C-8B19-97184A487B37} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e918c9d4d09..64ac57d9ddb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -156,7 +156,7 @@ stages: - task: PublishBuildArtifacts@1 displayName: Publish Artifact Nightly inputs: - PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\VisualFSharpFull.vsix' + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\VisualFSharpDebug.vsix' ArtifactName: 'Nightly' condition: succeeded() - task: PublishBuildArtifacts@1 diff --git a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj index 26456ed2a85..31905dd9a1a 100644 --- a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj +++ b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj @@ -41,11 +41,11 @@ <_Line> @@ -74,35 +74,37 @@ vs.dependencies version=$(VsixVersion) type=Required -folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp" - file source="$(BinariesFolder)\fsc\$(Configuration)\$(TargetFramework)\fsc.exe" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe" - file source="$(BinariesFolder)\fsc\$(Configuration)\$(TargetFramework)\fsc.exe.config" - file source="$(BinariesFolder)\fsi\$(Configuration)\$(TargetFramework)\fsi.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X86 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsi.exe" - file source="$(BinariesFolder)\fsi\$(Configuration)\$(TargetFramework)\fsi.exe.config" - file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X64 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsiAnyCpu.exe" - file source="$(BinariesFolder)\fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe.config" - file source="$(BinariesFolder)\FSharp.Compiler.Interactive.Settings\$(Configuration)\netstandard2.0\FSharp.Compiler.Interactive.Settings.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Service.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Buffers.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Collections.Immutable.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Memory.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Numerics.Vectors.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Reflection.Metadata.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Resources.Extensions.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Runtime.CompilerServices.Unsafe.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Threading.Tasks.Dataflow.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\Microsoft.Build.Framework.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\Microsoft.Build.Tasks.Core.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\Microsoft.Build.Utilities.Core.dll" - file source="$(BinariesFolder)\FSharp.Compiler.Server.Shared\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.xml" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\netstandard2.0\FSharp.Build.dll" vs.file.ngen=no vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.Portable.FSharp.Targets" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.FSharp.NetSdk.props" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.FSharp.NetSdk.targets" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.FSharp.Overrides.NetSdk.targets" - file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.FSharp.Targets" +folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools" + file source="$(BinariesFolder)fsc\$(Configuration)\$(TargetFramework)\fsc.exe" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fsc.exe" + file source="$(BinariesFolder)fsc\$(Configuration)\$(TargetFramework)\fsc.exe.config" + file source="$(BinariesFolder)fsi\$(Configuration)\$(TargetFramework)\fsi.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X86 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fsi.exe" + file source="$(BinariesFolder)fsi\$(Configuration)\$(TargetFramework)\fsi.exe.config" + file source="$(BinariesFolder)fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X64 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fsiAnyCpu.exe" + file source="$(BinariesFolder)fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe.config" + file source="$(BinariesFolder)FSharp.Compiler.Interactive.Settings\$(Configuration)\netstandard2.0\FSharp.Compiler.Interactive.Settings.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)FSharp.Compiler.Interactive.Settings\$(Configuration)\netstandard2.0\FSharp.Compiler.Interactive.Settings.xml" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\netstandard2.0\FSharp.Compiler.Service.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\netstandard2.0\FSharp.Compiler.Service.xml" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Buffers.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Collections.Immutable.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Memory.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Numerics.Vectors.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Reflection.Metadata.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Resources.Extensions.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Runtime.CompilerServices.Unsafe.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\System.Threading.Tasks.Dataflow.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\Microsoft.Build.Framework.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\Microsoft.Build.Tasks.Core.dll" + file source="$(BinariesFolder)FSharp.Compiler.Service\$(Configuration)\$(TargetFramework)\Microsoft.Build.Utilities.Core.dll" + file source="$(BinariesFolder)FSharp.Compiler.Server.Shared\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.xml" + file source="$(BinariesFolder)FSharp.Build\$(Configuration)\netstandard2.0\FSharp.Build.dll" vs.file.ngen=no vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.Portable.FSharp.Targets" + file source="$(BinariesFolder)FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.FSharp.NetSdk.props" + file source="$(BinariesFolder)FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.FSharp.NetSdk.targets" + file source="$(BinariesFolder)FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.FSharp.Overrides.NetSdk.targets" + file source="$(BinariesFolder)FSharp.Build\$(Configuration)\netstandard2.0\Microsoft.FSharp.Targets" @(_BuiltSwrLines) ]]> diff --git a/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj b/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj index 8de21df6d95..834d95d3bf1 100644 --- a/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj +++ b/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.csproj @@ -31,8 +31,7 @@ <_Dependency Include="FSharp.VS.FSI" Version="$(VSAssemblyVersion)" /> - + $(InsertionDir)\DevDivPackages $(DevDivPackagesDir)\DependentAssemblyVersions.csv @@ -46,4 +45,4 @@ - + \ No newline at end of file diff --git a/setup/Swix/Microsoft.FSharp.IDE/Package.swr b/setup/Swix/Microsoft.FSharp.IDE/Package.swr index 8184815f837..ea75aebf1da 100644 --- a/setup/Swix/Microsoft.FSharp.IDE/Package.swr +++ b/setup/Swix/Microsoft.FSharp.IDE/Package.swr @@ -8,6 +8,10 @@ vs.dependencies version=$(VsixVersion) type=Required + vs.dependency id=Microsoft.FSharp.Compiler + version=$(VsixVersion) + type=Required + vs.dependency id=Microsoft.FSharp.VSIX.Full.Core version=$(VsixVersion) type=Required @@ -20,4 +24,4 @@ folder "InstallDir:Common7\IDE\NewScriptItems" folder "InstallDir:Common7\IDE\NewFileItems" file source="$(SetupResourcesDir)\NewFileDialog\General\NewFSharpFileItems.vsdir" file source="$(SetupResourcesDir)\NewFileDialog\General\File.fs" - file source="$(SetupResourcesDir)\NewFileDialog\General\Script.fsx" + file source="$(SetupResourcesDir)\NewFileDialog\General\Script.fsx" \ No newline at end of file diff --git a/setup/shims/Microsoft.FSharp.NetSdk.Shim.props b/setup/shims/Microsoft.FSharp.NetSdk.Shim.props index 203b37e5734..28907c3c23c 100644 --- a/setup/shims/Microsoft.FSharp.NetSdk.Shim.props +++ b/setup/shims/Microsoft.FSharp.NetSdk.Shim.props @@ -1,6 +1,6 @@ - + diff --git a/setup/shims/Microsoft.FSharp.NetSdk.Shim.targets b/setup/shims/Microsoft.FSharp.NetSdk.Shim.targets index f5212ec914a..b9e0ea907e3 100644 --- a/setup/shims/Microsoft.FSharp.NetSdk.Shim.targets +++ b/setup/shims/Microsoft.FSharp.NetSdk.Shim.targets @@ -1,6 +1,6 @@ - + diff --git a/setup/shims/Microsoft.FSharp.Overrides.NetSdk.Shim.targets b/setup/shims/Microsoft.FSharp.Overrides.NetSdk.Shim.targets index c7c7b8a477b..cfd530eefd4 100644 --- a/setup/shims/Microsoft.FSharp.Overrides.NetSdk.Shim.targets +++ b/setup/shims/Microsoft.FSharp.Overrides.NetSdk.Shim.targets @@ -1,6 +1,6 @@ - + diff --git a/setup/shims/Microsoft.FSharp.Shim.targets b/setup/shims/Microsoft.FSharp.Shim.targets index 62b798f5e78..53acced723e 100644 --- a/setup/shims/Microsoft.FSharp.Shim.targets +++ b/setup/shims/Microsoft.FSharp.Shim.targets @@ -1,6 +1,6 @@ - + diff --git a/setup/shims/Microsoft.Portable.FSharp.Shim.targets b/setup/shims/Microsoft.Portable.FSharp.Shim.targets index 5aecfd384fa..f24c26561d8 100644 --- a/setup/shims/Microsoft.Portable.FSharp.Shim.targets +++ b/setup/shims/Microsoft.Portable.FSharp.Shim.targets @@ -1,6 +1,6 @@ - + diff --git a/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj index de74e8bf565..fcf2e371331 100644 --- a/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj +++ b/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj @@ -21,25 +21,6 @@ $(IntermediateOutputPath)$(TargetFramework)\ - - - $(BaseOutputPath)\$(Configuration)\$(TargetFramework) - - - - - - - - - - - - - - - - FSharp.Compiler.Service FSharp.Compiler.Service.nuspec diff --git a/src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs b/src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs index 3b1d6da172d..2166d267771 100644 --- a/src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs +++ b/src/fsharp/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs @@ -68,7 +68,7 @@ module internal Utilities = |> List.map (fun option -> split option) // Path to the directory containing the fsharp compilers - let fsharpCompilerPath = Path.GetDirectoryName(typeof.GetTypeInfo().Assembly.Location) + let fsharpCompilerPath = Path.Combine(Path.GetDirectoryName(typeof.GetTypeInfo().Assembly.Location), "Tools") // We are running on dotnet core if the executing mscorlib is System.Private.CoreLib let isRunningOnCoreClr = (typeof.Assembly).FullName.StartsWith("System.Private.CoreLib", StringComparison.InvariantCultureIgnoreCase) @@ -98,7 +98,7 @@ module internal Utilities = null let roots = [| - Path.GetFullPath(Path.Combine(fsharpCompilerPath, "../../../../..")) + Path.GetFullPath(Path.Combine(fsharpCompilerPath, "../../../../../..")) vsRootFromVSAPPIDDIR Environment.GetEnvironmentVariable("VSINSTALLDIR") |] diff --git a/vsintegration/Vsix/VisualFSharpFull/Properties/launchSettings.json b/vsintegration/Vsix/VisualFSharpFull/Properties/launchSettings.json index 18d884aa2e7..a3e00ad6bec 100644 --- a/vsintegration/Vsix/VisualFSharpFull/Properties/launchSettings.json +++ b/vsintegration/Vsix/VisualFSharpFull/Properties/launchSettings.json @@ -1,6 +1,6 @@ { "profiles": { - "VisualFSharpFull": { + "VisualFSharpDebug": { "commandName": "Executable", "executablePath": "$(DevEnvDir)devenv.exe", "commandLineArgs": "/rootsuffix $(VSSDKTargetPlatformRegRootSuffix) /log" diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets b/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets new file mode 100644 index 00000000000..c577e0e77ee --- /dev/null +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharp.Core.targets @@ -0,0 +1,256 @@ + + + + + + + Designer + + + + RegisterFsharpPackage.pkgdef + {{FSProductVersion}} + $(FSProductVersion) + {{FSLanguageVersion}} + $(FSLanguageVersion) + true + RegisterFsharpPackage.pkgdef + + + + PreserveNewest + License.txt + true + + + + + + {702A7979-BCF9-4C41-853E-3ADFC9897890} + FSharp.Build + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + TargetFramework=$(DependencyTargetFramework) + + + + {649FA588-F02E-457C-9FCF-87E46407481E} + FSharp.Compiler.Interactive.Settings + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + TargetFramework=netstandard2.0 + + + + {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} + FSharp.Compiler.Server.Shared + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + TargetFramework=$(DependencyTargetFramework) + + + + {A59DB8AE-8044-41A5-848A-800A7FF31C93} + FSharp.Compiler.Service + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + TargetFramework=$(DependencyTargetFramework) + + + + {DED3BBD7-53F4-428A-8C9F-27968E768605} + FSharp.Core + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + TargetFramework=netstandard2.0 + + + + false + False + + + + false + False + + + + false + False + + + + {65e0e82a-eace-4787-8994-888674c2fe87} + FSharp.Editor + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + + + + {c4586a06-1402-48bc-8e35-a1b8642f895b} + FSharp.UIResources + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + True + + + + {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} + FSharp.LanguageService.Base + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + + + + {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F} + FSharp.LanguageService + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + + + + {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7} + ProjectSystem.Base + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + + + + {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} + ProjectSystem + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + + + + {FCFB214C-462E-42B3-91CA-FC557EFEE74F} + FSharp.PropertiesPages + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + + + + {991DCF75-C2EB-42B6-9A0D-AA1D2409D519} + FSharp.VS.FSI + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + + + + {6ba13aa4-c25f-480f-856b-8e8000299a72} + AppConfig + ItemTemplates + TemplateProjectOutputGroup%3b + false + True + + + + {12ac2813-e895-4aaa-ae6c-94e21da09f64} + CodeFile + ItemTemplates + TemplateProjectOutputGroup%3b + false + True + + + + {0385564F-07B4-4264-AB8A-17C393E9140C} + ResourceFile + ItemTemplates + TemplateProjectOutputGroup%3b + false + True + + + + {a333b85a-dc23-49b6-9797-b89a7951e92d} + ScriptFile + ItemTemplates + TemplateProjectOutputGroup%3b + false + True + + + + {e3fdd4ac-46b6-4b9f-b672-317d1202cc50} + SignatureFile + ItemTemplates + TemplateProjectOutputGroup%3b + false + True + + + + {d11fc318-8f5d-4c8c-9287-ab40a016d13c} + TextFile + ItemTemplates + TemplateProjectOutputGroup%3b + false + True + + + + {1fb1dd07-06aa-45b4-b5ac-20ff5bee98b6} + XMLFile + ItemTemplates + TemplateProjectOutputGroup%3b + false + True + + + + + + + + + \ No newline at end of file diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj new file mode 100644 index 00000000000..3c667559ccb --- /dev/null +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpDebug.csproj @@ -0,0 +1,55 @@ + + + + + + Library + Microsoft\FSharp + netcoreapp1.0 + true + net472 + + + + + + + + + + + + + + Tools/%(_XlfLanguages.Identity) + true + + + + Tools/%(_XlfLanguages.Identity) + true + + + + Tools/%(_XlfLanguages.Identity) + true + + + + Tools + true + + + + Tools + true + + + + Tools + true + + + + + diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj index eec721f744c..c77244fede9 100644 --- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj @@ -10,258 +10,6 @@ net472 - - - Designer - + - - RegisterFsharpPackage.pkgdef - {{FSProductVersion}} - $(FSProductVersion) - {{FSLanguageVersion}} - $(FSLanguageVersion) - true - RegisterFsharpPackage.pkgdef - - - - PreserveNewest - License.txt - true - - - - - - {702A7979-BCF9-4C41-853E-3ADFC9897890} - FSharp.Build - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - TargetFramework=$(DependencyTargetFramework) - - - {649FA588-F02E-457C-9FCF-87E46407481E} - FSharp.Compiler.Interactive.Settings - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - TargetFramework=netstandard2.0 - - - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} - FSharp.Compiler.Server.Shared - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - TargetFramework=$(DependencyTargetFramework) - - - {A59DB8AE-8044-41A5-848A-800A7FF31C93} - FSharp.Compiler.Service - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - TargetFramework=$(DependencyTargetFramework) - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - TargetFramework=netstandard2.0 - - - {8B3E283D-B5FE-4055-9D80-7E3A32F3967B} - FsiAnyCpu - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b - DebugSymbolsProjectOutputGroup%3b - true - [installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsiAnyCpu.exe - X64 - 2 - True - TargetFramework=$(DependencyTargetFramework) - - - {D0E98C0D-490B-4C61-9329-0862F6E87645} - Fsi - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b - DebugSymbolsProjectOutputGroup%3b - true - [installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsi.exe - X86 - 2 - True - TargetFramework=$(DependencyTargetFramework) - - - {C94C257C-3C0A-4858-B5D8-D746498D1F08} - fsc - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b - DebugSymbolsProjectOutputGroup%3b - true - [installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe - All - 2 - True - TargetFramework=$(DependencyTargetFramework) - - - {65e0e82a-eace-4787-8994-888674c2fe87} - FSharp.Editor - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - - - {c4586a06-1402-48bc-8e35-a1b8642f895b} - FSharp.UIResources - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} - FSharp.LanguageService.Base - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - - - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F} - FSharp.LanguageService - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - - - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7} - ProjectSystem.Base - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - - - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} - ProjectSystem - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - - - {FCFB214C-462E-42B3-91CA-FC557EFEE74F} - FSharp.PropertiesPages - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - - - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519} - FSharp.VS.FSI - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - true - All - 2 - True - - - - {6ba13aa4-c25f-480f-856b-8e8000299a72} - AppConfig - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {12ac2813-e895-4aaa-ae6c-94e21da09f64} - CodeFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {0385564F-07B4-4264-AB8A-17C393E9140C} - ResourceFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {a333b85a-dc23-49b6-9797-b89a7951e92d} - ScriptFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {e3fdd4ac-46b6-4b9f-b672-317d1202cc50} - SignatureFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {d11fc318-8f5d-4c8c-9287-ab40a016d13c} - TextFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {1fb1dd07-06aa-45b4-b5ac-20ff5bee98b6} - XMLFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - - - - - - + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs b/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs index 3cfb5bf14ca..6aa643def1d 100644 --- a/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs +++ b/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs @@ -23,5 +23,5 @@ type internal SetGlobalPropertiesForSdkProjects inherit StaticGlobalPropertiesProviderBase(projectService.Services) override _.GetGlobalPropertiesAsync(_cancellationToken: CancellationToken): Task> = - let properties = Empty.PropertiesMap.Add("FSharpCompilerPath", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)) + let properties = Empty.PropertiesMap.Add("FSharpCompilerPath", Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Tools")) Task.FromResult>(properties) diff --git a/vsintegration/src/FSharp.VS.FSI/sessions.fs b/vsintegration/src/FSharp.VS.FSI/sessions.fs index b8649fa7fb2..b7fea42c484 100644 --- a/vsintegration/src/FSharp.VS.FSI/sessions.fs +++ b/vsintegration/src/FSharp.VS.FSI/sessions.fs @@ -151,7 +151,7 @@ let determineFsiPath () = let thisAssembly : System.Reflection.Assembly = typeof.Assembly let thisAssemblyDirectory = thisAssembly.Location |> Path.GetDirectoryName // Use the quick-development path if available - Path.Combine(thisAssemblyDirectory,fsiExeName() ) + Path.Combine(thisAssemblyDirectory, "Tools", fsiExeName() ) let fsiExe = // Choose VS extension path, if it exists (for developers) @@ -164,7 +164,7 @@ let determineFsiPath () = // Try the registry key let fsbin = match Internal.Utilities.FSharpEnvironment.BinFolderOfDefaultFSharpCompiler(None) with Some(s) -> s | None -> "" - let fsiRegistryPath = Path.Combine(fsbin, fsiExeName() ) + let fsiRegistryPath = Path.Combine(fsbin, "Tools", fsiExeName() ) if File.Exists(fsiRegistryPath) then fsiRegistryPath else // Otherwise give up