From 2d0452a30c639bf8a3dd1c224b595baa94201fce Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Wed, 24 Jan 2018 11:25:35 -0800 Subject: [PATCH 01/14] move NuGet.Config to the root --- DEVGUIDE.md | 6 +++--- Makefile | 2 +- .nuget/NuGet.Config => NuGet.Config | 4 ++-- build.cmd | 2 +- fcs/build.fsx | 2 +- src/FSharpSource.targets | 8 ++++---- vsintegration/vsintegration.targets | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) rename .nuget/NuGet.Config => NuGet.Config (91%) diff --git a/DEVGUIDE.md b/DEVGUIDE.md index 432ca8104c4..7ae36f2d572 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -212,9 +212,9 @@ For **Release**: If you are behind a proxy server, NuGet client tool must be configured to use it: - .nuget\nuget.exe config -set http_proxy=proxy.domain.com:8080 -ConfigFile .nuget\NuGet.Config - .nuget\nuget.exe config -set http_proxy.user=user_name -ConfigFile .nuget\NuGet.Config - .nuget\nuget.exe config -set http_proxy.password=user_password -ConfigFile .nuget\NuGet.Config + .nuget\nuget.exe config -set http_proxy=proxy.domain.com:8080 -ConfigFile NuGet.Config + .nuget\nuget.exe config -set http_proxy.user=user_name -ConfigFile NuGet.Config + .nuget\nuget.exe config -set http_proxy.password=user_password -ConfigFile NuGet.Config Where you should set proper proxy address, user name and password. diff --git a/Makefile b/Makefile index 4427fe9f131..3d97ae5d640 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ include $(topsrcdir)mono/config.make .PHONY: restore build build-proto restore: - MONO_ENV_OPTIONS=$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config + MONO_ENV_OPTIONS=$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile ./NuGet.Config chmod u+x packages/FSharp.Compiler.Tools.4.1.27/tools/fsi.exe chmod u+x packages/FsLexYacc.7.0.6/build/fslex.exe chmod u+x packages/FsLexYacc.7.0.6/build/fsyacc.exe diff --git a/.nuget/NuGet.Config b/NuGet.Config similarity index 91% rename from .nuget/NuGet.Config rename to NuGet.Config index 225a0237b7f..8901d221b64 100644 --- a/.nuget/NuGet.Config +++ b/NuGet.Config @@ -7,8 +7,8 @@ - - + + diff --git a/build.cmd b/build.cmd index 97a98a8bfa5..ad81a9f6f35 100644 --- a/build.cmd +++ b/build.cmd @@ -599,7 +599,7 @@ if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :failure echo ---------------- Done with prepare, starting package restore ---------------- set _nugetexe="%~dp0.nuget\NuGet.exe" -set _nugetconfig="%~dp0.nuget\NuGet.Config" +set _nugetconfig="%~dp0NuGet.Config" if "%RestorePackages%" == "true" ( if "%BUILD_FCS%" == "1" ( diff --git a/fcs/build.fsx b/fcs/build.fsx index e8b30392ef5..58b56e99319 100644 --- a/fcs/build.fsx +++ b/fcs/build.fsx @@ -90,7 +90,7 @@ Target "Restore" (fun _ -> ExecProcess (fun info -> info.FileName <- FullName @"./../.nuget/NuGet.exe" info.WorkingDirectory <- FullName @"./.." - info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../.nuget/NuGet.Config")) TimeSpan.MaxValue + info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue if result <> 0 then failwithf "nuget restore %s failed" p ) diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets index 206259ae082..79806446c05 100644 --- a/src/FSharpSource.targets +++ b/src/FSharpSource.targets @@ -172,8 +172,8 @@ $(FSharpSourcesRoot)\..\.nuget\ -ConfigFile "$(NuGetConfigFile)" - "$(NuGetToolPath)NuGet.exe install -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config" - "$(NuGetToolPath)NuGet.exe" restore -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config" + "$(NuGetToolPath)NuGet.exe install -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)..\NuGet.Config" + "$(NuGetToolPath)NuGet.exe" restore -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)..\NuGet.Config" @@ -214,12 +214,12 @@ - + - + diff --git a/vsintegration/vsintegration.targets b/vsintegration/vsintegration.targets index 8e545af1f30..1e5448c5e60 100644 --- a/vsintegration/vsintegration.targets +++ b/vsintegration/vsintegration.targets @@ -2,6 +2,6 @@ - + From 7b1d303aaf139b8e44e78445c31f693b8c93a55d Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 25 Jan 2018 14:24:32 -0800 Subject: [PATCH 02/14] remove '-proto' file name suffixes --- build.cmd | 6 +-- fcs/FSharp.Compiler.Service/AssemblyInfo.fs | 2 +- src/FSharpSource.targets | 14 +++---- .../FSharp.Build-proto.fsproj | 38 +++++++------------ src/fsharp/FSharp.Build/FSharp.Build.fsproj | 24 ++---------- .../FSharp.Build/Microsoft.FSharp.Targets | 10 ++--- .../Microsoft.Portable.FSharp.Targets | 4 +- src/fsharp/FSharp.Core/FSharp.Core.fsproj | 2 +- src/fsharp/Fsc-proto/Fsc-proto.fsproj | 2 +- src/utils/sformat.fsi | 4 +- 10 files changed, 39 insertions(+), 67 deletions(-) diff --git a/build.cmd b/build.cmd index ad81a9f6f35..382491e3b4e 100644 --- a/build.cmd +++ b/build.cmd @@ -702,7 +702,7 @@ if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" ( echo ---------------- Done with package restore, starting proto ------------------------ rem Decide if Proto need building -if NOT EXIST Proto\net40\bin\fsc-proto.exe ( +if NOT EXIST Proto\net40\bin\fsc.exe ( set BUILD_PROTO=1 ) @@ -727,8 +727,8 @@ if "%BUILD_PROTO%" == "1" ( @if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :failure ) - echo %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo - %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo + echo %_ngenexe% install Proto\net40\bin\fsc.exe /nologo + %_ngenexe% install Proto\net40\bin\fsc.exe /nologo @if ERRORLEVEL 1 echo Error: NGen of proto failed && goto :failure ) diff --git a/fcs/FSharp.Compiler.Service/AssemblyInfo.fs b/fcs/FSharp.Compiler.Service/AssemblyInfo.fs index 356edd74d4e..90521fefd5a 100644 --- a/fcs/FSharp.Compiler.Service/AssemblyInfo.fs +++ b/fcs/FSharp.Compiler.Service/AssemblyInfo.fs @@ -34,7 +34,7 @@ open System.Runtime.InteropServices [] [] [] -[] +[] #endif [] diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets index 79806446c05..bd02df4ed02 100644 --- a/src/FSharpSource.targets +++ b/src/FSharpSource.targets @@ -126,8 +126,8 @@ $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFrameworkOutputDirectory)\bin $(FSharpSourcesRoot)\..\Proto\$(ProtoFlavour)\bin - fsc-proto.exe - ..\Proto\$(ProtoFlavour)\bin\Microsoft.Portable.FSharp-proto.targets + fsc.exe + ..\Proto\$(ProtoFlavour)\bin\Microsoft.Portable.FSharp.targets @@ -135,8 +135,8 @@ $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFrameworkOutputDirectory)\bin $(FSharpSourcesRoot)\..\Proto\$(ProtoFlavour)\bin - fsc-proto.exe - ..\Proto\$(ProtoFlavour)\bin\Microsoft.FSharp-proto.targets + fsc.exe + ..\Proto\$(ProtoFlavour)\bin\Microsoft.FSharp.targets @@ -298,13 +298,13 @@ Library - FSharp.Build-proto + FSharp.Build true LKG {D8BC791F-C1A9-49DC-9432-0F3090537555} @@ -39,30 +39,18 @@ WriteCodeFragment.fs - - Microsoft.FSharp-proto.targets - Microsoft.FSharp-proto.targets - {BuildSuffix} - -proto - - - Microsoft.Portable.FSharp-proto.targets - Microsoft.Portable.FSharp-proto.targets - {BuildSuffix} - -proto - - - Microsoft.FSharp.NetSdk-proto.props - Microsoft.FSharp.NetSdk-proto.props - {BuildSuffix} - -proto - - - Microsoft.FSharp.NetSdk-proto.targets - Microsoft.FSharp.NetSdk-proto.targets - {BuildSuffix} - -proto - + + Microsoft.FSharp.Targets + + + Microsoft.Portable.FSharp.Targets + + + Microsoft.FSharp.NetSdk.props + + + Microsoft.FSharp.NetSdk.targets + diff --git a/src/fsharp/FSharp.Build/FSharp.Build.fsproj b/src/fsharp/FSharp.Build/FSharp.Build.fsproj index a24d03a6ac3..50eaf56dbf6 100644 --- a/src/fsharp/FSharp.Build/FSharp.Build.fsproj +++ b/src/fsharp/FSharp.Build/FSharp.Build.fsproj @@ -31,26 +31,10 @@ - - Microsoft.FSharp.Targets - {BuildSuffix} - - - - Microsoft.Portable.FSharp.Targets - {BuildSuffix} - - - - Microsoft.FSharp.NetSdk.props - {BuildSuffix} - - - - Microsoft.FSharp.NetSdk.targets - {BuildSuffix} - - + + + + diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets index 4274f54af2a..bed6e890810 100644 --- a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets @@ -21,11 +21,11 @@ this file. $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - + + + + + true diff --git a/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets b/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets index d0a3df1cbce..54491a3c2a5 100644 --- a/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets +++ b/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets @@ -15,8 +15,8 @@ - - + + diff --git a/src/fsharp/FSharp.Core/FSharp.Core.fsproj b/src/fsharp/FSharp.Core/FSharp.Core.fsproj index 9ae918e37cf..31e132e9148 100644 --- a/src/fsharp/FSharp.Core/FSharp.Core.fsproj +++ b/src/fsharp/FSharp.Core/FSharp.Core.fsproj @@ -34,7 +34,7 @@ - + false diff --git a/src/fsharp/Fsc-proto/Fsc-proto.fsproj b/src/fsharp/Fsc-proto/Fsc-proto.fsproj index bddf355527a..a7e0cca04fe 100644 --- a/src/fsharp/Fsc-proto/Fsc-proto.fsproj +++ b/src/fsharp/Fsc-proto/Fsc-proto.fsproj @@ -10,7 +10,7 @@ x86 Exe $(NoWarn);62 - fsc-proto + fsc NO_EXTENSIONTYPING;$(DefineConstants) COMPILER;$(DefineConstants) $(NoWarn);35;44;62;9;60;86;47;1203 diff --git a/src/utils/sformat.fsi b/src/utils/sformat.fsi index 65f01c17858..fb768703e17 100644 --- a/src/utils/sformat.fsi +++ b/src/utils/sformat.fsi @@ -15,7 +15,7 @@ // all 4 cases the layout types are really different types. #if COMPILER -// fsc-proto.exe: +// fsc.exe: // FSharp.Compiler.Service.dll: namespace Internal.Utilities.StructuredFormat #else @@ -36,7 +36,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl type internal TaggedText = abstract Tag: LayoutTag abstract Text: string -#else // FSharp.Compiler.Service.dll, fsc-proto.exe +#else // FSharp.Compiler.Service.dll, fsc.exe /// Data representing joints in structured layouts of terms. The representation /// of this data type is only for the consumption of formatting engines. From a37642bc27afaf9f65ad4aa8ea06f0833275ae7c Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Wed, 7 Feb 2018 10:09:15 -0800 Subject: [PATCH 03/14] update xlf plugin --- packages.config | 2 +- src/FSharpSource.Settings.targets | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages.config b/packages.config index 48b6de3726b..28cc309ce11 100644 --- a/packages.config +++ b/packages.config @@ -73,6 +73,6 @@ - + diff --git a/src/FSharpSource.Settings.targets b/src/FSharpSource.Settings.targets index 2343e2ee977..635f509bed8 100644 --- a/src/FSharpSource.Settings.targets +++ b/src/FSharpSource.Settings.targets @@ -109,7 +109,7 @@ true true - 0.2.0-beta-000076 + 0.2.0-beta-000081 From b280da94a5bd6feaa4720b9594daa5a1dce22cec Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Mon, 5 Feb 2018 14:22:39 -0800 Subject: [PATCH 04/14] convert FSharp.Editor to the dotnet SDK --- FSharp.Directory.Build.props | 58 ++++ FSharp.Directory.Build.targets | 15 ++ VisualFSharp.sln | 10 +- build-everything.proj | 18 +- build/targets/AssemblyVersions.props | 44 +++ build/targets/CommonPackages.targets | 7 + .../GenerateAssemblyAttributes.targets | 76 ++++++ .../GenerateInternalsVisibleTo.targets | 43 +++ build/targets/GitHash.props | 2 +- build/targets/PackageVersions.props | 46 ++++ src/FSharp.Profiles.props | 59 ++++ src/FSharpSource.targets | 2 +- vsintegration/FSharp.Directory.Build.props | 12 + vsintegration/FSharp.Directory.Build.targets | 10 + .../fsharp-vsintegration-src-build.proj | 11 +- .../src/FSharp.Editor/Directory.Build.props | 3 + .../src/FSharp.Editor/Directory.Build.targets | 3 + .../src/FSharp.Editor/FSharp.Editor.fsproj | 254 +++++------------- 18 files changed, 469 insertions(+), 204 deletions(-) create mode 100644 FSharp.Directory.Build.props create mode 100644 FSharp.Directory.Build.targets create mode 100644 build/targets/AssemblyVersions.props create mode 100644 build/targets/CommonPackages.targets create mode 100644 build/targets/GenerateAssemblyAttributes.targets create mode 100644 build/targets/GenerateInternalsVisibleTo.targets create mode 100644 build/targets/PackageVersions.props create mode 100644 src/FSharp.Profiles.props create mode 100644 vsintegration/FSharp.Directory.Build.props create mode 100644 vsintegration/FSharp.Directory.Build.targets create mode 100644 vsintegration/src/FSharp.Editor/Directory.Build.props create mode 100644 vsintegration/src/FSharp.Editor/Directory.Build.targets diff --git a/FSharp.Directory.Build.props b/FSharp.Directory.Build.props new file mode 100644 index 00000000000..24d859697bc --- /dev/null +++ b/FSharp.Directory.Build.props @@ -0,0 +1,58 @@ + + + + + + + + Debug + $(MSBuildThisFileDirectory) + $(RepoRoot)src + $(RepoRoot)Tools + false + coreclr + net40 + $(RepoRoot)Proto\net40\bin + $(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\bin + $(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\obj\$(MSBuildProjectName)\ + + + + + + $(UserProfile)\.nuget\packages\ + + + + + false + true + $(FSharpSourcesRoot)\fsharp\msft.pubkey + true + true + + + + + true + + + + + false + true + + + + + fs + false + + + + + $(ProtoOutputPath)\Microsoft.FSharp.NetSdk.targets + $(ProtoFSharpTargetsShim) + + + diff --git a/FSharp.Directory.Build.targets b/FSharp.Directory.Build.targets new file mode 100644 index 00000000000..6150ad20709 --- /dev/null +++ b/FSharp.Directory.Build.targets @@ -0,0 +1,15 @@ + + + + $(AssemblyName) + $(MSBuildProjectName) + $(OutputPath)\$(ProjectName).xml + en;$(XlfLanguages) + + + + + + + + diff --git a/VisualFSharp.sln b/VisualFSharp.sln index 309f44851f6..7ab8602b3a3 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -18,7 +18,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.LanguageService", "v EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.LanguageService.Base", "vsintegration\src\FSharp.LanguageService.Base\FSharp.LanguageService.Base.csproj", "{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Editor", "vsintegration\src\FSharp.Editor\FSharp.Editor.fsproj", "{65E0E82A-EACE-4787-8994-888674C2FE87}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor", "vsintegration\src\FSharp.Editor\FSharp.Editor.fsproj", "{65E0E82A-EACE-4787-8994-888674C2FE87}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectSystem.Base", "vsintegration\src\FSharp.ProjectSystem.Base\Project\ProjectSystem.Base.csproj", "{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}" EndProject @@ -226,10 +226,10 @@ Global {65E0E82A-EACE-4787-8994-888674C2FE87}.Debug|Any CPU.Build.0 = Debug|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Debug|x86.ActiveCfg = Debug|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Debug|x86.Build.0 = Debug|Any CPU - {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|Any CPU.Build.0 = Proto|Any CPU - {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|x86.ActiveCfg = Proto|Any CPU - {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|x86.Build.0 = Proto|Any CPU + {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|Any CPU.ActiveCfg = Release|Any CPU + {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|Any CPU.Build.0 = Release|Any CPU + {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|x86.ActiveCfg = Release|Any CPU + {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|x86.Build.0 = Release|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Release|Any CPU.ActiveCfg = Release|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Release|Any CPU.Build.0 = Release|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Release|x86.ActiveCfg = Release|Any CPU diff --git a/build-everything.proj b/build-everything.proj index c4e264d41b4..625fc56409d 100644 --- a/build-everything.proj +++ b/build-everything.proj @@ -34,6 +34,9 @@ + + true + @@ -78,17 +81,19 @@ - - + + true + - - + + true + @@ -102,6 +107,11 @@ + + + + + AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} diff --git a/build/targets/AssemblyVersions.props b/build/targets/AssemblyVersions.props new file mode 100644 index 00000000000..a3084a8ef91 --- /dev/null +++ b/build/targets/AssemblyVersions.props @@ -0,0 +1,44 @@ + + + + + $([System.DateTime]::Now.ToString(yyyyMMdd.0)) + + + <_Build_Year>$(BUILD_BUILDNUMBER.Substring(0, 4)) + <_Build_Month>$(BUILD_BUILDNUMBER.Substring(4, 2)) + <_Build_Day>$(BUILD_BUILDNUMBER.Substring(6, 2)) + <_Build_Number>$(BUILD_BUILDNUMBER.Substring(9)) + $(_Build_Year).$(_Build_Month).$(_Build_Day).$(_Build_Number) + + 4.4.1.0 + $(FSCoreVersion) + 15.4.1.0 + + + $(BUILD_BUILDNUMBER.Split('.')[0].Substring(2)) + $(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0')) + $(BuildTimeStamp_Day)$(BuildTimeStamp_Number) + $(MicroBuildAssemblyVersion.Substring(0, $(MicroBuildAssemblyVersion.LastIndexOf('.')))) + $(MicroBuildAssemblyVersion_WithoutRevision).$(BuildTimeStamp) + + diff --git a/build/targets/CommonPackages.targets b/build/targets/CommonPackages.targets new file mode 100644 index 00000000000..fad7b976127 --- /dev/null +++ b/build/targets/CommonPackages.targets @@ -0,0 +1,7 @@ + + + + + + + diff --git a/build/targets/GenerateAssemblyAttributes.targets b/build/targets/GenerateAssemblyAttributes.targets new file mode 100644 index 00000000000..595ec97973e --- /dev/null +++ b/build/targets/GenerateAssemblyAttributes.targets @@ -0,0 +1,76 @@ + + + + + + $(IntermediateOutputPath)$(MSBuildProjectName).AssemblyVersion$(DefaultLanguageSourceExtension) + + 2003;$(NoWarn) + + + + + <_UseWriteCodeFragmentHack Condition="'$(OS)' == 'Unix' and '$(Language)' == 'F#'">true + + + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyCompanyAttribute"> + <_Parameter1>Microsoft Corporation + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyCopyrightAttribute"> + <_Parameter1>© Microsoft Corporation. All Rights Reserved. + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyDescriptionAttribute"> + <_Parameter1>$(AssemblyName) + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyFileVersionAttribute"> + <_Parameter1>$(Build_FileVersion) + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyInformationalVersionAttribute"> + <_Parameter1>$(MicroBuildAssemblyVersion). Commit Hash: $(GitHeadSha). + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyProductAttribute"> + <_Parameter1>Microsoft® F# + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyTitleAttribute"> + <_Parameter1>$(AssemblyName) + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyVersionAttribute"> + <_Parameter1>$(MicroBuildAssemblyVersion) + + + + + <_LinesToWrite Include="// <auto-generated>" /> + <_LinesToWrite Include="namespace FSharp" /> + <_LinesToWrite Include="open System" /> + <_LinesToWrite Include="open System.Reflection" /> + <_LinesToWrite Include="[<assembly: %(_AssemblyVersionAttributes.Identity)("%(_AssemblyVersionAttributes._Parameter1)")>]" /> + <_LinesToWrite Include="do()" /> + + + + + + + + + + + + + + + + + + + diff --git a/build/targets/GenerateInternalsVisibleTo.targets b/build/targets/GenerateInternalsVisibleTo.targets new file mode 100644 index 00000000000..85deaed0a1e --- /dev/null +++ b/build/targets/GenerateInternalsVisibleTo.targets @@ -0,0 +1,43 @@ + + + + $(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension) + + + + + false + + + + + + <_PublicKey>002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293 + + + <_PublicKey>002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee + + + <_InternalsVisibleToAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute"> + <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key) + <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == ''">%(InternalsVisibleTo.Identity), PublicKey=$(_PublicKey) + + + + + + + + + + + + diff --git a/build/targets/GitHash.props b/build/targets/GitHash.props index e03e736e512..30f2d03b915 100644 --- a/build/targets/GitHash.props +++ b/build/targets/GitHash.props @@ -14,7 +14,7 @@ Copied from RepoToolset. Might be slightly modified to adjust for the current F# --> - $(MSBuildThisFileDirectory)..\..\ + $(MSBuildThisFileDirectory)..\..\ diff --git a/build/targets/PackageVersions.props b/build/targets/PackageVersions.props new file mode 100644 index 00000000000..e1967c63a25 --- /dev/null +++ b/build/targets/PackageVersions.props @@ -0,0 +1,46 @@ + + + + + + 1.3.1 + + + 2.3.0-beta2-61719-01 + 2.3.0-beta2-61719-01 + 2.3.0-beta2-61719-01 + 2.3.0-beta2-61719-01 + + + 8.0.1 + 8.0.1 + 15.0.26201-alpha + 15.0.26201 + 15.0.26201 + 15.0.26201 + 15.0.26201 + 8.0.50727 + 15.0.26201 + 10.0.30319 + 11.0.50727 + 11.0.61030 + 7.10.6070 + 8.0.50727 + 15.1.192 + 7.0.4 + + + 1.0.30 + 10.0.2 + 0.2.0-beta-000081 + + + + + + $(MSBuildThisFileDirectory)..\..\Tools\dependencyUptake\PackageVersions.props + + + + + diff --git a/src/FSharp.Profiles.props b/src/FSharp.Profiles.props new file mode 100644 index 00000000000..8e03b11fdcf --- /dev/null +++ b/src/FSharp.Profiles.props @@ -0,0 +1,59 @@ + + + + + + $(DefineConstants);CROSS_PLATFORM_COMPILER + $(DefineConstants);ENABLE_MONO_SUPPORT + $(DefineConstants);BE_SECURITY_TRANSPARENT + $(DefineConstants);FX_LCIDFROMCODEPAGE + + + + $(DefineConstants);FX_PORTABLE_OR_NETSTANDARD + $(DefineConstants);NETSTANDARD1_6 + $(DefineConstants);FX_NO_APP_DOMAINS + $(DefineConstants);FX_NO_ARRAY_LONG_LENGTH + $(DefineConstants);FX_NO_BEGINEND_READWRITE + $(DefineConstants);FX_NO_BINARY_SERIALIZATION + $(DefineConstants);FX_NO_CONVERTER + $(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE + $(DefineConstants);FX_NO_CORHOST_SIGNER + $(DefineConstants);FX_NO_CRYPTO + $(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE + $(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS + $(DefineConstants);FX_NO_HEAPTERMINATION + $(DefineConstants);FX_NO_LINKEDRESOURCES + $(DefineConstants);FX_NO_LOADER_OPTIMIZATION + $(DefineConstants);FX_NO_SIMPLIFIED_LOADER + $(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START + $(DefineConstants);FX_NO_PDB_READER + $(DefineConstants);FX_NO_PDB_WRITER + $(DefineConstants);FX_NO_REFLECTION_MODULE_HANDLES + $(DefineConstants);FX_NO_REFLECTION_ONLY + $(DefineConstants);FX_NO_RUNTIMEENVIRONMENT + $(DefineConstants);FX_NO_SECURITY_PERMISSIONS + $(DefineConstants);FX_NO_SERVERCODEPAGES + $(DefineConstants);FX_NO_SYMBOLSTORE + $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION + $(DefineConstants);FX_NO_THREAD + $(DefineConstants);FX_NO_THREADABORT + $(DefineConstants);FX_NO_WAITONE_MILLISECONDS + $(DefineConstants);FX_NO_WEB_CLIENT + $(DefineConstants);FX_NO_WIN_REGISTRY + $(DefineConstants);FX_NO_WINFORMS + $(DefineConstants);FX_REDUCED_EXCEPTIONS + $(DefineConstants);FX_REDUCED_CONSOLE + $(DefineConstants);FX_RESHAPED_REFEMIT + $(DefineConstants);FX_RESHAPED_CONSOLE + $(DefineConstants);FX_RESHAPED_GLOBALIZATION + $(DefineConstants);FX_RESHAPED_REFLECTION + $(DefineConstants);FX_JITTRACKING_ISSUE + $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER + $(DefineConstants);FX_RESHAPED_REFLECTION_CORECLR + $(DefineConstants);FX_RESHAPED_MSBUILD + $(DefineConstants);FSI_TODO_NETCORE + $(OtherFlags) --simpleresolution + + + diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets index bd02df4ed02..6b60bb74e2b 100644 --- a/src/FSharpSource.targets +++ b/src/FSharpSource.targets @@ -136,7 +136,7 @@ $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFrameworkOutputDirectory)\bin $(FSharpSourcesRoot)\..\Proto\$(ProtoFlavour)\bin fsc.exe - ..\Proto\$(ProtoFlavour)\bin\Microsoft.FSharp.targets + ..\Proto\$(ProtoFlavour)\bin\Microsoft.FSharp.Targets diff --git a/vsintegration/FSharp.Directory.Build.props b/vsintegration/FSharp.Directory.Build.props new file mode 100644 index 00000000000..f0b6ff9fa92 --- /dev/null +++ b/vsintegration/FSharp.Directory.Build.props @@ -0,0 +1,12 @@ + + + + + + true + + + + + diff --git a/vsintegration/FSharp.Directory.Build.targets b/vsintegration/FSharp.Directory.Build.targets new file mode 100644 index 00000000000..5d99b165f39 --- /dev/null +++ b/vsintegration/FSharp.Directory.Build.targets @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/vsintegration/fsharp-vsintegration-src-build.proj b/vsintegration/fsharp-vsintegration-src-build.proj index 8a0d8a35828..2cbdfdfd876 100644 --- a/vsintegration/fsharp-vsintegration-src-build.proj +++ b/vsintegration/fsharp-vsintegration-src-build.proj @@ -1,5 +1,6 @@ + net40 @@ -15,6 +16,14 @@ + + + + - + + + + + diff --git a/vsintegration/src/FSharp.Editor/Directory.Build.props b/vsintegration/src/FSharp.Editor/Directory.Build.props new file mode 100644 index 00000000000..bb8eac309b1 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.Editor/Directory.Build.targets b/vsintegration/src/FSharp.Editor/Directory.Build.targets new file mode 100644 index 00000000000..ccd47cc0a9a --- /dev/null +++ b/vsintegration/src/FSharp.Editor/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj index 2563745eadc..08db608a411 100644 --- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj +++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj @@ -1,38 +1,34 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - FSharp - true - - - - Debug - AnyCPU - 2.0 - {65E0E82A-EACE-4787-8994-888674C2FE87} + net46 Library - FSharp.Editor - true - LIBRARY - v4.6 - $(NoWarn);75 - false - $(OtherFlags) --warnon:1182 --subsystemversion:6.00 - true - true + true false - false - true - true - true + $(NoWarn);75 + true + $(OtherFlags) --warnon:1182 --subsystemversion:6.00 + + + + + net462 + - + + + + true Microsoft.VisualStudio.FSharp.Editor.SR @@ -102,180 +98,54 @@ + + + + + + + + + - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - FSharp.LanguageService.Base - {1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef} - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - FSharp.UIResources - {c4586a06-1402-48bc-8e35-a1b8642f895b} - True - - - FSharp.VS.FSI - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - True - + - + + + - - - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.Intellisense.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.Intellisense.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Logic.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Logic.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.StandardClassification.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.StandardClassification.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.Text.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.Text.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Features.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Features.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Workspaces.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.LanguageServices.$(RoslynVersion)\lib\net46\Microsoft.VisualStudio.LanguageServices.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - True - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - $(FSharpSourcesRoot)\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 204fa0280bd23c4be10cc680dfa50b3801e2b5a8 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Tue, 6 Feb 2018 16:22:18 -0800 Subject: [PATCH 05/14] convert FSharp.LanguageService to the dotnet SDK --- VisualFSharp.sln | 10 +- build/targets/PackageVersions.props | 9 +- vsintegration/FSharp.Directory.Build.props | 3 - vsintegration/FSharp.Directory.Build.targets | 2 + .../fsharp-vsintegration-src-build.proj | 1 + .../Directory.Build.props | 3 + .../Directory.Build.targets | 3 + .../FSharp.LanguageService.fsproj | 247 ++++-------------- 8 files changed, 74 insertions(+), 204 deletions(-) create mode 100644 vsintegration/src/FSharp.LanguageService/Directory.Build.props create mode 100644 vsintegration/src/FSharp.LanguageService/Directory.Build.targets diff --git a/VisualFSharp.sln b/VisualFSharp.sln index 7ab8602b3a3..282b4a2b8cb 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -14,7 +14,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Server.Shar EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core", "src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.LanguageService", "vsintegration\src\FSharp.LanguageService\FSharp.LanguageService.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.LanguageService", "vsintegration\src\FSharp.LanguageService\FSharp.LanguageService.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.LanguageService.Base", "vsintegration\src\FSharp.LanguageService.Base\FSharp.LanguageService.Base.csproj", "{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}" EndProject @@ -202,10 +202,10 @@ Global {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Debug|x86.ActiveCfg = Debug|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Debug|x86.Build.0 = Debug|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|Any CPU.Build.0 = Proto|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|x86.ActiveCfg = Proto|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|x86.Build.0 = Proto|Any CPU + {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|Any CPU.ActiveCfg = Release|Any CPU + {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|Any CPU.Build.0 = Release|Any CPU + {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|x86.ActiveCfg = Release|Any CPU + {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|x86.Build.0 = Release|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Release|Any CPU.Build.0 = Release|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Release|x86.ActiveCfg = Release|Any CPU diff --git a/build/targets/PackageVersions.props b/build/targets/PackageVersions.props index e1967c63a25..ea69e133199 100644 --- a/build/targets/PackageVersions.props +++ b/build/targets/PackageVersions.props @@ -12,25 +12,28 @@ 2.3.0-beta2-61719-01 - 8.0.1 8.0.1 15.0.26201-alpha + 1.1.4322 15.0.26201 15.0.26201 15.0.26201 15.0.26201 8.0.50727 + 15.0.26201 15.0.26201 + 10.0.30319 10.0.30319 11.0.50727 11.0.61030 - 7.10.6070 - 8.0.50727 15.1.192 7.0.4 + 8.0.4 + 7.0.4 1.0.30 + 1.0.1 10.0.2 0.2.0-beta-000081 diff --git a/vsintegration/FSharp.Directory.Build.props b/vsintegration/FSharp.Directory.Build.props index f0b6ff9fa92..fa9f1e6747f 100644 --- a/vsintegration/FSharp.Directory.Build.props +++ b/vsintegration/FSharp.Directory.Build.props @@ -6,7 +6,4 @@ true - - diff --git a/vsintegration/FSharp.Directory.Build.targets b/vsintegration/FSharp.Directory.Build.targets index 5d99b165f39..b8d93f91d91 100644 --- a/vsintegration/FSharp.Directory.Build.targets +++ b/vsintegration/FSharp.Directory.Build.targets @@ -2,6 +2,8 @@ + + diff --git a/vsintegration/src/FSharp.LanguageService/Directory.Build.props b/vsintegration/src/FSharp.LanguageService/Directory.Build.props new file mode 100644 index 00000000000..bb8eac309b1 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.LanguageService/Directory.Build.targets b/vsintegration/src/FSharp.LanguageService/Directory.Build.targets new file mode 100644 index 00000000000..ccd47cc0a9a --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj index 72cb1c12636..f69eadc5438 100644 --- a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj +++ b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj @@ -1,37 +1,26 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - true - FSharp - v4.6 - true - true - false - false - true - true - true - true - - - Debug - AnyCPU - 2.0 - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F} + net46 Library - FSharp.LanguageService - true + true + false $(NoWarn);75 - LIBRARY - false + true $(OtherFlags) --warnon:1182 --subsystemversion:6.00 - - - - + + + + net462 + + @@ -44,9 +33,10 @@ + - - + + true Microsoft.VisualStudio.FSharp.LanguageService.Strings @@ -63,179 +53,50 @@ + + + + + + + + + + - + - - - - - + + + - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Logic.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Logic.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - True - - - FSharp.VS.FSI - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - True - - - FSharp.LanguageService.Base - {1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef} - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.Text.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.Text.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Features.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Features.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Workspaces.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.LanguageServices.$(RoslynVersion)\lib\net46\Microsoft.VisualStudio.LanguageServices.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - True - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + + From f1884fc856bc9c9131466f3b5e80bea8ae694e9b Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 8 Feb 2018 14:21:46 -0800 Subject: [PATCH 06/14] convert FSharp.ProjectSystem.FSharp to the dotnet SDK --- VisualFSharp.sln | 10 +- build/targets/PackageVersions.props | 2 + vsintegration/FSharp.Directory.Build.targets | 9 + .../fsharp-vsintegration-src-build.proj | 1 + .../src/FSharp.Editor/FSharp.Editor.fsproj | 10 +- .../FSharp.LanguageService.fsproj | 10 +- .../Directory.Build.props | 3 + .../Directory.Build.targets | 3 + .../ProjectSystem.fsproj | 252 ++++-------------- 9 files changed, 81 insertions(+), 219 deletions(-) create mode 100644 vsintegration/src/FSharp.ProjectSystem.FSharp/Directory.Build.props create mode 100644 vsintegration/src/FSharp.ProjectSystem.FSharp/Directory.Build.targets diff --git a/VisualFSharp.sln b/VisualFSharp.sln index 282b4a2b8cb..e974f0aa18d 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -24,7 +24,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectSystem.Base", "vsint EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FSharp.PropertiesPages", "vsintegration\src\FSharp.ProjectSystem.PropertyPages\FSharp.PropertiesPages.vbproj", "{FCFB214C-462E-42B3-91CA-FC557EFEE74F}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ProjectSystem", "vsintegration\src\FSharp.ProjectSystem.FSharp\ProjectSystem.fsproj", "{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ProjectSystem", "vsintegration\src\FSharp.ProjectSystem.FSharp\ProjectSystem.fsproj", "{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ProjectTemplates", "ProjectTemplates", "{C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}" EndProject @@ -262,10 +262,10 @@ Global {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Debug|Any CPU.Build.0 = Debug|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Debug|x86.ActiveCfg = Debug|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Debug|x86.Build.0 = Debug|Any CPU - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|Any CPU.Build.0 = Proto|Any CPU - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|x86.ActiveCfg = Proto|Any CPU - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|x86.Build.0 = Proto|Any CPU + {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|Any CPU.ActiveCfg = Release|Any CPU + {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|Any CPU.Build.0 = Release|Any CPU + {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|x86.ActiveCfg = Release|Any CPU + {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|x86.Build.0 = Release|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Release|Any CPU.ActiveCfg = Release|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Release|Any CPU.Build.0 = Release|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Release|x86.ActiveCfg = Release|Any CPU diff --git a/build/targets/PackageVersions.props b/build/targets/PackageVersions.props index ea69e133199..ae2e1d9672d 100644 --- a/build/targets/PackageVersions.props +++ b/build/targets/PackageVersions.props @@ -25,8 +25,10 @@ 10.0.30319 10.0.30319 11.0.50727 + 15.0.25123-Dev15Preview 11.0.61030 15.1.192 + 12.0.4 7.0.4 8.0.4 7.0.4 diff --git a/vsintegration/FSharp.Directory.Build.targets b/vsintegration/FSharp.Directory.Build.targets index b8d93f91d91..44a47de3243 100644 --- a/vsintegration/FSharp.Directory.Build.targets +++ b/vsintegration/FSharp.Directory.Build.targets @@ -2,6 +2,15 @@ + + + net462 + + + diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj index 08db608a411..8fb01eb4787 100644 --- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj +++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj @@ -10,15 +10,7 @@ $(NoWarn);75 true $(OtherFlags) --warnon:1182 --subsystemversion:6.00 - - - - - net462 + true diff --git a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj index f69eadc5438..991fcaa196f 100644 --- a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj +++ b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj @@ -10,15 +10,7 @@ $(NoWarn);75 true $(OtherFlags) --warnon:1182 --subsystemversion:6.00 - - - - - net462 + true diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/Directory.Build.props b/vsintegration/src/FSharp.ProjectSystem.FSharp/Directory.Build.props new file mode 100644 index 00000000000..bb8eac309b1 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/Directory.Build.targets b/vsintegration/src/FSharp.ProjectSystem.FSharp/Directory.Build.targets new file mode 100644 index 00000000000..ccd47cc0a9a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj b/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj index c273d6d11ad..29b98c30e89 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj @@ -1,62 +1,30 @@  - - - $(MSBuildProjectDirectory)\..\..\..\src - true - FSharp - - - + - $(VsSDKTools) - Debug - AnyCPU - 2.0 - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} + net46 Library FSharp.ProjectSystem.FSharp - LIBRARY - $(NoWarn);52;75;62 - true - v4.6 - $(OtherFlags) --warnon:1182 --subsystemversion:6.00 - false - true + true false - false - true - true - true - - - - - - true - VSCTCompile;CopyCtoFile;CopyLocalizationResources;$(BuildDependsOn) + $(NoWarn);52;62;75 + true + $(OtherFlags) --warnon:1182 --subsystemversion:6.00 + true - - - - - - - - - + + - false - + true Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpSR true @@ -68,170 +36,62 @@ + + + + + + + + + + + + + + - - - - - + + + + - - $(FSharpSourcesRoot)\..\packages\VSSDK.DebuggerVisualizers.12.0.4\lib\net20\Microsoft.VisualStudio.DebuggerVisualizers.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.15.0.26201\lib\net45\Microsoft.VisualStudio.Text.Data.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.15.0.15.0.25123-Dev15Preview\lib\net45\Microsoft.VisualStudio.Shell.Immutable.15.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - FSharp.LanguageService - {ee85aab7-cda0-4c4e-bda0-a64ccc413e3f} - True - - - FSHarp.VS.FSI - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - True - - - ProjectSystem.Base - {b700e38b-f8c0-4e49-b5ec-db7b7ac0c4e7} - True - - - FSharp.PropertiesPages - {fcfb214c-462e-42b3-91ca-fc557efee74f} - True - - - FSharp.LanguageService.Base - {1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef} - True - - - FSharp.Editor - {65e0e82a-eace-4787-8994-888674c2fe87} - True - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - + + + + + + + + + + + + + + + - - - \ No newline at end of file + + + + + + + + + + + + + From bff5665782ea89fe54590c713146cf3885111aeb Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 8 Feb 2018 15:15:31 -0800 Subject: [PATCH 07/14] convert FSharp.VS.FSI to the dotnet SDK --- VisualFSharp.sln | 10 +- build/targets/PackageVersions.props | 1 + .../fsharp-vsintegration-src-build.proj | 3 +- .../FSharp.LanguageService.fsproj | 2 +- .../ProjectSystem.fsproj | 2 +- .../src/FSharp.VS.FSI/Directory.Build.props | 3 + .../src/FSharp.VS.FSI/Directory.Build.targets | 3 + .../src/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj | 221 ------------------ .../src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj | 90 +++++++ 9 files changed, 106 insertions(+), 229 deletions(-) create mode 100644 vsintegration/src/FSharp.VS.FSI/Directory.Build.props create mode 100644 vsintegration/src/FSharp.VS.FSI/Directory.Build.targets delete mode 100644 vsintegration/src/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj create mode 100644 vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj diff --git a/VisualFSharp.sln b/VisualFSharp.sln index e974f0aa18d..ff03678b9b4 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 15.0.27116.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Private", "src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.VS.FSI", "vsintegration\src\FSharp.VS.FSI\FSharp.VS.FSI.fsproj", "{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.VS.FSI", "vsintegration\src\FSharp.VS.FSI\FSharp.VS.FSI.fsproj", "{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}" ProjectSection(ProjectDependencies) = postProject {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} = {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} EndProjectSection @@ -166,10 +166,10 @@ Global {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|Any CPU.Build.0 = Debug|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|x86.ActiveCfg = Debug|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|x86.Build.0 = Debug|Any CPU - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|Any CPU.Build.0 = Proto|Any CPU - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|x86.ActiveCfg = Proto|Any CPU - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|x86.Build.0 = Proto|Any CPU + {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|Any CPU.ActiveCfg = Release|Any CPU + {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|Any CPU.Build.0 = Release|Any CPU + {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|x86.ActiveCfg = Release|Any CPU + {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|x86.Build.0 = Release|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|Any CPU.ActiveCfg = Release|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|Any CPU.Build.0 = Release|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|x86.ActiveCfg = Release|Any CPU diff --git a/build/targets/PackageVersions.props b/build/targets/PackageVersions.props index ae2e1d9672d..969aae80cf2 100644 --- a/build/targets/PackageVersions.props +++ b/build/targets/PackageVersions.props @@ -27,6 +27,7 @@ 11.0.50727 15.0.25123-Dev15Preview 11.0.61030 + 10.0.30319 15.1.192 12.0.4 7.0.4 diff --git a/vsintegration/fsharp-vsintegration-src-build.proj b/vsintegration/fsharp-vsintegration-src-build.proj index b4a6df76884..4bb58f892cf 100644 --- a/vsintegration/fsharp-vsintegration-src-build.proj +++ b/vsintegration/fsharp-vsintegration-src-build.proj @@ -13,13 +13,14 @@ - + + diff --git a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj index 991fcaa196f..f381f6e61e5 100644 --- a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj +++ b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj @@ -49,7 +49,7 @@ - + diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj b/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj index 29b98c30e89..47bcceed324 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj @@ -41,7 +41,7 @@ - + diff --git a/vsintegration/src/FSharp.VS.FSI/Directory.Build.props b/vsintegration/src/FSharp.VS.FSI/Directory.Build.props new file mode 100644 index 00000000000..bb8eac309b1 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.VS.FSI/Directory.Build.targets b/vsintegration/src/FSharp.VS.FSI/Directory.Build.targets new file mode 100644 index 00000000000..ccd47cc0a9a --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj b/vsintegration/src/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj deleted file mode 100644 index 9eef82dcf36..00000000000 --- a/vsintegration/src/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj +++ /dev/null @@ -1,221 +0,0 @@ - - - - - $(MSBuildProjectDirectory)\..\..\..\src - FSharp - FSharp.VS.FSI - true - - - - Debug - AnyCPU - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - Library - FSharp.VS.FSI - v4.6 - true - LIBRARY - $(NoWarn);47;75 - $(OtherFlags) --subsystemversion:6.00 - true - false - false - true - true - true - - - - - - - - - - - - - - - - - - CompilerLocationUtils.fs - - - - - - - - - - - true - Microsoft.VisualStudio.FSharp.Interactive.SRProperties - true - Properties - Properties.resx - - - - - - - FSharp.Compiler.Private - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - True - - - - - - - - - - - - - - - - - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.TextManager.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Logic.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Logic.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.15.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.StandardClassification.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.StandardClassification.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - FSharp.Compiler.Server.Shared - {d5870cf0-ed51-4cbc-b3d7-6f56da84ac06} - - - \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj new file mode 100644 index 00000000000..1c4144a929a --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj @@ -0,0 +1,90 @@ + + + + + + net46 + Library + true + false + $(NoWarn);47;75 + true + $(OtherFlags) --subsystemversion:6.00 + true + + + + + + + + + + + + + + + CompilerLocationUtils.fs + + + + + + + + + + + true + Microsoft.VisualStudio.FSharp.Interactive.SRProperties + true + Properties + Properties.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 1b6a9cffd6e72cbdd4061ee4f7334bc3e5c0a251 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 8 Feb 2018 15:38:11 -0800 Subject: [PATCH 08/14] convert FSharp.LanguageService.Base to the dotnet SDK --- VisualFSharp.sln | 10 +- .../GenerateInternalsVisibleTo.targets | 3 +- build/targets/PackageVersions.props | 3 +- .../fsharp-vsintegration-src-build.proj | 1 + .../Directory.Build.props | 3 + .../Directory.Build.targets | 3 + .../FSharp.LanguageService.Base.csproj | 295 +++--------------- .../InternalsVisibleTo.cs | 13 - .../Properties/AssemblyInfo.cs | 12 - 9 files changed, 66 insertions(+), 277 deletions(-) create mode 100644 vsintegration/src/FSharp.LanguageService.Base/Directory.Build.props create mode 100644 vsintegration/src/FSharp.LanguageService.Base/Directory.Build.targets delete mode 100644 vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs diff --git a/VisualFSharp.sln b/VisualFSharp.sln index ff03678b9b4..ed68f53adf9 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -16,7 +16,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core", "src\fsharp\F EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.LanguageService", "vsintegration\src\FSharp.LanguageService\FSharp.LanguageService.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.LanguageService.Base", "vsintegration\src\FSharp.LanguageService.Base\FSharp.LanguageService.Base.csproj", "{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.LanguageService.Base", "vsintegration\src\FSharp.LanguageService.Base\FSharp.LanguageService.Base.csproj", "{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}" EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor", "vsintegration\src\FSharp.Editor\FSharp.Editor.fsproj", "{65E0E82A-EACE-4787-8994-888674C2FE87}" EndProject @@ -214,10 +214,10 @@ Global {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Debug|Any CPU.Build.0 = Debug|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Debug|x86.ActiveCfg = Debug|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Debug|x86.Build.0 = Debug|Any CPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|Any CPU.Build.0 = Proto|Any CPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|x86.ActiveCfg = Proto|Any CPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|x86.Build.0 = Proto|Any CPU + {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|Any CPU.ActiveCfg = Release|Any CPU + {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|Any CPU.Build.0 = Release|Any CPU + {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|x86.ActiveCfg = Release|Any CPU + {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|x86.Build.0 = Release|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Release|Any CPU.ActiveCfg = Release|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Release|Any CPU.Build.0 = Release|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Release|x86.ActiveCfg = Release|Any CPU diff --git a/build/targets/GenerateInternalsVisibleTo.targets b/build/targets/GenerateInternalsVisibleTo.targets index 85deaed0a1e..ca4bb15e7ea 100644 --- a/build/targets/GenerateInternalsVisibleTo.targets +++ b/build/targets/GenerateInternalsVisibleTo.targets @@ -35,7 +35,8 @@ - + + diff --git a/build/targets/PackageVersions.props b/build/targets/PackageVersions.props index 969aae80cf2..531bcb941d6 100644 --- a/build/targets/PackageVersions.props +++ b/build/targets/PackageVersions.props @@ -22,10 +22,10 @@ 8.0.50727 15.0.26201 15.0.26201 - 10.0.30319 10.0.30319 11.0.50727 15.0.25123-Dev15Preview + 10.0.30319 11.0.61030 10.0.30319 15.1.192 @@ -36,6 +36,7 @@ 1.0.30 + 8.0.0-alpha 1.0.1 10.0.2 0.2.0-beta-000081 diff --git a/vsintegration/fsharp-vsintegration-src-build.proj b/vsintegration/fsharp-vsintegration-src-build.proj index 4bb58f892cf..e7f79f8bf94 100644 --- a/vsintegration/fsharp-vsintegration-src-build.proj +++ b/vsintegration/fsharp-vsintegration-src-build.proj @@ -19,6 +19,7 @@ + diff --git a/vsintegration/src/FSharp.LanguageService.Base/Directory.Build.props b/vsintegration/src/FSharp.LanguageService.Base/Directory.Build.props new file mode 100644 index 00000000000..bb8eac309b1 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.LanguageService.Base/Directory.Build.targets b/vsintegration/src/FSharp.LanguageService.Base/Directory.Build.targets new file mode 100644 index 00000000000..ccd47cc0a9a --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj index bd08ed3318d..8807f712043 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj +++ b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj @@ -1,253 +1,29 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - CSharp - 15.4.1.0 - cs - - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin - AnyCPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} + net46 Library - Properties - FSharp.LanguageService.Base - FSharp.LanguageService.Base - LIBRARY - true - $(NoWarn);3001,3002,3003 - $(DefineConstants);UITHREAD_FOR_LANGUAGESERVICE - v4.6 - - - true - true + false + true false - false - true - true - true - - - true - $(FSharpSourcesRoot)\fsharp\msft.pubkey - STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants) - true - true + $(NoWarn);1570;3001,3002,3003 + true + true + - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - - - - - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - FSharp.VS.FSI - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.MSXML.8.0.0-alpha\lib\net46\microsoft.msxml.dll - - - - - - - - - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Logic.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Logic.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.StandardClassification.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.StandardClassification.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Microsoft.VisualStudio.Package.LanguageService.resx - Code - - - - - - - - - - - - + ResXCodeGenerator Microsoft.VisualStudio.Package.LanguageService.cs Microsoft.VisualStudio.Package.LanguageServiceResources @@ -257,7 +33,36 @@ Resources.completionset.bmp - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs b/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs deleted file mode 100644 index 0d0fd353a98..00000000000 --- a/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("VisualFSharp.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.LanguageService, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.Base, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.Editor, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] - diff --git a/vsintegration/src/FSharp.LanguageService.Base/Properties/AssemblyInfo.cs b/vsintegration/src/FSharp.LanguageService.Base/Properties/AssemblyInfo.cs index c6088175c97..4cfaf6553c3 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/Properties/AssemblyInfo.cs +++ b/vsintegration/src/FSharp.LanguageService.Base/Properties/AssemblyInfo.cs @@ -6,18 +6,6 @@ using System.Runtime.InteropServices; using Microsoft.VisualStudio.Shell; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("FSharp.LanguageService.Base")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft.VisualFSharpTools")] -[assembly: AssemblyProduct("FSharp.LanguageService.Base")] -[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation.")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. From daacde6f9817f669ff8cae9c2a831b3e0554678d Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Fri, 9 Feb 2018 13:59:35 -0800 Subject: [PATCH 09/14] convert FSharp.ProjectSystem.Base to the dotnet SDK This also includes removing a bunch of dead code that was incorrectly getting globbed into the group. --- build/targets/PackageVersions.props | 3 + .../fsharp-vsintegration-src-build.proj | 1 + .../FSharp.LanguageService.Base.csproj | 2 +- .../Project/AssemblyInfo.cs | 15 - .../Project/AssemblyReferenceNode.cs | 2 +- .../Project/Diagrams/AutomationClasses.cd | 85 -- .../Project/Diagrams/ConfigurationClasses.cd | 154 ---- .../Diagrams/DocumentManagerClasses.cd | 39 - .../Project/Diagrams/HierarchyClasses.cd | 92 -- .../Project/Diagrams/PropertiesClasses.cd | 54 -- .../Project/Diagrams/ReferenceClasses.cd | 82 -- .../Project/Directory.Build.props | 3 + .../Project/Directory.Build.targets | 3 + .../Project/FSharpEditorFactory.cs | 5 +- .../Project/IDEBuildLogger.cs | 8 - .../Project/InternalsVisibleTo.cs | 9 - .../Project/MPFProjectAll.files | 12 - .../Project/ProjectSystem.Base.csproj | 340 ++----- .../Project/SecurityWarningDialog.Designer.cs | 152 ---- .../Project/SecurityWarningDialog.cs | 214 ----- .../Project/SecurityWarningDialog.resx | 450 --------- .../Project/Utilities.cs | 2 +- .../Project/Web/CodeBehindCodeGenerator.cs | 861 ------------------ .../Project/Web/FieldData.cs | 117 --- .../Project/Web/LockedDocData.cs | 63 -- .../Project/Web/VsHierarchyItem.cs | 697 -------------- .../Project/Web/WAUtilities.cs | 186 ---- .../Project/WebProjectBase.Files | 33 - 28 files changed, 81 insertions(+), 3603 deletions(-) delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/AutomationClasses.cd delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ConfigurationClasses.cd delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/DocumentManagerClasses.cd delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/HierarchyClasses.cd delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/PropertiesClasses.cd delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ReferenceClasses.cd create mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Directory.Build.props create mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Directory.Build.targets delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/MPFProjectAll.files delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.Designer.cs delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.cs delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.resx delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/CodeBehindCodeGenerator.cs delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/FieldData.cs delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/LockedDocData.cs delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/VsHierarchyItem.cs delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/WAUtilities.cs delete mode 100644 vsintegration/src/FSharp.ProjectSystem.Base/Project/WebProjectBase.Files diff --git a/build/targets/PackageVersions.props b/build/targets/PackageVersions.props index 531bcb941d6..70c186b564d 100644 --- a/build/targets/PackageVersions.props +++ b/build/targets/PackageVersions.props @@ -13,6 +13,7 @@ 8.0.1 + 14.0.25420 15.0.26201-alpha 1.1.4322 15.0.26201 @@ -20,6 +21,7 @@ 15.0.26201 15.0.26201 8.0.50727 + 14.3.25407 15.0.26201 15.0.26201 10.0.30319 @@ -27,6 +29,7 @@ 15.0.25123-Dev15Preview 10.0.30319 11.0.61030 + 12.0.30110 10.0.30319 15.1.192 12.0.4 diff --git a/vsintegration/fsharp-vsintegration-src-build.proj b/vsintegration/fsharp-vsintegration-src-build.proj index e7f79f8bf94..13c3e74559a 100644 --- a/vsintegration/fsharp-vsintegration-src-build.proj +++ b/vsintegration/fsharp-vsintegration-src-build.proj @@ -20,6 +20,7 @@ + diff --git a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj index 8807f712043..e0b895f3008 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj +++ b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj @@ -8,7 +8,7 @@ false true false - $(NoWarn);1570;3001,3002,3003 + $(NoWarn);1570;1574;1587;1591;3001,3002,3003 true true diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyInfo.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyInfo.cs index 81e294739cc..0e5934a6de8 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyInfo.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyInfo.cs @@ -5,20 +5,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -/* F# additions: begin. */ -[assembly:AssemblyDescription("FSharp.ProjectSystem.Base.dll")] -[assembly:AssemblyCompany("Microsoft Corporation")] -[assembly:AssemblyTitle("FSharp.ProjectSystem.Base.dll")] -[assembly:AssemblyCopyright("\x00a9 Microsoft Corporation. All rights reserved.")] -[assembly:AssemblyProduct("Microsoft\x00ae F#")] -[assembly:AssemblyConfiguration("")] -[assembly:AssemblyCulture("")] [assembly:ComVisible(false)] - -/* Make internals visible to other project system DLLs */ -[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.ProjectSystem.PropertyPages, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] - [assembly: Microsoft.VisualStudio.Shell.ProvideCodeBase(CodeBase = @"$PackageFolder$\FSharp.ProjectSystem.Base.dll")] diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyReferenceNode.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyReferenceNode.cs index 148525d664c..2d346e86c2b 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyReferenceNode.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyReferenceNode.cs @@ -666,7 +666,7 @@ public override object GetProperty(int propId) { var objectBrowserGuid = VSProjectConstants.guidObjectBrowser; var logicalViewGuid = VSConstants.LOGVIEWID.Primary_guid; - IVsUIShellOpenDocument3 shellOpenDocument3 = Package.GetGlobalService(typeof(SVsUIShellOpenDocument)) as IVsUIShellOpenDocument3; + IVsUIShellOpenDocument3 shellOpenDocument3 = Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SVsUIShellOpenDocument)) as IVsUIShellOpenDocument3; return shellOpenDocument3.GetProvisionalViewingStatusForEditor(ref objectBrowserGuid, ref logicalViewGuid); } diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/AutomationClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/AutomationClasses.cd deleted file mode 100644 index fb3c8138d2b..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/AutomationClasses.cd +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - Automation\OAFileItem.cs - AAAAAIAAAAAAMAAAAAAAAAAAAAAAAAACgBABAAAAAAA= - - - - - - Automation\OANavigableProjectItems.cs - AEQAAAAAEABACBAAAAgASAQkCAgAIAAAAgAAAAAAACA= - - - - - - Automation\OAProject.cs - AAQAAJQAAABEUIIhQAAcCAQAAAkAAAAAIBgFCABCAAQ= - - - - - - - Automation\OAProjectItem.cs - AQQAQJAAAABEYAAgQACMDCQBCAkAAAACgBAFAAECAAA= - - - - - - - - - Automation\OAProjectItems.cs - AEAAAAAAEAAAAAAAAAAgAAAggAAAAAAAAAAAAAAAAAA= - - - - - - Automation\OAProperties.cs - AAYAAAACABAAABAAIAAAQCQEAAAAAAAAAAAAAAACAAA= - - - - - - Automation\OAProperty.cs - AQSAAAAAABAAQAJgAAAQQAQAgAAAAAAAAAAgAAAAAAA= - - - - - - Automation\OANestedProjectItem.cs - AAAAABAAAAAAAAAAAAAAACAAAAAACAAAAAAAAAAAAAA= - - - - - - Automation\OARreferenceItem.cs - AAAAAAAAAAAAYAAAAAAAAAQAAAEAAAAAAAAAAAAAAAA= - - - - - - Automation\OAReferenceFolderItem.cs - AAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ= - - - - - - Automation\OASolutionFolder.cs - AUQAAAAAAAAAAAAAAAAAQAAgAAIAAAAAAAQAAAAEAAA= - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ConfigurationClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ConfigurationClasses.cd deleted file mode 100644 index 3586226cd9a..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ConfigurationClasses.cd +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ConfigProvider.cs - AAQAgEQBAAJIAhACAAgAABAEAQ4MAAAAACAEEAAAEQQ= - - - - - - - - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectNode.cs - PcL08fbsGjX+k5CfjpK+d69X9h87o1+nbxPdSeHRekI= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\OutputGroup.cs - AAAAIgABgwRAAAAAAAAAiAAAAIgEQAAgAAAAEASAABA= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\Output.cs - AAAAAQQAAAAAAAAAAAAAgAAACAgAQBAAAAAAAACAABA= - - - - - - - - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectConfig.cs - AAgCAEJABBAAkQCFCCCgAAEAAEgAYEECAAAAGQDJUEA= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectElement.cs - AgAEAEAAAAAAAAQAhAQAAgAUABAAA4AAQAIAAAAAgiA= - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectConfig.cs - AABCAAAACgAACAAAAAAABAEIAAQAgAAAIABAEABQAAA= - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\StructuresEnums.cs - IAACAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA= - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/DocumentManagerClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/DocumentManagerClasses.cd deleted file mode 100644 index ee63d3a71f2..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/DocumentManagerClasses.cd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - FileDocumentManager.cs - AACAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - - - - - - DocumentManager.cs - AQCAQIQAAAAAIAEAAAAAAAAAIAAAAAAAAAAAACGAAAE= - - - - - - - - - - - - ProjectDesignerDocumentManager.cs - AACAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - - - - - - HierarchyNode.cs - NKl4a26oCodRuoDQodAKZKQQxKtwgtmAOJLYAHLHccE= - - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/HierarchyClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/HierarchyClasses.cd deleted file mode 100644 index 25f3d4c9fd5..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/HierarchyClasses.cd +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\HierarchyNode.cs - NKl4a26oCodRuoDQodAKZKQQxKtwgtmAOJLYAHLHccE= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\FolderNode.cs - AAAAEAKAAAEAAAAAgIAAJAAAAAIAAAAACAAQAAAAAQA= - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\FileNode.cs - AAhACECAAAFAAAEAABACZAAAAAAAAAAQSAAQAABEAAA= - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectNode.cs - PcL08fbsGjX+k5CfjpK+N69X9h87o1+nbxPdSaHRekI= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectContainerNode.cs - AABFABAAAAQAAAAAQAAAAAAEQIABAAAARASAAAAAAAE= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ComReferenceNode.cs - AACACCIAAAIAACAAQAAEAAQAgACAAAABCAAQAQACAAA= - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ReferenceContainerNode.cs - AABACACgAAEAAAAAgAACIAAAAAIQAAAACAAQAABAARA= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ReferenceNode.cs - AABAAGaAAAFAAAAAgAAiIAAAAAAQAAEAGAAQAABAAAA= - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectReferenceNode.cs - CAACCFYCAgAAgAEAAIACBAQAAAAAAAAACAAAAACACAA= - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\AssemblyReferenceNode.cs - AAAACCIAAAAAAAAAAAIAAAACAABAAAAAGAAAEAAAABg= - - - - - - - - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/PropertiesClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/PropertiesClasses.cd deleted file mode 100644 index 2fbb404bebd..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/PropertiesClasses.cd +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - NodeProperties.cs - EQACAAAAAAAAAQAAAAAAAAQAAAEAAggAAABACAEAAAA= - - - - - - - - - - - - - LocalizableProperties.cs - AAAACAAACAAAAAAgAAAAgAAAABAEIAAAAERAAAAACAA= - - - - - - HierarchyNode.cs - NKl4a26oCodRuoDQodAKZKQQxKtwgtmAOJLYAHLHccE= - - - - - - - NodeProperties.cs - CAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABAAAA= - - - - - - NodeProperties.cs - AAAAAAAABAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAA= - - - - - - NodeProperties.cs - CAAAAAAAAAAAAAAAAAAAAAQAAAAAIAAAAAAAAAAAAAA= - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ReferenceClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ReferenceClasses.cd deleted file mode 100644 index 55a2b56dc4e..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ReferenceClasses.cd +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - ReferenceNode.cs - AABAAGaAAAFAAAAAgAAiIAAAAAAQAAEAGAAQAABAAAA= - - - - - ReferenceNode.cs - - - - - - - - ProjectReferenceNode.cs - CAACCFYCAgAAgAEAAIACBAQAAAAAAAAACAAAAACACAA= - - - - - - - - - - - - - - - - - - BuildDependency.cs - AAAQAAYAAAQAgAAQAEAAAAAAAAAAAAAAEQAAAACAAAA= - - - - - - - - - AssemblyReferenceNode.cs - AAAACCIAAAAAAAAAAAIAAAACAABAAAAAGAAAEAAAABg= - - - - - - ComReferenceNode.cs - AACACCIAAAIAACAAQAAEAAQAgACAAAABCAAQAQACAAA= - - - - - - - - - - - - SolutionListenerForProjectReferenceUpdate.cs - AAAAAAAAAAAAAAAAAQAAIAAAAgAAAAAIAAAAgABAAAA= - - - - - - SolutionListener.cs - AAIACRBQoCAQCCAAEAIAJAAACgQBAAAYAQAiiAIAAAA= - - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Directory.Build.props b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Directory.Build.props new file mode 100644 index 00000000000..bb8eac309b1 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Directory.Build.targets b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Directory.Build.targets new file mode 100644 index 00000000000..ccd47cc0a9a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/FSharpEditorFactory.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/FSharpEditorFactory.cs index 3d938fa1898..bb27865b5ba 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/FSharpEditorFactory.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/FSharpEditorFactory.cs @@ -13,6 +13,7 @@ using System.Text; using System.Threading.Tasks; using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; +using ShellPackage = Microsoft.VisualStudio.Shell.Package; namespace Microsoft.VisualStudio.FSharp.ProjectSystem { @@ -27,7 +28,7 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem [ProvideEditorExtension(typeof(FSharpEditorFactory), ".mli", 64)] public class FSharpEditorFactory : IVsEditorFactory { - private Package _parentPackage; + private ShellPackage _parentPackage; private IOleServiceProvider _oleServiceProvider; private IVsEditorAdaptersFactoryService _editorAdaptersFactoryService; private IContentTypeRegistryService _contentTypeRegistryService; @@ -41,7 +42,7 @@ private IServiceProvider ServiceProvider } } - public FSharpEditorFactory(Package parentPackage) + public FSharpEditorFactory(ShellPackage parentPackage) { if (parentPackage == null) { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs index a8e766877e7..9c14f377ca9 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs @@ -20,15 +20,7 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem { public static class LoggingConstants { -#if VS_VERSION_DEV12 - public const string DefaultVSRegistryRoot = @"Software\Microsoft\VisualStudio\12.0"; -#endif -#if VS_VERSION_DEV14 - public const string DefaultVSRegistryRoot = @"Software\Microsoft\VisualStudio\14.0"; -#endif -#if VS_VERSION_DEV15 public const string DefaultVSRegistryRoot = @"Software\Microsoft\VisualStudio\15.0"; -#endif public const string BuildVerbosityRegistrySubKey = @"General"; public const string BuildVerbosityRegistryValue = "MSBuildLoggerVerbosity"; public const string UpToDateVerbosityRegistryValue = "U2DCheckVerbosity"; diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs deleted file mode 100644 index 8a08659c881..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -[assembly:InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("VisualFSharp.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.PropertyPages, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/MPFProjectAll.files b/vsintegration/src/FSharp.ProjectSystem.Base/Project/MPFProjectAll.files deleted file mode 100644 index 624da1ad750..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/MPFProjectAll.files +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - . - - - - - - \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectSystem.Base.csproj b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectSystem.Base.csproj index a3218473401..5a2a45325b5 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectSystem.Base.csproj +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectSystem.Base.csproj @@ -1,295 +1,85 @@  - - - $(MSBuildProjectDirectory)\..\..\..\..\src - CSharp - 11 - 3001,3002,3003,3005,3008,3009,3021,3024 - 15.4.1.0 - cs - $(VsSDKTools) - + + + net46 Library FSharp.ProjectSystem.Base - true - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin - AnyCPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7} - $(DefineConstants);CODE_ANALYSIS - true - v4.6 - - - true - true + false + true false - false - true - true - true - - + $(NoWarn),1570,1572,1573,1574,1591,3001,3002,3003,3005,3008,3009,3021,3024 + $(DefineConstants);CODE_ANALYSIS Microsoft.VisualStudio.FSharp.ProjectSystem + true + true - - - - - - - - - - - - - - - + - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Conversion.Core.dll - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - ImmutableShell - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110\lib\Microsoft.VisualStudio.Shell.Interop.12.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.15.0.15.0.26201\lib\Microsoft.VisualStudio.Shell.15.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll - Shell14 - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Microsoft.VisualStudio.Shell.UI.Internal.14.0.25420\lib\net45\Microsoft.VisualStudio.Shell.UI.Internal.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Microsoft.VisualStudio.Package.Project.resources Designer - - Resources.imagelis.bmp + + + + + + + + + + + + + + + + + + + + + + - - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} - FSharp.LanguageService.Base - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - + + + + + + + + + + + + + + + - - - - \ No newline at end of file + + + + + + + + + diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.Designer.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.Designer.cs deleted file mode 100644 index b2f7c6a8bc6..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.Designer.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem -{ - partial class SecurityWarningDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SecurityWarningDialog)); - this.warningText = new System.Windows.Forms.Label(); - this.detailsButton = new System.Windows.Forms.Button(); - this.optionBox = new System.Windows.Forms.GroupBox(); - this.loadButton = new System.Windows.Forms.RadioButton(); - this.browseButton = new System.Windows.Forms.RadioButton(); - this.loadText = new System.Windows.Forms.Label(); - this.browseText = new System.Windows.Forms.Label(); - this.askAgainCheckBox = new System.Windows.Forms.CheckBox(); - this.okButton = new System.Windows.Forms.Button(); - this.cancelButton = new System.Windows.Forms.Button(); - this.optionBox.SuspendLayout(); - this.SuspendLayout(); - // - // warningText - // - resources.ApplyResources(this.warningText, "warningText"); - this.warningText.Name = "warningText"; - // - // detailsButton - // - resources.ApplyResources(this.detailsButton, "detailsButton"); - this.detailsButton.Name = "detailsButton"; - this.detailsButton.UseVisualStyleBackColor = true; - this.detailsButton.Click += new System.EventHandler(this.detailsButton_Click); - // - // optionBox - // - this.optionBox.Controls.Add(this.loadButton); - this.optionBox.Controls.Add(this.browseButton); - this.optionBox.Controls.Add(this.loadText); - this.optionBox.Controls.Add(this.browseText); - resources.ApplyResources(this.optionBox, "optionBox"); - this.optionBox.Name = "optionBox"; - this.optionBox.TabStop = false; - // - // loadButton - // - resources.ApplyResources(this.loadButton, "loadButton"); - this.loadButton.Name = "loadButton"; - this.loadButton.TabStop = true; - this.loadButton.UseVisualStyleBackColor = true; - // - // browseButton - // - resources.ApplyResources(this.browseButton, "browseButton"); - this.browseButton.Name = "browseButton"; - this.browseButton.TabStop = true; - this.browseButton.UseVisualStyleBackColor = true; - // - // loadText - // - resources.ApplyResources(this.loadText, "loadText"); - this.loadText.Name = "loadText"; - // - // browseText - // - resources.ApplyResources(this.browseText, "browseText"); - this.browseText.Name = "browseText"; - // - // askAgainCheckBox - // - resources.ApplyResources(this.askAgainCheckBox, "askAgainCheckBox"); - this.askAgainCheckBox.Name = "askAgainCheckBox"; - this.askAgainCheckBox.UseVisualStyleBackColor = true; - // - // okButton - // - this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - resources.ApplyResources(this.okButton, "okButton"); - this.okButton.Name = "okButton"; - this.okButton.UseVisualStyleBackColor = true; - this.okButton.Click += new System.EventHandler(this.okButton_Click); - // - // cancelButton - // - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - resources.ApplyResources(this.cancelButton, "cancelButton"); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.UseVisualStyleBackColor = true; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // SecurityWarningDialog - // - this.AcceptButton = this.okButton; - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.cancelButton; - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.okButton); - this.Controls.Add(this.askAgainCheckBox); - this.Controls.Add(this.optionBox); - this.Controls.Add(this.detailsButton); - this.Controls.Add(this.warningText); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "SecurityWarningDialog"; - this.ShowInTaskbar = false; - this.optionBox.ResumeLayout(false); - this.optionBox.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label warningText; - private System.Windows.Forms.Button detailsButton; - private System.Windows.Forms.GroupBox optionBox; - private System.Windows.Forms.Label browseText; - private System.Windows.Forms.Label loadText; - private System.Windows.Forms.RadioButton browseButton; - private System.Windows.Forms.RadioButton loadButton; - private System.Windows.Forms.CheckBox askAgainCheckBox; - private System.Windows.Forms.Button okButton; - private System.Windows.Forms.Button cancelButton; - } -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.cs deleted file mode 100644 index a7e38957564..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.cs +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Data; - using System.Drawing; - using System.Text; - using System.Windows.Forms; - using System.IO; - using Microsoft.VisualStudio.Shell.Interop; - using System.Globalization; - using Microsoft.VisualStudio.Shell; - using System.Windows.Forms.Design; - - internal partial class SecurityWarningDialog: Form - { - #region fields - /// - /// The associated service provider - /// - private IServiceProvider serviceProvider; - - /// - /// The dialog message to be presented when the 'More' button is pressed. - /// - private string dialogMessage; - - /// - /// Teh full path to teh project. - /// - private string projectFullPath; - - /// - /// The value of the ask again check box. - /// - private bool askAgainCheckBoxValue; - - /// - /// The project load option the userwill choose on this form. - /// - private ProjectLoadOption projectLoadOption = ProjectLoadOption.DonNotLoad; - #endregion - - #region properties - /// - /// The value of the ask again check box. - /// - /*internal, but public for FSharp.Project.dll*/ public bool AskAgainCheckBoxValue - { - get - { - return this.askAgainCheckBoxValue; - } - } - - /// - /// The project load option the user has chosen to perform. - /// - internal ProjectLoadOption ProjectLoadOption - { - get - { - return this.projectLoadOption; - } - } - #endregion - - #region ctors - /// - /// Overloaded ctor. - /// - /// The associated service provider. - /// The message that will be shown when the 'More' button is pressed. - /// The full path of the project. - public SecurityWarningDialog(IServiceProvider serviceProvider, string dialogMessage, string projectFullpath) - { - if (serviceProvider == null) - { - throw new ArgumentNullException("serviceProvider"); - } - - if (String.IsNullOrEmpty(projectFullpath)) - { - throw new ArgumentException(SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "projectFullpath"); - } - - this.serviceProvider = serviceProvider; - - this.projectFullPath = projectFullpath; - - this.dialogMessage = dialogMessage; - - this.InitializeComponent(); - - this.SetupComponents(); - } - #endregion - - #region helpers - /// - /// Shows the dialog if possible hosted by the IUIService. - /// - /// A DialogResult - /*internal, but public for FSharp.Project.dll*/ public new DialogResult ShowDialog() - { - IUIService uiService = this.serviceProvider.GetService(typeof(IUIService)) as IUIService; - if (uiService == null) - { - return this.ShowDialog(); - } - - return uiService.ShowDialog(this); - } - - /// - /// Sets up the different UI elements. - /// - private void SetupComponents() - { - // Get the project name. - string projectFileName = Path.GetFileName(this.projectFullPath); - string projectName = Path.GetFileNameWithoutExtension(this.projectFullPath); - - IVsUIShell shell = this.serviceProvider.GetService(typeof(SVsUIShell)) as IVsUIShell; - - if (shell == null) - { - throw new InvalidOperationException(); - } - - String applicationName; - - // Get the name of the SKU. - shell.GetAppName(out applicationName); - - // Set the dialog box caption (title). - this.Text = String.Format(CultureInfo.CurrentCulture, this.Text, projectName); - - // Set the text at the top of the dialog that gives a brief description of the security - // implications of loading this project. - this.warningText.Text = String.Format(CultureInfo.CurrentCulture, this.warningText.Text, projectName, applicationName); - - // Set the text that describes the "Browse" option. - this.browseText.Text = String.Format(CultureInfo.CurrentCulture, this.browseText.Text, applicationName); - - // Set the text that describes the "Load" option. - this.loadText.Text = String.Format(CultureInfo.CurrentCulture, this.loadText.Text, applicationName); - - // The default selection is "Browse" so select that radio button. - this.browseButton.Checked = true; - - // Turn on the "Ask me always" checkbox by default. - this.askAgainCheckBox.Checked = true; - - // Set the focus to the Browse button, so hitting Enter will press the OK button - this.browseButton.Focus(); - - this.CenterToScreen(); - } - - /// - /// The Cancel button was clicked. - /// - /// The sender of the event - /// An event arg Associated to the event. - private void cancelButton_Click(object sender, EventArgs e) - { - // In case the user presses the Cancel button, we assume he never wants to see this dialog again - // and pretend the "Ask me every time" checkbox is unchecked even if it is really checked. - this.askAgainCheckBoxValue = false; - this.projectLoadOption = ProjectLoadOption.DonNotLoad; - } - - /// - /// The OK button was clicked. - /// - /// The sender of the event - /// An event arg Associated to the event. - private void okButton_Click(object sender, EventArgs e) - { - if (this.browseButton.Checked && !this.loadButton.Checked) - { - this.projectLoadOption = ProjectLoadOption.LoadOnlyForBrowsing; - } - else - { - this.projectLoadOption = ProjectLoadOption.LoadNormally; - } - - this.askAgainCheckBoxValue = this.askAgainCheckBox.Checked; - - this.Close(); - } - - /// - /// Loads a messagebox explaining in detail the security problem - /// - /// The sender of the event - /// An event arg Associated to the event. - private void detailsButton_Click(object sender, EventArgs e) - { - string title = null; - OLEMSGICON icon = OLEMSGICON.OLEMSGICON_INFO; - OLEMSGBUTTON buttons = OLEMSGBUTTON.OLEMSGBUTTON_OK; - OLEMSGDEFBUTTON defaultButton = OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST; - VsShellUtilities.ShowMessageBox(this.serviceProvider, title, this.dialogMessage, icon, buttons, defaultButton); - } - - #endregion - } -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.resx b/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.resx deleted file mode 100644 index be768102725..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.resx +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - Microsoft Sans Serif, 8.25pt - - - 7, 7 - - - 488, 39 - - - - 0 - - - The {0} project file has been customized and could present a security risk by executing custom build steps when opened in {1}. If this project came from an untrustworthy source, it could cause damage to your computer or compromise your private information. - - - warningText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - - - Microsoft Sans Serif, 8.25pt - - - 12, 65 - - - 74, 23 - - - 1 - - - &More Details - - - detailsButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - loadButton - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 0 - - - browseButton - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 1 - - - loadText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 2 - - - browseText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 3 - - - Microsoft Sans Serif, 8.25pt - - - 10, 103 - - - 488, 176 - - - 2 - - - Project load options - - - optionBox - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - - - True - - - 6, 100 - - - 125, 17 - - - 3 - - - &Load project normally - - - loadButton - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 0 - - - True - - - 6, 20 - - - 144, 17 - - - 2 - - - Load project for &browsing - - - browseButton - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 1 - - - 20, 120 - - - 462, 53 - - - 1 - - - Opens the project normally in {0}. Use this option if you trust the source and understand the potential risks involved. {0} does not restrict any project functionality and will not prompt you again for this project. - - - loadText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 2 - - - 20, 40 - - - 454, 47 - - - 0 - - - Opens the project in {0} with increased security. This option allows you to browse the contents of the project, but some functionality, such as IntelliSense, is restricted. When a project is loaded for browsing, actions such as building, cleaning, publishing, or opening designers could still remain unsafe. - - - browseText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 3 - - - True - - - 10, 295 - - - 209, 17 - - - 3 - - - &Ask me for every project in this solution - - - askAgainCheckBox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - 327, 328 - - - 75, 23 - - - 4 - - - OK - - - okButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - 420, 328 - - - 75, 23 - - - 5 - - - Cancel - - - cancelButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - True - - - 6, 13 - - - 507, 363 - - - Microsoft Sans Serif, 8.25pt - - - Security Warning for {0} - - - SecurityWarningDialog - - - System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs index 7ad501608ad..d725e493327 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs @@ -849,7 +849,7 @@ private static bool IsFilePartInValid(string filePart) { extension = Path.GetExtension(filePart); } - // We catch the ArgumentException because we want this method to return true if the filename is not valid. FilePart could be for example #¤&%"¤&"% and that would throw ArgumentException on GetExtension + // We catch the ArgumentException because we want this method to return true if the filename is not valid. FilePart could be for example #�&%"�&"% and that would throw ArgumentException on GetExtension catch (ArgumentException) { return true; diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/CodeBehindCodeGenerator.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/CodeBehindCodeGenerator.cs deleted file mode 100644 index c35120aadd9..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/CodeBehindCodeGenerator.cs +++ /dev/null @@ -1,861 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.CodeDom; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.IO; -using System.Text; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using EnvDTE; -using EnvDTE80; -using Microsoft.VisualStudio.Designer.Interfaces; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.Shell.Design; -using Microsoft.VisualStudio.Shell.Design.Serialization; - -using IServiceProvider = System.IServiceProvider; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; -using IVsCodeBehindCodeGenerator = Microsoft.VisualStudio.Web.Application.IVsCodeBehindCodeGenerator; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - [ComVisible(true)] - internal class CodeBehindCodeGenerator : IVsCodeBehindCodeGenerator - { - private ServiceProvider _serviceProvider; - private IVsHierarchy _hierarchy; - private CodeGeneratorOptions _codeGeneratorOptions; - - // Generate state - private VsHierarchyItem _itemCode; - private VsHierarchyItem _itemDesigner; - private CodeDomProvider _codeDomProvider; - private CodeCompileUnit _ccu; - private CodeTypeDeclaration _ctd; - private bool _create; - private bool _isPartialClassDisabled; - private FieldDataDictionary _codeFields; - private FieldDataDictionary _designerFields; - private string _className_Full; - private string _className_Namespace; - private string _className_Name; - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Constructor - /// - ///------------------------------------------------------------------------------------------------------------- - public CodeBehindCodeGenerator() - { - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Finalizer - /// - ///------------------------------------------------------------------------------------------------------------- - ~CodeBehindCodeGenerator() - { - Debug.Fail("CodeBehindCodeGenerator was not disposed."); - Dispose(); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Initializes the generator state. - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.Initialize(IVsHierarchy hierarchy) - { - IOleServiceProvider serviceProvider = null; - _hierarchy = hierarchy; - _hierarchy.GetSite(out serviceProvider); - _serviceProvider = new ServiceProvider(serviceProvider); - _codeGeneratorOptions = new CodeGeneratorOptions(); - _codeGeneratorOptions.BlankLinesBetweenMembers = false; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Cleans up state. - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.Close() - { - Dispose(); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Cleans up member state. - /// - ///------------------------------------------------------------------------------------------------------------- - public virtual void Dispose() - { - if (_serviceProvider != null) - { - _serviceProvider.Dispose(); - _serviceProvider = null; - } - - _hierarchy = null; - _codeGeneratorOptions = null; - - DisposeGenerateState(); - - GC.SuppressFinalize(this); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Cleans up Generate member state. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual void DisposeGenerateState() - { - try - { - _itemCode = null; - _itemDesigner = null; - _ccu = null; - _ctd = null; - _create = false; - _codeFields = null; - _designerFields = null; - _className_Full = null; - _className_Namespace = null; - _className_Name = null; - - if (_codeDomProvider != null) - { - _codeDomProvider.Dispose(); - _codeDomProvider = null; - } - } - catch - { - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// The full class name currently generating for - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ string ClassName_Full - { - get - { - return _className_Full; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// The class namespace currently generating for - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ string ClassName_Namespace - { - get - { - return _className_Namespace; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// The class name currently generating for - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ string ClassName_Name - { - get - { - return _className_Name; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// The code behind item - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ VsHierarchyItem ItemCode - { - get - { - return _itemCode; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Languages that do NOT support partial class in a .designer file should disable partial classes - /// using this property. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ bool IsPartialClassDisabled - { - get - { - return _isPartialClassDisabled; - } - set - { - _isPartialClassDisabled = value; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Create CodeDomProvider for the language of the file - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual CodeDomProvider CreateCodeDomProvider(uint itemid) - { - Microsoft.VisualStudio.OLE.Interop.IServiceProvider oleServiceProvider; - ErrorHandler.ThrowOnFailure(((IVsProject)this._hierarchy).GetItemContext(itemid, out oleServiceProvider)); - ServiceProvider serviceProvider = new ServiceProvider(oleServiceProvider); - IVSMDCodeDomProvider provider = serviceProvider.GetService(typeof(SVSMDCodeDomProvider)) as IVSMDCodeDomProvider; - CodeDomProvider codeDomProvider = null; - if (provider != null) - { - codeDomProvider = provider.CodeDomProvider as CodeDomProvider; - } - - Debug.Assert(codeDomProvider!=null, "Failed to create CodeDomProvider"); - return codeDomProvider; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns public field names in dictionary - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ FieldDataDictionary GetFieldNames(string[] publicFields, bool caseSensitive) - { - FieldDataDictionary fields = null; - - if (publicFields != null) - { - foreach (string name in publicFields) - { - if (!string.IsNullOrEmpty(name)) - { - FieldData field = new FieldData(name); - - if (field != null) - { - if (fields == null) - { - fields = new FieldDataDictionary(caseSensitive); - } - - try - { - if (!fields.ContainsKey(field.Name)) - { - fields.Add(field.Name, field); - } - } - catch - { - } - } - } - } - } - - return fields; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns field names in the specified class using code model. - /// If publicOnly is true only public fields are returned. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ FieldDataDictionary GetFieldNames(VsHierarchyItem itemCode, string className, bool caseSensitive, bool onlyBaseClasses, int maxDepth) - { - FieldDataDictionary fields = null; - - if (itemCode != null) - { - CodeClass codeClass = FindClass(itemCode, className); - if (codeClass != null) - { - GetFieldNames(codeClass, caseSensitive, onlyBaseClasses, 0, maxDepth, ref fields); - } - } - - return fields; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns field names in the specified class using code model. - /// If publicOnly is true only public fields are returned. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ void GetFieldNames(CodeClass codeClass, bool caseSensitive, bool onlyBaseClasses, int depth, int maxDepth, ref FieldDataDictionary fields) - { - if (codeClass != null && depth <= maxDepth) - { - if (!(onlyBaseClasses && depth == 0)) - { - foreach (CodeElement codeElement in codeClass.Members) - { - //vsCMElement kind = codeElement.Kind; //vsCMElementVariable - CodeVariable codeVariable = codeElement as CodeVariable; - if (codeVariable != null) - { - FieldData field = new FieldData(codeClass, codeVariable, depth); - - if (field != null && !string.IsNullOrEmpty(field.Name)) - { - if (fields == null) - { - fields = new FieldDataDictionary(caseSensitive); - } - - try - { - if (!fields.ContainsKey(field.Name)) - { - fields.Add(field.Name, field); - } - } - catch - { - } - } - } - } - } - - foreach (CodeElement baseCodeElement in codeClass.Bases) - { - CodeClass baseCodeClass = baseCodeElement as CodeClass; - if (baseCodeClass != null) - { - CodeElements partCodeElements = null; - CodeClass2 baseCodeClass2 = baseCodeClass as CodeClass2; - if (baseCodeClass2 != null) - { - vsCMClassKind classKind = baseCodeClass2.ClassKind; - if ((classKind | vsCMClassKind.vsCMClassKindPartialClass) == vsCMClassKind.vsCMClassKindPartialClass) - { - try - { - partCodeElements = baseCodeClass2.Parts; - } - catch - { - } - } - } - - if (partCodeElements != null && partCodeElements.Count > 1) - { - foreach (CodeElement partCodeElement in partCodeElements) - { - CodeClass partCodeClass = partCodeElement as CodeClass; - if (partCodeClass != null) - { - GetFieldNames(partCodeClass, caseSensitive, onlyBaseClasses, depth + 1, maxDepth, ref fields); - } - } - } - else - { - GetFieldNames(baseCodeClass, caseSensitive, onlyBaseClasses, depth + 1, maxDepth, ref fields); - } - } - } - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Locates the code model CodeClass - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual CodeClass FindClass(VsHierarchyItem item, string className) - { - if (item != null) - { - try - { - ProjectItem projectItem = item.ProjectItem(); - if (projectItem != null) - { - FileCodeModel fileCodeModel = projectItem.FileCodeModel; - if (fileCodeModel != null) - { - return FindClass(fileCodeModel.CodeElements, className); - } - } - } - catch - { - } - } - return null; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Recursively searches the CodeElements for the specified class - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual CodeClass FindClass(CodeElements codeElements, string className) - { - if (codeElements != null && !string.IsNullOrEmpty(className)) - { - foreach (CodeElement codeElement in codeElements) - { - vsCMElement kind = codeElement.Kind; - if (kind == vsCMElement.vsCMElementClass) - { - CodeClass codeClass = codeElement as CodeClass; - if (codeClass != null && string.Compare(codeClass.FullName, className, StringComparison.Ordinal) == 0) - { - return codeClass; - } - } - else if (kind == vsCMElement.vsCMElementNamespace) - { - EnvDTE.CodeNamespace codeNamespace = codeElement as EnvDTE.CodeNamespace; - if (codeNamespace != null) - { - CodeClass codeClass = FindClass(codeNamespace.Children, className); - if (codeClass != null) - { - return codeClass; - } - } - } - } - } - return null; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Gets a VshierarchyItem for the designer file if possible. - /// Will create new file if specified and not existing. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual VsHierarchyItem GetDesignerItem(VsHierarchyItem itemCode, bool create) - { - VsHierarchyItem itemDesigner = null; - - if (itemCode != null) - { - // Calculate codebehind and designer file paths - string codeBehindFile = itemCode.FullPath(); - string designerFile = null; - if (_isPartialClassDisabled) - { - designerFile = codeBehindFile; - } - else if (!string.IsNullOrEmpty(codeBehindFile)) - { - designerFile = codeBehindFile.Insert(codeBehindFile.LastIndexOf("."), ".designer"); - } - - // Try to locate existing designer file - if (!string.IsNullOrEmpty(designerFile)) - { - itemDesigner = VsHierarchyItem.CreateFromMoniker(designerFile, _hierarchy); - if (itemDesigner != null) - { - return itemDesigner; - } - } - - // Create empty designer file if requested - if (create && !string.IsNullOrEmpty(designerFile)) - { - ProjectItem projectItemCode = itemCode.ProjectItem(); - if (projectItemCode != null) - { - ProjectItems projectItems = projectItemCode.Collection; - if (projectItems != null) - { - try - { - using (StreamWriter sw = File.CreateText(designerFile)) - { - sw.WriteLine(" "); - } - - projectItems.AddFromFileCopy(designerFile); - } - catch - { - } - - itemDesigner = VsHierarchyItem.CreateFromMoniker(designerFile, _hierarchy); - if (itemDesigner != null) - { - return itemDesigner; - } - } - } - } - } - - return itemDesigner; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Checks CodeDomProvider for case sensitivity - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ bool IsCaseSensitive(CodeDomProvider codeDomProvider) - { - return !((codeDomProvider.LanguageOptions & LanguageOptions.CaseInsensitive) == LanguageOptions.CaseInsensitive); - } - - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - bool IVsCodeBehindCodeGenerator.IsGenerateAllowed(string document, string codeBehindFile, bool create) - { - VsHierarchyItem itemCode = VsHierarchyItem.CreateFromMoniker(codeBehindFile, _hierarchy); - VsHierarchyItem itemDesigner = GetDesignerItem(itemCode, false); - - if ((itemDesigner != null && itemDesigner.IsBuildActionCompile()) - || (itemDesigner == null && create)) - { - return true; - } - - return false; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.BeginGenerate(string document, string codeBehindFile, string className_Full, bool create) - { - DisposeGenerateState(); - - _itemCode = VsHierarchyItem.CreateFromMoniker(codeBehindFile, _hierarchy); - _itemDesigner = GetDesignerItem(_itemCode, false); - _create = create; - _className_Full = className_Full; - - if (_itemCode != null) - { - // Get the CodeDomProvider for the language (MergedCodeDomProvider C#/VB) - _codeDomProvider = CreateCodeDomProvider(_itemCode.VsItemID); - - if (_codeDomProvider != null) - { - // Get the field names so we can preserve location and access - bool caseSensitive = IsCaseSensitive(_codeDomProvider); - - _codeFields = GetFieldNames(_itemCode, _className_Full, caseSensitive, false, 30); - _designerFields = GetFieldNames(_itemDesigner, _className_Full, caseSensitive, false, 0); - - // Generate the class - string designerContents = _itemDesigner.GetDocumentText(); - TextReader reader = new StringReader(designerContents); - _ccu = _codeDomProvider.Parse(reader); - GenerateClass(); - } - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - private void GenerateClass() - { - // Break full name into namespace and name - if (!string.IsNullOrEmpty(_className_Full)) - { - int lastdot = _className_Full.LastIndexOf('.'); - if (lastdot >= 0) - { - _className_Name = _className_Full.Substring(lastdot + 1); - _className_Namespace = _className_Full.Substring(0, lastdot); - } - else - { - _className_Name = _className_Full; - _className_Namespace = null; - } - } - - - // Create namespace and add to compile unit - System.CodeDom.CodeNamespace codeNS = null; - string ns = GetClassNamespace(); - if (!string.IsNullOrEmpty(ns)) - { - codeNS = new System.CodeDom.CodeNamespace(ns); - } - else - { - codeNS = new System.CodeDom.CodeNamespace(); - } - if (_ccu.Namespaces != null && _ccu.Namespaces.Count>0 && String.CompareOrdinal(_ccu.Namespaces[0].Name, ns) == 0) - codeNS = _ccu.Namespaces[0]; - else - _ccu.Namespaces.Add(codeNS); - - // Create class definition and add to namespace - _ctd = new CodeTypeDeclaration(_className_Name); - _ctd.IsPartial = !IsPartialClassDisabled; - if (codeNS.Types != null && codeNS.Types.Count > 0 && String.CompareOrdinal(codeNS.Types[0].Name, _className_Name) == 0) - _ctd = codeNS.Types[0]; - else - codeNS.Types.Add(_ctd); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.EnsureStronglyTypedProperty(string propertyName, string propertyTypeName) - { - CodeMemberProperty prop = new CodeMemberProperty(); - prop.Attributes &= ~MemberAttributes.AccessMask; - prop.Attributes &= ~MemberAttributes.ScopeMask; - prop.Attributes |= MemberAttributes.Final | MemberAttributes.New | MemberAttributes.Public; - prop.Name = propertyName; - prop.Type = new CodeTypeReference(propertyTypeName); - - CodePropertyReferenceExpression propRef = new CodePropertyReferenceExpression( - new CodeBaseReferenceExpression(), propertyName); - - prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeCastExpression(propertyTypeName, propRef))); - _ctd.Members.Add(prop); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.EnsureControlDeclaration(string name, string typeName) - { - if (ShouldDeclareField(name, typeName)) - { - typeName = GetDeclarationTypeName(name, typeName); - - CodeMemberField field = new CodeMemberField(typeName, name); - - // Check if someone made the declaration public in the designer file - bool isPublic = false; - if (_designerFields != null && _designerFields.ContainsKey(name)) - { - FieldData fieldData = _designerFields[name]; - if (fieldData != null) - { - isPublic = fieldData.IsPublic; - } - } - - // Set access to public or protected - field.Attributes &= ~MemberAttributes.AccessMask; - if (isPublic) - { - field.Attributes |= MemberAttributes.Public; - } - else - { - field.Attributes |= MemberAttributes.Family; - } - - SetAdditionalFieldData(field); - - _ctd.Members.Add(field); - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.Generate() - { - DocData ddDesigner = null; - DocDataTextWriter designerWriter = null; - - try - { - if (_itemCode != null && _codeDomProvider != null) - { - - // Generate the code - StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture); - _codeDomProvider.GenerateCodeFromCompileUnit(_ccu, stringWriter, _codeGeneratorOptions); - string generatedCode = stringWriter.ToString(); - - // Create designer file if requested - if (_itemDesigner == null && _create) - { - _itemDesigner = GetDesignerItem(_itemCode, true); - } - - // See if generated code changed - string designerContents = _itemDesigner.GetDocumentText(); - if (!BufferEquals(designerContents, generatedCode)) // Would be nice to just compare lengths but the buffer gets formatted after insertion - { - ddDesigner = new LockedDocData(_serviceProvider, _itemDesigner.FullPath()); - - // Try to check out designer file (this throws) - ddDesigner.CheckoutFile(_serviceProvider); - - // Write out the new code - designerWriter = new DocDataTextWriter(ddDesigner); - designerWriter.Write(generatedCode); - designerWriter.Flush(); - designerWriter.Close(); - } - } - } - finally - { - if (designerWriter != null) - { - designerWriter.Dispose(); - } - if (ddDesigner != null) - { - ddDesigner.Dispose(); - } - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Virtual method to allow language specific determination - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual bool ShouldDeclareField(string name, string typeName) - { - // Don't add field if already defined in codebehind or exposed from base class - bool declareField = true; - if (_codeFields != null && _codeFields.ContainsKey(name)) - { - FieldData fieldData = _codeFields[name]; - if (fieldData != null) - { - if (fieldData.Depth == 0) - { - // For immediate class we don't re-declare regardless - // of access modifiers. If the field is not visible to the run-time - // it will not be set and code against it will fail. - declareField = false; - } - else if (fieldData.IsProtected || fieldData.IsPublic) - { - // For bases we do not re-declare if already accessible - // (internal, private are not accesible to page assembly) - declareField = false; - } - } - } - - return declareField; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Virtual method to allow language specific adjustments - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual string GetDeclarationTypeName(string name, string typeName) - { - return typeName; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Virtual method to allow language specific adjustment of root classname namespace - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual string GetClassNamespace() - { - return _className_Namespace; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Virtual method to allow language specific adjustment of field - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual void SetAdditionalFieldData(CodeMemberField field) - { - return; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Compare buffers ignoring whitespace - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ bool BufferEquals(string str1, string str2) - { - int i1 = 0; - int i2 = 0; - int len1 = str1.Length; - int len2 = str2.Length; - - for (; ; ) - { - while (i1 < len1 && char.IsWhiteSpace(str1[i1])) - i1++; - - while (i2 < len2 && char.IsWhiteSpace(str2[i2])) - i2++; - - if (i1 >= len1) - { - if (i2 >= len2) - { - return true; // ended with whitespace - } - return false; // str1 ended before str2 - } - else if (i2 >= len2) - { - return false; // str2 ended before str1 - } - else if (str1[i1] != str2[i2]) - { - return false; // different chars - } - - i1++; i2++; // advance - } - } - } -} - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/FieldData.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/FieldData.cs deleted file mode 100644 index a68af5d6574..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/FieldData.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.CodeDom; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.IO; -using System.Text; -using System.Globalization; -using System.Reflection; -using EnvDTE; -using EnvDTE80; -using Microsoft.VisualStudio.Designer.Interfaces; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.Shell.Design; -using Microsoft.VisualStudio.Shell.Design.Serialization; - -using IServiceProvider = System.IServiceProvider; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - internal class FieldData - { - private string _name; - private string _class; - private int _depth; - private bool _isPrivate; - private bool _isProtected; - private bool _isPublic; - - public FieldData(CodeClass codeClass, CodeVariable codeVariable, int depth) - { - _name = codeVariable.Name; - _class = codeClass.FullName; - _depth = depth; - vsCMAccess access = codeVariable.Access; - _isPrivate = ((access & vsCMAccess.vsCMAccessPrivate) == vsCMAccess.vsCMAccessPrivate); - _isProtected = ((access & vsCMAccess.vsCMAccessProtected) == vsCMAccess.vsCMAccessProtected); - - // Special casing vsCMAccessAssemblyOrFamily - if ((access & vsCMAccess.vsCMAccessAssemblyOrFamily) == vsCMAccess.vsCMAccessAssemblyOrFamily) - _isProtected = true; - - _isPublic = ((access & vsCMAccess.vsCMAccessPublic) == vsCMAccess.vsCMAccessPublic); - } - - public FieldData(string name) - { - _name = name; - _class = null; - _depth = 0; - _isPrivate = false; - _isProtected = false; - _isPublic = true; - } - - public bool IsPrivate - { - get - { - return _isPrivate; - } - } - - public bool IsProtected - { - get - { - return _isProtected; - } - } - - public bool IsPublic - { - get - { - return _isPublic; - } - } - - public string Name - { - get - { - return _name; - } - } - - public int Depth - { - get - { - return _depth; - } - } - - public string Class - { - get - { - return _class; - } - } - } - - internal class FieldDataDictionary : Dictionary - { - public FieldDataDictionary(bool caseSensitive) : base(caseSensitive ? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase) - { - } - } -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/LockedDocData.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/LockedDocData.cs deleted file mode 100644 index d44f1779827..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/LockedDocData.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.Shell.Design.Serialization; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - internal class LockedDocData : DocData - { - private IServiceProvider _serviceProvider; - private RunningDocumentTable _rdt; - private uint _cookie; - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Constructor. Aquires edit lock on document. - /// - ///------------------------------------------------------------------------------------------------------------- - public LockedDocData(IServiceProvider serviceProvider, string fileName) : base(serviceProvider, fileName) - { - _serviceProvider = serviceProvider; - _rdt = new RunningDocumentTable(serviceProvider); - - // Locate and lock the document - _rdt.FindDocument(fileName, out _cookie); - _rdt.LockDocument(_VSRDTFLAGS.RDT_EditLock , _cookie); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Override of Dispose so we can free our lock after DocData. - /// - ///------------------------------------------------------------------------------------------------------------- - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (disposing) - { - if (_cookie != 0 && _rdt != null) - { - // prevent recursion - uint cookie = _cookie; - _cookie = 0; - - try - { - // Unlock the document, specifying to save if this is the last lock and the buffer is dirty - _rdt.UnlockDocument(_VSRDTFLAGS.RDT_EditLock | _VSRDTFLAGS.RDT_Unlock_SaveIfDirty, cookie); - } - finally - { - _cookie = 0; - _rdt = null; - } - } - _serviceProvider = null; - } - } - } -} - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/VsHierarchyItem.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/VsHierarchyItem.cs deleted file mode 100644 index 00b73a4f23b..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/VsHierarchyItem.cs +++ /dev/null @@ -1,697 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Diagnostics; -using System.Drawing; -using System.IO; -using System.Runtime.InteropServices; -using EnvDTE; -using EnvDTE80; -using Microsoft.VisualStudio; -using Microsoft.VisualStudio.OLE.Interop; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.TextManager.Interop; -using VSLangProj; - -using IServiceProvider = System.IServiceProvider; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; -using ErrorHandler = Microsoft.VisualStudio.ErrorHandler; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - internal class VsHierarchyItem - { - private uint _vsitemid; - private IVsHierarchy _hier; - private ServiceProvider _serviceProvider; - - //-------------------------------------------------------------------------------------------- - /// - /// Constructor - /// - /// Hiearchy item id - /// Hiearchy interface (typically the project) - //-------------------------------------------------------------------------------------------- - internal VsHierarchyItem(uint id, IVsHierarchy hier) - { - Debug.Assert(hier != null, "hier cannot be null"); - _vsitemid = id; - _hier = hier; - } - - internal VsHierarchyItem(IVsHierarchy hier) - { - Debug.Assert(hier != null, "hier cannot be null"); - _vsitemid = VSConstants.VSITEMID_ROOT; - _hier = hier; - } - - public override string ToString() - { - return Name(); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Locates the item in the provided hierarchy using the provided moniker - /// and return a VsHierarchyItem for it - /// - //-------------------------------------------------------------------------------------------- - internal static VsHierarchyItem CreateFromMoniker(string moniker, IVsHierarchy hier) - { - VsHierarchyItem item = null; - - if (!string.IsNullOrEmpty(moniker) && hier != null) - { - IVsProject proj = hier as IVsProject; - if (proj != null) - { - int hr; - int isFound = 0; - uint itemid = VSConstants.VSITEMID_NIL; - VSDOCUMENTPRIORITY[] priority = new VSDOCUMENTPRIORITY[1]; - hr = proj.IsDocumentInProject(moniker, out isFound, priority, out itemid); - if (ErrorHandler.Succeeded(hr) && isFound != 0 && itemid != VSConstants.VSITEMID_NIL) - { - item = new VsHierarchyItem(itemid, hier); - } - - } - } - - return item; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Item's id which is unique for the hieararchy - /// - //-------------------------------------------------------------------------------------------- - internal uint VsItemID - { - get - { - return _vsitemid; - } - set - { - _vsitemid = value; - } - } - - //-------------------------------------------------------------------------------------------- - /// - /// Read only access to the hierarchy interface - /// - //-------------------------------------------------------------------------------------------- - internal IVsHierarchy Hierarchy - { - get - { - return _hier; - } - } - - //-------------------------------------------------------------------------------------------- - /// - /// Read only access to the uihierarchy interface - /// - //-------------------------------------------------------------------------------------------- - public IVsUIHierarchy UIHierarchy() - { - return _hier as IVsUIHierarchy; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get the root as a VsHierarchyItem - /// - //-------------------------------------------------------------------------------------------- - internal VsHierarchyItem Root() - { - return new VsHierarchyItem(VSConstants.VSITEMID_ROOT, _hier); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Gets the save name for the item. The save name is the string - /// shown in the save and save changes dialog boxes. - /// - /// - //-------------------------------------------------------------------------------------------- - internal string SaveName() - { - object o = GetPropHelper(__VSHPROPID.VSHPROPID_SaveName); - - return (o is string) ? (string)o : string.Empty; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Gets the string displayed in the project window for a particular item - /// - /// Display name for item - //-------------------------------------------------------------------------------------------- - internal string Caption() - { - object o = GetPropHelper(__VSHPROPID.VSHPROPID_Caption); - - return (o is string) ? (string)o : string.Empty; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get the name of the item which is basically the file name - /// plus extension minus the directory - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal string Name() - { - object o = GetPropHelper(__VSHPROPID.VSHPROPID_Name); - - return (o is string) ? (string)o : string.Empty; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Returns the extensibility object - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal object ExtObject() - { - return GetPropHelper(__VSHPROPID.VSHPROPID_ExtObject); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Returns the ProjectItem extensibility object - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal ProjectItem ProjectItem() - { - return ExtObject() as ProjectItem; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Returns the ProjectItems extensibility object - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal ProjectItems ProjectItems() - { - if (IsRootNode()) - { - Project project = ExtObject() as Project; - if (project != null) - { - return project.ProjectItems; - } - } - else - { - ProjectItem projectItem = ProjectItem(); - if (projectItem != null) - { - return projectItem.ProjectItems; - } - } - return null; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Returns the the full path of the item using extensibility. - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal string FullPath() - { - string fullPath = ""; - try - { - object obj = ExtObject(); - - if(obj is EnvDTE.Project) - { - EnvDTE.Project project = obj as EnvDTE.Project; - if(project != null) - fullPath = project.Properties.Item("FullPath").Value as string; - } - else if(obj is EnvDTE.ProjectItem) - { - EnvDTE.ProjectItem projItem = obj as EnvDTE.ProjectItem; - if(projItem != null) - fullPath = projItem.Properties.Item("FullPath").Value as string; - } - } - catch - { - } - return fullPath; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Returns the relative path of the project item - /// - /// folder\file.ext - /// - ///-------------------------------------------------------------------------------------------- - internal string ProjRelativePath() - { - string projRelativePath = null; - - string rootProjectDir = Root().ProjectDir(); - rootProjectDir = WAUtilities.EnsureTrailingBackSlash(rootProjectDir); - string fullPath = FullPath(); - - if (!string.IsNullOrEmpty(rootProjectDir) && !string.IsNullOrEmpty(fullPath)) - { - projRelativePath = WAUtilities.MakeRelativePath(fullPath, rootProjectDir); - } - - return projRelativePath; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Returns the relative path of the project item - /// - /// folder/file.ext - /// - ///-------------------------------------------------------------------------------------------- - internal string ProjRelativeUrl() - { - string projRelativeUrl = null; - - string projRelativePath = ProjRelativePath(); - if (!string.IsNullOrEmpty(projRelativePath)) - { - projRelativeUrl = projRelativePath.Replace(Path.DirectorySeparatorChar, '/'); - } - - return projRelativeUrl; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Gets full path to project directory for this item - /// - /// - //-------------------------------------------------------------------------------------------- - internal string ProjectDir() - { - object o = GetPropHelper(__VSHPROPID.VSHPROPID_ProjectDir); - - return (o is string) ? (string)o : string.Empty; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get type name for this item. This is the display name used in the - /// title bar to identify the type of the node or hierarchy. - /// - /// - //-------------------------------------------------------------------------------------------- - internal bool IsRootNode() - { - return _vsitemid == VSConstants.VSITEMID_ROOT; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Gets the type guid for this item and compares against GUID_ItemType_PhysicalFile - /// - /// - //-------------------------------------------------------------------------------------------- - internal bool IsFile() - { - Guid guid = GetGuidPropHelper(__VSHPROPID.VSHPROPID_TypeGuid); - return guid.CompareTo(VSConstants.GUID_ItemType_PhysicalFile) == 0; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns the current contents of a document - /// - ///------------------------------------------------------------------------------------------------------------- - public string GetDocumentText() - { - string text = null; - IVsPersistDocData docData = null; - - try - { - // Get or create the buffer - IVsTextLines buffer = GetRunningDocumentTextBuffer(); - if (buffer == null) - { - docData = CreateDocumentData(); - buffer = docData as IVsTextLines; - } - - // get the text from the buffer - if (buffer != null) - { - IVsTextStream textStream = buffer as IVsTextStream; - if (textStream != null) - { - int length; - int hr = textStream.GetSize(out length); - if (ErrorHandler.Succeeded(hr)) - { - if (length > 0) - { - IntPtr pText = Marshal.AllocCoTaskMem((length + 1) * 2); - try - { - hr = textStream.GetStream(0, length, pText); - if (ErrorHandler.Succeeded(hr)) - { - text = Marshal.PtrToStringUni(pText); - } - } - finally - { - Marshal.FreeCoTaskMem(pText); - } - } - else - { - text = string.Empty; - } - } - } - } - } - finally - { - if (docData != null) - { - docData.Close(); - } - } - - return text; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Creates and loads the document data - /// (You must Close() it when done) - /// - ///------------------------------------------------------------------------------------------------------------- - public IVsPersistDocData CreateDocumentData() - { - if (IsFile()) - { - string fullPath = FullPath(); - if (!string.IsNullOrEmpty(fullPath)) - { - IOleServiceProvider serviceProvider = (IOleServiceProvider)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(IOleServiceProvider)); - IVsPersistDocData docData = WAUtilities.CreateSitedInstance(serviceProvider, typeof(VsTextBufferClass).GUID); - if (docData != null) - { - int hr = docData.LoadDocData(fullPath); - if (ErrorHandler.Succeeded(hr)) - { - return docData; - } - } - } - } - return null; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// If the document is open, it returns the IVsTextLines. - /// - ///------------------------------------------------------------------------------------------------------------- - public IVsTextLines GetRunningDocumentTextBuffer() - { - IVsTextLines buffer = null; - - IVsPersistDocData docData = GetRunningDocumentData(); - if (docData != null) - { - buffer = docData as IVsTextLines; - if (buffer == null) - { - IVsTextBufferProvider provider = docData as IVsTextBufferProvider; - if (provider != null) - { - provider.GetTextBuffer(out buffer); - } - } - } - - return buffer; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// If the document is open, it returns the IVsPersistDocData for it. - /// - ///------------------------------------------------------------------------------------------------------------- - public IVsPersistDocData GetRunningDocumentData() - { - IVsPersistDocData persistDocData = null; - - IntPtr docData = IntPtr.Zero; - try - { - docData = GetRunningDocData(); - if (docData != IntPtr.Zero) - { - persistDocData = Marshal.GetObjectForIUnknown(docData) as IVsPersistDocData; - } - } - finally - { - if (docData != IntPtr.Zero) - { - Marshal.Release(docData); - } - } - - return persistDocData; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// If the document is open, it returns the IntPtr to the doc data. - /// (This is ref-counted and must be released with Marshal.Release()) - /// - ///------------------------------------------------------------------------------------------------------------- - public IntPtr GetRunningDocData() - { - IntPtr docData = IntPtr.Zero; - - if (IsFile()) - { - string fullPath = FullPath(); - if (!string.IsNullOrEmpty(fullPath)) - { - IVsRunningDocumentTable rdt = GetService(); - if (rdt != null) - { - _VSRDTFLAGS flags = _VSRDTFLAGS.RDT_NoLock; - uint itemid; - IVsHierarchy hierarchy; - uint docCookie; - rdt.FindAndLockDocument - ( - (uint)flags, - fullPath, - out hierarchy, - out itemid, - out docData, - out docCookie - ); - } - } - } - - return docData; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Gets the project item Properties collection. - /// - ///------------------------------------------------------------------------------------------------------------- - public Properties Properties() - { - object obj = ExtObject(); - if(obj is EnvDTE.Project) - return ((EnvDTE.Project)obj).Properties; - else if(obj is EnvDTE.ProjectItem) - return ((EnvDTE.ProjectItem)obj).Properties; - return null; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Gets the build action of the item. - /// If not found returns build action none. - /// - ///------------------------------------------------------------------------------------------------------------- - public prjBuildAction BuildAction() - { - Properties props = Properties(); - if (props != null) - { - Property propBuildAction = props.Item("BuildAction"); - if (propBuildAction != null) - { - object objValue = propBuildAction.Value; - if (objValue != null) - { - prjBuildAction buildAction = (prjBuildAction)objValue; - return buildAction; - } - } - } - return prjBuildAction.prjBuildActionNone; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns true if the build action of the item is compile. - /// - ///------------------------------------------------------------------------------------------------------------- - public bool IsBuildActionCompile() - { - prjBuildAction buildAction = BuildAction(); - if (buildAction == prjBuildAction.prjBuildActionCompile) - { - return true; - } - return false; - } - - - //-------------------------------------------------------------------------------------------- - /// - /// Get the specified property from the __VSHPROPID enumeration for this item - /// - //-------------------------------------------------------------------------------------------- - private object GetPropHelper(__VSHPROPID propid) - { - return GetPropHelper(_vsitemid, (int)propid); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get the specified property from the __VSHPROPID2 enumeration for this item - /// - //-------------------------------------------------------------------------------------------- - private object GetPropHelper(__VSHPROPID2 propid) - { - return GetPropHelper(_vsitemid, (int)propid); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get the specified property for the specified item - /// - //-------------------------------------------------------------------------------------------- - private object GetPropHelper(uint itemid, int propid) - { - try - { - object o = null; - - if (_hier != null) - { - int hr = _hier.GetProperty(itemid, propid, out o); - } - - return o; - } - catch(Exception) - { - return null; - } - } - - //-------------------------------------------------------------------------------------------- - /// - /// Calls IVsHIerachy::GetGuidProperty - /// - //-------------------------------------------------------------------------------------------- - internal Guid GetGuidPropHelper(Microsoft.VisualStudio.Shell.Interop.__VSHPROPID propid) - { - Guid guid; - try - { - _hier.GetGuidProperty(_vsitemid, (int)propid, out guid); - } - catch(Exception) - { - guid = Guid.Empty; - } - return guid; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Get hierarchy site - /// - ///-------------------------------------------------------------------------------------------- - public IOleServiceProvider Site() - { - IOleServiceProvider serviceProvider = null; - if (_hier != null) - { - _hier.GetSite(out serviceProvider); - } - return serviceProvider; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helper to get a shell service interface - /// - ///-------------------------------------------------------------------------------------------- - public InterfaceType GetService() where InterfaceType : class - { - InterfaceType service = null; - - try - { - if (_serviceProvider == null) - { - IOleServiceProvider serviceProvider = Site(); - if (serviceProvider != null) - { - _serviceProvider = new ServiceProvider(serviceProvider); - } - } - - if (_serviceProvider != null) - { - service = _serviceProvider.GetService(typeof(InterfaceType)) as InterfaceType; - } - } - catch - { - } - - return service; - } - - } - -} - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/WAUtilities.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/WAUtilities.cs deleted file mode 100644 index 53d6baf6f3c..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/WAUtilities.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Collections; -using System.Diagnostics; -using System.Globalization; -using System.Text; -using System.Runtime.InteropServices; -using System.IO; -using System.Reflection; -using System.Threading; -using System.Windows.Forms; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.OLE.Interop; -using Microsoft.VisualStudio.Shell; -using Microsoft.Win32; -using IServiceProvider = System.IServiceProvider; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - internal class WAUtilities - { - - ///-------------------------------------------------------------------------------------------- - /// - /// Helper to create an instance from the local registry given a CLSID Guid - /// - ///-------------------------------------------------------------------------------------------- - public static InterfaceType CreateInstance(IServiceProvider serviceProvider, Guid clsid) where InterfaceType : class - { - InterfaceType instance = null; - - if (clsid != Guid.Empty) - { - ILocalRegistry localRegistry = GetService(serviceProvider); - if (localRegistry != null) - { - IntPtr pInstance = IntPtr.Zero; - Guid iidUnknown = NativeMethods.IID_IUnknown; - - try - { - localRegistry.CreateInstance(clsid, null, ref iidUnknown, NativeMethods.CLSCTX_INPROC_SERVER, out pInstance); - } - catch { } - - if (pInstance != IntPtr.Zero) - { - try - { - instance = Marshal.GetObjectForIUnknown(pInstance) as InterfaceType; - } - catch { } - - try - { - Marshal.Release(pInstance); - } - catch { } - } - } - } - - return instance; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helper to create an instance from the local registry given a CLSID Guid - /// - ///-------------------------------------------------------------------------------------------- - public static InterfaceType CreateSitedInstance(IServiceProvider serviceProvider, Guid clsid) where InterfaceType : class - { - InterfaceType instance = CreateInstance(serviceProvider, clsid); - - if (instance != null) - { - IObjectWithSite sitedObject = instance as IObjectWithSite; - IOleServiceProvider site = GetService(serviceProvider); - if (sitedObject != null && site != null) - { - sitedObject.SetSite(site); - } - else - { - instance = null; // failed to site - } - } - - return instance; - } - public static InterfaceType CreateSitedInstance(IOleServiceProvider serviceProvider, Guid clsid) where InterfaceType : class - { - return CreateSitedInstance(new ServiceProvider(serviceProvider), clsid); - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helper to get a shell service interface - /// - ///-------------------------------------------------------------------------------------------- - public static InterfaceType GetService(IServiceProvider serviceProvider) where InterfaceType : class - { - InterfaceType service = null; - - try - { - service = serviceProvider.GetService(typeof(InterfaceType)) as InterfaceType; - } - catch - { - } - - return service; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helpers to ensure (or remove) trailing slashes (or back slashes) - /// - ///-------------------------------------------------------------------------------------------- - public static string EnsureTrailingSlash(string str) - { - if (str != null && !str.EndsWith("/")) - { - str += "/"; - } - return str; - } - public static string EnsureTrailingBackSlash(string str) - { - if (str != null && !str.EndsWith("\\")) - { - str += "\\"; - } - return str; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helpers to make relative paths/urls from physical paths - /// - ///-------------------------------------------------------------------------------------------- - public static string MakeRelativePath(string fullPath, string basePath) - { - string separator = Path.DirectorySeparatorChar.ToString(); - string tempBasePath = basePath; - string tempFullPath = fullPath; - string relativePath = null; - - if (!tempBasePath.EndsWith(separator)) - tempBasePath += separator; - tempFullPath = tempFullPath.ToLowerInvariant(); - tempBasePath = tempBasePath.ToLowerInvariant(); - - while (!string.IsNullOrEmpty(tempBasePath)) - { - if (tempFullPath.StartsWith(tempBasePath)) - { - relativePath += fullPath.Remove(0, tempBasePath.Length); - if (relativePath == separator) - relativePath = ""; - return relativePath; - } - else - { - tempBasePath = tempBasePath.Remove(tempBasePath.Length - 1); - int nLastIndex = tempBasePath.LastIndexOf(separator); - if (-1 != nLastIndex) - { - tempBasePath = tempBasePath.Remove(nLastIndex + 1); - relativePath += ".."; - relativePath += separator; - } - else - return fullPath; - } - } - - return fullPath; - } - } - - -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/WebProjectBase.Files b/vsintegration/src/FSharp.ProjectSystem.Base/Project/WebProjectBase.Files deleted file mode 100644 index d9e684eb298..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/WebProjectBase.Files +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - ProjectBase\Web\CodeBehindCodeGenerator.cs - true - - - ProjectBase\Web\FieldData.cs - true - - - ProjectBase\Web\LockedDocData.cs - true - - - ProjectBase\Web\VsHierarchyItem.cs - true - - - ProjectBase\Web\WAUtilities.cs - true - - - - \ No newline at end of file From 9586ecdc49a52b87d7d8c0e873acf493aa30cdcd Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Sat, 10 Feb 2018 09:10:32 -0800 Subject: [PATCH 10/14] convert FSharp.UIResources to the dotnet SDK --- VisualFSharp.sln | 22 +-- .../fsharp-vsintegration-src-build.proj | 1 + .../FSharp.UIResources/Directory.Build.props | 3 + .../Directory.Build.targets | 3 + .../FSharp.UIResources.csproj | 125 +++++------------- .../FSharp.UIResources/InternalsVisibleTo.cs | 13 -- .../Properties/AssemblyInfo.cs | 15 --- 7 files changed, 53 insertions(+), 129 deletions(-) create mode 100644 vsintegration/src/FSharp.UIResources/Directory.Build.props create mode 100644 vsintegration/src/FSharp.UIResources/Directory.Build.targets delete mode 100644 vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs diff --git a/VisualFSharp.sln b/VisualFSharp.sln index ed68f53adf9..235b6ebec92 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.27116.0 +VisualStudioVersion = 15.0.27130.2024 MinimumVisualStudioVersion = 10.0.40219.1 Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Private", "src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}" EndProject @@ -20,7 +20,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.LanguageService.Base EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor", "vsintegration\src\FSharp.Editor\FSharp.Editor.fsproj", "{65E0E82A-EACE-4787-8994-888674C2FE87}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectSystem.Base", "vsintegration\src\FSharp.ProjectSystem.Base\Project\ProjectSystem.Base.csproj", "{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectSystem.Base", "vsintegration\src\FSharp.ProjectSystem.Base\Project\ProjectSystem.Base.csproj", "{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FSharp.PropertiesPages", "vsintegration\src\FSharp.ProjectSystem.PropertyPages\FSharp.PropertiesPages.vbproj", "{FCFB214C-462E-42B3-91CA-FC557EFEE74F}" EndProject @@ -126,7 +126,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{D086C8C6 EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "LanguageServiceProfiling", "vsintegration\Utils\LanguageServiceProfiling\LanguageServiceProfiling.fsproj", "{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.UIResources", "vsintegration\src\FSharp.UIResources\FSharp.UIResources.csproj", "{C4586A06-1402-48BC-8E35-A1B8642F895B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.UIResources", "vsintegration\src\FSharp.UIResources\FSharp.UIResources.csproj", "{C4586A06-1402-48BC-8E35-A1B8642F895B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}" EndProject @@ -238,10 +238,10 @@ Global {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Debug|Any CPU.Build.0 = Debug|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Debug|x86.ActiveCfg = Debug|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Debug|x86.Build.0 = Debug|Any CPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|Any CPU.Build.0 = Proto|Any CPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|x86.ActiveCfg = Proto|Any CPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|x86.Build.0 = Proto|Any CPU + {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|Any CPU.ActiveCfg = Release|Any CPU + {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|Any CPU.Build.0 = Release|Any CPU + {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|x86.ActiveCfg = Release|Any CPU + {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|x86.Build.0 = Release|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Release|Any CPU.ActiveCfg = Release|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Release|Any CPU.Build.0 = Release|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Release|x86.ActiveCfg = Release|Any CPU @@ -706,10 +706,10 @@ Global {C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|x86.ActiveCfg = Debug|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|x86.Build.0 = Debug|Any CPU - {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|Any CPU.Build.0 = Proto|Any CPU - {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|x86.ActiveCfg = Proto|Any CPU - {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|x86.Build.0 = Proto|Any CPU + {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|Any CPU.ActiveCfg = Release|Any CPU + {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|Any CPU.Build.0 = Release|Any CPU + {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|x86.ActiveCfg = Release|Any CPU + {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|x86.Build.0 = Release|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Release|Any CPU.ActiveCfg = Release|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Release|Any CPU.Build.0 = Release|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Release|x86.ActiveCfg = Release|Any CPU diff --git a/vsintegration/fsharp-vsintegration-src-build.proj b/vsintegration/fsharp-vsintegration-src-build.proj index 13c3e74559a..0a1a54e3a3a 100644 --- a/vsintegration/fsharp-vsintegration-src-build.proj +++ b/vsintegration/fsharp-vsintegration-src-build.proj @@ -19,6 +19,7 @@ + diff --git a/vsintegration/src/FSharp.UIResources/Directory.Build.props b/vsintegration/src/FSharp.UIResources/Directory.Build.props new file mode 100644 index 00000000000..bb8eac309b1 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.UIResources/Directory.Build.targets b/vsintegration/src/FSharp.UIResources/Directory.Build.targets new file mode 100644 index 00000000000..ccd47cc0a9a --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj b/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj index bd70468bbf1..3c592088835 100644 --- a/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj +++ b/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj @@ -1,111 +1,56 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - CSharp - 15.4.1.0 - cs - - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin - AnyCPU - {C4586A06-1402-48BC-8E35-A1B8642F895B} + net46 Library - Properties + false Microsoft.VisualStudio.FSharp.UIResources - FSharp.UIResources - LIBRARY - true - $(DefineConstants) - v4.6 - true - - - true - $(FSharpSourcesRoot)\fsharp\msft.pubkey - STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants) - true - true + - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - + + + + + + - + - + + + - - CodeFixesOptionControl.xaml - - - - LanguageServicePerformanceOptionControl.xaml - - - IntelliSenseOptionControl.xaml - - - - QuickInfoOptionControl.xaml - - - - True - True - Strings.resx - + + + + + + + - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - PublicResXFileCodeGenerator - Strings.Designer.cs - Designer - - - - - \ No newline at end of file + + + $(VS150COMNTOOLS)\..\..\MSBuild\$(VisualStudioVersion)\Bin + $(VSMSBuildBinDir)\Microsoft.CSharp.targets + + + + + false + + + + diff --git a/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs b/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs deleted file mode 100644 index 0d0fd353a98..00000000000 --- a/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("VisualFSharp.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.LanguageService, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.Base, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.Editor, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] - diff --git a/vsintegration/src/FSharp.UIResources/Properties/AssemblyInfo.cs b/vsintegration/src/FSharp.UIResources/Properties/AssemblyInfo.cs index 18439c74d35..7c13fcd592a 100644 --- a/vsintegration/src/FSharp.UIResources/Properties/AssemblyInfo.cs +++ b/vsintegration/src/FSharp.UIResources/Properties/AssemblyInfo.cs @@ -1,22 +1,7 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -using System; -using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("FSharp.UIResources")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft.VisualFSharpTools")] -[assembly: AssemblyProduct("FSharp.UIResources")] -[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation.")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. From b921e22a42eb0a6c3debbd389324e655678f627e Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Wed, 21 Feb 2018 16:46:21 -0800 Subject: [PATCH 11/14] set OutputPath after TargetFramework --- FSharp.Directory.Build.props | 5 +---- FSharp.Directory.Build.targets | 7 ++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/FSharp.Directory.Build.props b/FSharp.Directory.Build.props index 24d859697bc..ecae832bc7c 100644 --- a/FSharp.Directory.Build.props +++ b/FSharp.Directory.Build.props @@ -10,11 +10,7 @@ $(RepoRoot)src $(RepoRoot)Tools false - coreclr - net40 $(RepoRoot)Proto\net40\bin - $(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\bin - $(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\obj\$(MSBuildProjectName)\ @@ -47,6 +43,7 @@ fs false + true diff --git a/FSharp.Directory.Build.targets b/FSharp.Directory.Build.targets index 6150ad20709..3cd3205962b 100644 --- a/FSharp.Directory.Build.targets +++ b/FSharp.Directory.Build.targets @@ -1,9 +1,10 @@ - $(AssemblyName) - $(MSBuildProjectName) - $(OutputPath)\$(ProjectName).xml + coreclr + net40 + $(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\bin + $(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\obj\$(MSBuildProjectName)\ en;$(XlfLanguages) From d24450789209e353357d46bb37babb4afbffa8e8 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Wed, 21 Feb 2018 16:49:51 -0800 Subject: [PATCH 12/14] generate NuGet package version from #4350 --- build/targets/AssemblyVersions.props | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/targets/AssemblyVersions.props b/build/targets/AssemblyVersions.props index a3084a8ef91..0fa632f91eb 100644 --- a/build/targets/AssemblyVersions.props +++ b/build/targets/AssemblyVersions.props @@ -28,17 +28,19 @@ Given $(BUILD_BUILDNUMBER) = '20161225.1' Given $(MicroBuildAssemblyVersion) = '15.4.1.0' - Then $(BuildTimeStamp_Day) = 161225 + Then $(BuildTimeStamp_Date) = 161225 Then $(BuildTimeStamp_Number) = 01 Then $(BuildTimeStamp) = 16122501 Then $(MicroBuildAssemblyVersion_WithoutRevision) = 15.4.1 Then $(VsixPackageVersion) = 15.4.1.16122501 + Then $(NuGetPackageVersionSuffix) = 161225-01 --> - $(BUILD_BUILDNUMBER.Split('.')[0].Substring(2)) + $(BUILD_BUILDNUMBER.Split('.')[0].Substring(2)) $(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0')) - $(BuildTimeStamp_Day)$(BuildTimeStamp_Number) + $(BuildTimeStamp_Date)$(BuildTimeStamp_Number) $(MicroBuildAssemblyVersion.Substring(0, $(MicroBuildAssemblyVersion.LastIndexOf('.')))) $(MicroBuildAssemblyVersion_WithoutRevision).$(BuildTimeStamp) + $(BuildTimeStamp_Date)-$(BuildTimeStamp_Number) From b8a36bef0c8dddd08f86b0df10ba0e23b9dacc51 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 22 Feb 2018 15:34:07 -0800 Subject: [PATCH 13/14] fix package versions --- build/targets/PackageVersions.props | 2 ++ vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build/targets/PackageVersions.props b/build/targets/PackageVersions.props index 70c186b564d..1f4aa446add 100644 --- a/build/targets/PackageVersions.props +++ b/build/targets/PackageVersions.props @@ -30,6 +30,8 @@ 10.0.30319 11.0.61030 12.0.30110 + 7.10.6070 + 8.0.50727 10.0.30319 15.1.192 12.0.4 diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj index 8fb01eb4787..e900119ebe6 100644 --- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj +++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj @@ -115,7 +115,6 @@ - From ecf4ba896489e2ffaffca620602a821bff8c0a28 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 22 Feb 2018 15:34:33 -0800 Subject: [PATCH 14/14] fix design-time builds in VSSDK projects that don't produce a VSIX --- vsintegration/DisableVsixManifestTargets.targets | 4 ++++ vsintegration/FSharp.Directory.Build.targets | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 vsintegration/DisableVsixManifestTargets.targets diff --git a/vsintegration/DisableVsixManifestTargets.targets b/vsintegration/DisableVsixManifestTargets.targets new file mode 100644 index 00000000000..86c5ada70cb --- /dev/null +++ b/vsintegration/DisableVsixManifestTargets.targets @@ -0,0 +1,4 @@ + + + + diff --git a/vsintegration/FSharp.Directory.Build.targets b/vsintegration/FSharp.Directory.Build.targets index 44a47de3243..528e41da3a9 100644 --- a/vsintegration/FSharp.Directory.Build.targets +++ b/vsintegration/FSharp.Directory.Build.targets @@ -11,11 +11,11 @@ net462 - - - + + + + + +