diff --git a/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.props b/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.props index ca04df941be..0fa6de691de 100644 --- a/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.props +++ b/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.props @@ -15,6 +15,7 @@ $(FSharpSourcesRoot)\..\$(Configuration)\coreclr\bin -rtm-$(BuildRevision.Trim())-0 $(FSPackageVersion)$(PreReleaseSuffix) - -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" -prop "diasymreaderversion=$(MicrosoftDiaSymReaderPackageVersion)" -prop "diasymreaderportablepdbversion=$(MicrosoftDiaSymReaderPortablePdbPackageVersion)" + + diff --git a/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.targets b/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.targets index d6715e4aa35..77715c61129 100644 --- a/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.targets +++ b/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.targets @@ -15,8 +15,6 @@ - - @@ -34,7 +32,7 @@ Outputs='$(FSharpSourcesRoot)\$(Configuration)\artifacts\$(PackageVersion)\"%(PackageNuspec.Filename)).nupkg'> - -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" -prop "diasymreaderversion=$(MicrosoftDiaSymReaderPackageVersion)" -prop "diasymreaderportablepdbversion=$(MicrosoftDiaSymReaderPortablePdbPackageVersion)" + -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" -prop "diasymreaderversion=$(MicrosoftDiaSymReaderPackageVersion)" -prop "diasymreaderportablepdbversion=$(MicrosoftDiaSymReaderPortablePdbPackageVersion)" -prop "githeadsha=$(GitHeadSha)" diff --git a/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec b/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec index 91a5f253020..b5276a71458 100644 --- a/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec +++ b/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec @@ -4,7 +4,8 @@ Microsoft.FSharp.Compiler .NET Core compatible version of the fsharp compiler fsc.exe. - Supported Platforms: - .NET Core (.netstandard1.6) + Supported Platforms: - .NET Core (.netstandard1.6). + Commit hash: $githeadsha$. en-US true diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.LatestNuget.nuspec b/src/fsharp/FSharp.Core.nuget/FSharp.Core.LatestNuget.nuspec index 4bdef1b8ed1..9eed52354c7 100644 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.LatestNuget.nuspec +++ b/src/fsharp/FSharp.Core.nuget/FSharp.Core.LatestNuget.nuspec @@ -11,6 +11,7 @@ .NET 4.5+ (net45) netstandard1.6 (netstandard1.6) netstandard2.0 (netstandard2.0) + Commit hash: $githeadsha$. en-US $version$ diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.proj b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.proj index f8dc68b0c9e..d14d40aeda2 100644 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.proj +++ b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.proj @@ -61,7 +61,7 @@ $(FSharpCoreLatestTargetPackageVersion) $(FSharpCoreLatestTargetMajorVersion) - -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" + -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" -prop "githeadsha=$(GitHeadSha)" diff --git a/vsintegration/Vsix/RegisterFsharpPackage.pkgdef b/vsintegration/Vsix/RegisterFsharpPackage.pkgdef index a145c9b0e9b..d7c59b2b380 100644 --- a/vsintegration/Vsix/RegisterFsharpPackage.pkgdef +++ b/vsintegration/Vsix/RegisterFsharpPackage.pkgdef @@ -16,7 +16,6 @@ "Package"="{91a04a73-4f2c-4e7c-ad38-c1a68e7da05c}" "ProductDetails"="#9002" "LogoID"="#400" -"UseVSProductID"="1" @="#9001" [$RootKey$\AD7Metrics\ExpressionEvaluator\{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}\{994B45C4-E6E9-11D2-903F-00C04FA302A1}] diff --git a/vsintegration/src/FSharp.Editor/Common/Constants.fs b/vsintegration/src/FSharp.Editor/Common/Constants.fs index be4f0b37ec8..c311a7fefcf 100644 --- a/vsintegration/src/FSharp.Editor/Common/Constants.fs +++ b/vsintegration/src/FSharp.Editor/Common/Constants.fs @@ -17,7 +17,11 @@ module internal FSharpConstants = [] /// "BC6DD5A5-D4D6-4dab-A00D-A51242DBAF1B" let languageServiceGuidString = "BC6DD5A5-D4D6-4dab-A00D-A51242DBAF1B" - + + [] + /// "91a04a73-4f2c-4e7c-ad38-c1a68e7da05c" + let projectPackageGuidString = "91a04a73-4f2c-4e7c-ad38-c1a68e7da05c" + [] /// "F#" let FSharpLanguageName = "F#" diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj index 9a1e8e6cef3..6d64030df35 100644 --- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj +++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj @@ -42,6 +42,7 @@ + diff --git a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs index 148961ae7d9..0524abc5b94 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs @@ -23,6 +23,7 @@ open Microsoft.FSharp.Compiler.CompileOps open Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.VisualStudio open Microsoft.VisualStudio.Editor +open Microsoft.VisualStudio.FSharp.Editor open Microsoft.VisualStudio.FSharp.Editor.SiteProvider open Microsoft.VisualStudio.TextManager.Interop open Microsoft.VisualStudio.LanguageServices @@ -284,6 +285,7 @@ type [, "F#", null, "QuickInfo", "6009")>] [, "F#", null, "Code Fixes", "6010")>] [, "F#", null, "Performance", "6011")>] + [] [, strLanguageName = FSharpConstants.FSharpLanguageName, languageResourceID = 100, diff --git a/vsintegration/src/FSharp.Editor/LanguageService/ProvideFSharpVersionRegistrationAttribute.fs b/vsintegration/src/FSharp.Editor/LanguageService/ProvideFSharpVersionRegistrationAttribute.fs new file mode 100644 index 00000000000..4b6fa6ff05d --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/ProvideFSharpVersionRegistrationAttribute.fs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Diagnostics +open Microsoft.VisualStudio.Shell + +type internal ProvideFSharpVersionRegistrationAttribute(packageGuidString:string, productName:string) = + inherit RegistrationAttribute() + + let keyName = "InstalledProducts\\" + productName + + override this.Register(context:RegistrationAttribute.RegistrationContext) = + // Get the version of this build. This code is executed by CreatePkgDef.exe at build time and NOT at runtime. + let version = FileVersionInfo.GetVersionInfo(typeof.Assembly.Location) + use key = context.CreateKey(keyName) + key.SetValue("Package", Guid.Parse(packageGuidString).ToString("B")) + key.SetValue("PID", version.ProductVersion) + key.SetValue("UseInterface", false) + key.SetValue("UseVSProductID", false) + + override this.Unregister(context:RegistrationAttribute.RegistrationContext) = + context.RemoveKey(keyName)