Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53e87ce

Browse files
authored
Merge pull requestdotnet#4199 from brettfo/assembly-version
ensure all shipped binaries have a non-zero version and commit hash
2 parents7ea142f +bf19ad8 commit53e87ce

File tree

15 files changed

+219
-117
lines changed

15 files changed

+219
-117
lines changed

‎VisualFSharp.sln‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Build.UnitTests", "t
140140
EndProject
141141
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") ="PEVerify","tests\fsharpqa\testenv\src\PEVerify\PEVerify.csproj","{B0689A4E-07D8-494D-A0C8-791CB1D74E54}"
142142
EndProject
143+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") ="AssemblyVersionCheck","tests\fsharpqa\testenv\src\AssemblyVersionCheck\AssemblyVersionCheck.fsproj","{2BE9DC57-34C1-4196-9392-A5F189E6B95A}"
144+
EndProject
143145
Global
144146
GlobalSection(SolutionConfigurationPlatforms) =preSolution
145147
Debug|Any CPU=Debug|Any CPU
@@ -774,6 +776,18 @@ Global
774776
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|Any CPU.Build.0=Release|Any CPU
775777
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|x86.ActiveCfg=Release|Any CPU
776778
{B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|x86.Build.0=Release|Any CPU
779+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
780+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Debug|Any CPU.Build.0=Debug|Any CPU
781+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Debug|x86.ActiveCfg=Debug|Any CPU
782+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Debug|x86.Build.0=Debug|Any CPU
783+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Proto|Any CPU.ActiveCfg=Debug|Any CPU
784+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Proto|Any CPU.Build.0=Debug|Any CPU
785+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Proto|x86.ActiveCfg=Debug|Any CPU
786+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Proto|x86.Build.0=Debug|Any CPU
787+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Release|Any CPU.ActiveCfg=Release|Any CPU
788+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Release|Any CPU.Build.0=Release|Any CPU
789+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Release|x86.ActiveCfg=Release|Any CPU
790+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A}.Release|x86.Build.0=Release|Any CPU
777791
EndGlobalSection
778792
GlobalSection(SolutionProperties) =preSolution
779793
HideSolutionNode =FALSE
@@ -838,6 +852,7 @@ Global
838852
{0385564F-07B4-4264-AB8A-17C393E9140C} ={F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA}
839853
{400FAB03-786E-40CC-85A8-04B0C2869B14} ={CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
840854
{B0689A4E-07D8-494D-A0C8-791CB1D74E54} ={CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
855+
{2BE9DC57-34C1-4196-9392-A5F189E6B95A} ={CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
841856
EndGlobalSection
842857
GlobalSection(ExtensibilityGlobals) =postSolution
843858
SolutionGuid ={48EDBBBE-C8EE-4E3C-8B19-97184A487B37}

‎build.cmd‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -603,10 +603,7 @@ if "%RestorePackages%" == "true" (
603603
)
604604
)
605605

606-
if"%BUILD_PROTO_WITH_CORECLR_LKG%"=="1" (
607-
:: Restore the Tools directory
608-
call%~dp0init-tools.cmd
609-
)
606+
call%~dp0init-tools.cmd
610607

611608
set_dotnetcliexe=%~dp0Tools\dotnetcli\dotnet.exe
612609
set_dotnet20exe=%~dp0Tools\dotnet20\dotnet.exe
@@ -676,7 +673,12 @@ if "%BUILD_PHASE%" == "1" (
676673
@if ERRORLEVEL1echo Error build failed&&goto :failure
677674
)
678675

679-
echo ---------------- Done with build, starting assembly signing ---------------
676+
echo ---------------- Done with build, starting assembly version checks ---------------
677+
setasmvercheckpath=%~dp0tests\fsharpqa\testenv\src\AssemblyVersionCheck
678+
%_dotnet20exe% run -p"%asmvercheckpath%\AssemblyVersionCheck.fsproj""%~dp0build\config\AssemblySignToolData.json""%~dp0%BUILD_CONFIG%"
679+
ifERRORLEVEL1echo Error verifying assembly versions and commit hashes.&&goto :failure
680+
681+
echo ---------------- Done with assembly version checks, starting assembly signing ---------------
680682

681683
ifnot"%SIGN_TYPE%"=="" (
682684
echo build\scripts\run-signtool.cmd -MSBuild%_msbuildexe% -SignType%SIGN_TYPE% -ConfigFile build\config\AssemblySignToolData.json
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<Project>
2+
3+
<ImportProject="GitHash.props" />
4+
5+
<PropertyGroup>
6+
<GeneratedFSharpInternalsVisibleToFile>$(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension)</GeneratedFSharpInternalsVisibleToFile>
7+
</PropertyGroup>
8+
9+
<ItemDefinitionGroup>
10+
<InternalsVisibleTo>
11+
<Visible>false</Visible>
12+
</InternalsVisibleTo>
13+
</ItemDefinitionGroup>
14+
15+
<TargetName="PrepareFSharpGenerateInternalsVisibleToFile"
16+
Condition="'@(InternalsVisibleTo)' != ''">
17+
<PropertyGroup>
18+
<_PublicKey>002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293</_PublicKey>
19+
</PropertyGroup>
20+
<ItemGroup>
21+
<_InternalsVisibleToAttributeInclude="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
22+
<_Parameter1Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key)</_Parameter1>
23+
<_Parameter1Condition="'%(InternalsVisibleTo.Key)' == ''">%(InternalsVisibleTo.Identity), PublicKey=$(_PublicKey)</_Parameter1>
24+
</_InternalsVisibleToAttribute>
25+
</ItemGroup>
26+
</Target>
27+
28+
<TargetName="GenerateFSharpInternalsVisibleToFile"
29+
Inputs="$(MSBuildProjectFile)"
30+
Outputs="$(GeneratedFSharpInternalsVisibleToFile)"
31+
DependsOnTargets="PrepareFSharpGenerateInternalsVisibleToFile;PrepareForBuild"
32+
Condition="'$(Configuration)' != 'Proto' and '@(InternalsVisibleTo)' != ''"
33+
BeforeTargets="CoreCompile">
34+
<WriteCodeFragmentAssemblyAttributes="@(_InternalsVisibleToAttribute)"
35+
Language="$(Language)"
36+
OutputFile="$(GeneratedFSharpInternalsVisibleToFile)">
37+
<OutputTaskParameter="OutputFile"ItemName="CompileBefore" />
38+
<OutputTaskParameter="OutputFile"ItemName="FileWrites" />
39+
</WriteCodeFragment>
40+
</Target>
41+
42+
<TargetName="GenerateAssemblyFileVersion"
43+
BeforeTargets="CoreCompile"
44+
Condition="'$(Configuration)' != 'Proto'">
45+
<PropertyGroup>
46+
<GeneratedFSharpAssemblyVersionFile>$(IntermediateOutputPath)$(MSBuildProjectName).AssemblyAttributes$(DefaultLanguageSourceExtension)</GeneratedFSharpAssemblyVersionFile>
47+
<!-- AssemblyInformationalVersionAttribute issues a by-design warning if the value passed isn't of the form #.#.#.#, but we specifically want to suppress this to allow the commit hash to be embedded.-->
48+
<NoWarnCondition="'$(Language)' == 'F#'">2003;$(NoWarn)</NoWarn>
49+
</PropertyGroup>
50+
51+
<ItemGroup>
52+
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyCompanyAttribute">
53+
<_Parameter1>Microsoft Corporation</_Parameter1>
54+
</_AssemblyVersionAttributes>
55+
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyCopyrightAttribute">
56+
<_Parameter1>&#169; Microsoft Corporation. All Rights Reserved.</_Parameter1>
57+
</_AssemblyVersionAttributes>
58+
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyDescriptionAttribute">
59+
<_Parameter1>$(AssemblyName).dll</_Parameter1>
60+
</_AssemblyVersionAttributes>
61+
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyFileVersionAttribute">
62+
<_Parameter1>$(Build_FileVersion)</_Parameter1>
63+
</_AssemblyVersionAttributes>
64+
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyInformationalVersionAttribute">
65+
<_Parameter1>$(MicroBuildAssemblyVersion). Commit Hash: $(GitHeadSha).</_Parameter1>
66+
</_AssemblyVersionAttributes>
67+
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyProductAttribute">
68+
<_Parameter1>Microsoft&#174; F#</_Parameter1>
69+
</_AssemblyVersionAttributes>
70+
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyTitleAttribute">
71+
<_Parameter1>$(AssemblyName).dll</_Parameter1>
72+
</_AssemblyVersionAttributes>
73+
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyVersionAttribute">
74+
<_Parameter1>$(MicroBuildAssemblyVersion)</_Parameter1>
75+
</_AssemblyVersionAttributes>
76+
</ItemGroup>
77+
78+
<WriteCodeFragmentAssemblyAttributes="@(_AssemblyVersionAttributes)"
79+
Language="$(Language)"
80+
OutputFile="$(GeneratedFSharpAssemblyVersionFile)">
81+
<!-- For FSharp.Core, assembly version must be inserted after all Core files, as it defines F# basic types (strings)-->
82+
<OutputTaskParameter="OutputFile"ItemName="Compile"Condition="'$(AssemblyName)' == 'FSharp.Core' or '$(Language)' != 'F#'" />
83+
<!-- For other assemblies, this must be inserted before all source files, to keep exe's EntryPoints (if any) as the last source file-->
84+
<OutputTaskParameter="OutputFile"ItemName="CompileBefore"Condition="'$(AssemblyName)' != 'FSharp.Core' and '$(Language)' == 'F#'" />
85+
<OutputTaskParameter="OutputFile"ItemName="FileWrites" />
86+
</WriteCodeFragment>
87+
</Target>
88+
89+
</Project>

‎src/FSharpSource.targets‎

Lines changed: 1 addition & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
<RepoRoot>$(MSBuildThisFileDirectory)..\</RepoRoot>
77
</PropertyGroup>
88

9-
<ImportProject="..\build\targets\GitHash.props" />
10-
119
<Choose>
1210
<WhenCondition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release'">
1311
<PropertyGroup>
@@ -368,89 +366,7 @@
368366

369367
</Target>
370368

371-
<PropertyGroupCondition="'$(Configuration)' != 'Proto'">
372-
<GeneratedFSharpInternalsVisibleToFile>$(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension)</GeneratedFSharpInternalsVisibleToFile>
373-
</PropertyGroup>
374-
375-
<ItemDefinitionGroup>
376-
<InternalsVisibleTo>
377-
<Visible>false</Visible>
378-
</InternalsVisibleTo>
379-
</ItemDefinitionGroup>
380-
381-
<TargetName="PrepareFSharpGenerateInternalsVisibleToFile"
382-
Condition="'$(Configuration)' != 'Proto' and '@(InternalsVisibleTo)' != ''">
383-
<PropertyGroup>
384-
<_PublicKey>002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293</_PublicKey>
385-
</PropertyGroup>
386-
<ItemGroup>
387-
<_InternalsVisibleToAttributeInclude="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
388-
<_Parameter1Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key)</_Parameter1>
389-
<_Parameter1Condition="'%(InternalsVisibleTo.Key)' == ''">%(InternalsVisibleTo.Identity), PublicKey=$(_PublicKey)</_Parameter1>
390-
</_InternalsVisibleToAttribute>
391-
</ItemGroup>
392-
</Target>
393-
394-
<TargetName="GenerateFSharpInternalsVisibleToFile"
395-
Inputs="$(MSBuildProjectFile)"
396-
Outputs="$(GeneratedFSharpInternalsVisibleToFile)"
397-
DependsOnTargets="PrepareFSharpGenerateInternalsVisibleToFile;PrepareForBuild"
398-
Condition="'$(Configuration)' != 'Proto' and '@(InternalsVisibleTo)' != ''"
399-
BeforeTargets="CoreCompile">
400-
<WriteCodeFragmentAssemblyAttributes="@(_InternalsVisibleToAttribute)"
401-
Language="$(Language)"
402-
OutputFile="$(GeneratedFSharpInternalsVisibleToFile)">
403-
<OutputTaskParameter="OutputFile"ItemName="CompileBefore" />
404-
<OutputTaskParameter="OutputFile"ItemName="FileWrites" />
405-
</WriteCodeFragment>
406-
</Target>
407-
408-
<TargetName="GenerateAssemblyFileVersion"
409-
BeforeTargets="CoreCompile"
410-
Condition="'$(Configuration)' != 'Proto'">
411-
<PropertyGroup>
412-
<GeneratedFSharpAssemblyVersionFile>$(IntermediateOutputPath)$(MSBuildProjectName).AssemblyVersion$(DefaultLanguageSourceExtension)</GeneratedFSharpAssemblyVersionFile>
413-
<!-- AssemblyInformationalVersionAttribute issues a by-design warning if the value passed isn't of the form #.#.#.#, but we specifically want to suppress this to allow the commit hash to be embedded.-->
414-
<NoWarnCondition="'$(Language)' == 'F#'">2003;$(NoWarn)</NoWarn>
415-
</PropertyGroup>
416-
417-
<ItemGroup>
418-
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyCompanyAttribute">
419-
<_Parameter1>Microsoft Corporation</_Parameter1>
420-
</_AssemblyVersionAttributes>
421-
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyCopyrightAttribute">
422-
<_Parameter1>&#169; Microsoft Corporation. All Rights Reserved.</_Parameter1>
423-
</_AssemblyVersionAttributes>
424-
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyDescriptionAttribute">
425-
<_Parameter1>$(AssemblyName).dll</_Parameter1>
426-
</_AssemblyVersionAttributes>
427-
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyFileVersionAttribute">
428-
<_Parameter1>$(Build_FileVersion)</_Parameter1>
429-
</_AssemblyVersionAttributes>
430-
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyInformationalVersionAttribute">
431-
<_Parameter1>$(MicroBuildAssemblyVersion). Commit Hash: $(GitHeadSha).</_Parameter1>
432-
</_AssemblyVersionAttributes>
433-
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyProductAttribute">
434-
<_Parameter1>Microsoft&#174; F#</_Parameter1>
435-
</_AssemblyVersionAttributes>
436-
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyTitleAttribute">
437-
<_Parameter1>$(AssemblyName).dll</_Parameter1>
438-
</_AssemblyVersionAttributes>
439-
<_AssemblyVersionAttributesInclude="System.Reflection.AssemblyVersionAttribute">
440-
<_Parameter1>$(MicroBuildAssemblyVersion)</_Parameter1>
441-
</_AssemblyVersionAttributes>
442-
</ItemGroup>
443-
444-
<WriteCodeFragmentAssemblyAttributes="@(_AssemblyVersionAttributes)"
445-
Language="$(Language)"
446-
OutputFile="$(GeneratedFSharpAssemblyVersionFile)">
447-
<!-- For FSharp.Core, assembly version must be inserted after all Core files, as it defines F# basic types (strings)-->
448-
<OutputTaskParameter="OutputFile"ItemName="Compile"Condition="'$(AssemblyName)' == 'FSharp.Core'" />
449-
<!-- For other assemblies, this must be inserted before all source files, to keep exe's EntryPoints (if any) as the last source file-->
450-
<OutputTaskParameter="OutputFile"ItemName="CompileBefore"Condition="'$(AssemblyName)' != 'FSharp.Core'" />
451-
<OutputTaskParameter="OutputFile"ItemName="FileWrites" />
452-
</WriteCodeFragment>
453-
</Target>
369+
<ImportProject="..\build\targets\AssemblyAttributes.targets" />
454370

455371
<UsingTaskTaskName="ReplaceFileText"TaskFactory="CodeTaskFactory"AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
456372
<ParameterGroup>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<ProjectSdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReferenceInclude="Newtonsoft.Json"Version="10.0.3" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<CompileInclude="Program.fs" />
14+
</ItemGroup>
15+
16+
</Project>
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
2+
3+
openSystem
4+
openSystem.Diagnostics
5+
openSystem.IO
6+
openSystem.Reflection
7+
openSystem.Text.RegularExpressions
8+
openNewtonsoft.Json.Linq
9+
10+
moduleAssemblyVersionCheck=
11+
12+
letprivateversionZero= Version(0,0,0,0)
13+
letprivatecommitHashPattern=new Regex(@"Commit Hash: (<developer build>)|([0-9a-fA-F]{40})", RegexOptions.Compiled)
14+
15+
letverifyAssemblyVersions(signToolData:string)(binariesPath:string)=
16+
letjson= File.ReadAllText(signToolData)
17+
letjobject= JObject.Parse(json)
18+
19+
// could either contain things like 'net40\bin\FSharp.Core.dll' or patterns like 'net40\bin\*\FSharp.Core.resources.dll'
20+
letassemblyPatterns=
21+
(jobject.["sign"]:?> JArray)
22+
|> Seq.map(fun a->(a:?> JObject).["values"]:?> JArray)
23+
|> Seq.map(fun a-> a:> seq<JToken>)
24+
|> Seq.collect(fun t-> t)
25+
|> Seq.map(fun t-> t.ToString())
26+
|> Seq.filter(fun p-> p.EndsWith(".dll")|| p.EndsWith(".exe"))// only check assemblies
27+
28+
// map the assembly patterns to actual files on disk
29+
letactualAssemblies=
30+
assemblyPatterns
31+
|> Seq.map(fun a->
32+
ifnot(a.Contains("*"))then
33+
[a]// just a raw file name
34+
else
35+
letparts= a.Split([|'\\'|])
36+
let mutablecandidatePaths=[binariesPath]
37+
for pin partsdo
38+
match pwith
39+
|"*"->
40+
// expand all candidates into multiples
41+
letexpansions=
42+
candidatePaths
43+
|> List.filter Directory.Exists
44+
|> List.map(Directory.EnumerateDirectories>> Seq.toList)
45+
|> List.collect(fun x-> x)
46+
candidatePaths<- expansions
47+
|_->
48+
// regular path part, just append it to all candidates
49+
candidatePaths<- List.map(fun d-> Path.Combine(d, p)) candidatePaths
50+
candidatePaths)
51+
|> Seq.collect(fun a-> a)
52+
|> Seq.map(fun a-> Path.Combine(binariesPath, a))
53+
|> Seq.filter(fun p-> File.Exists(p))// not all test runs produce all files
54+
|> Seq.toList
55+
56+
// verify that all assemblies have a version number other than 0.0.0.0
57+
letfailedVersionCheck=
58+
actualAssemblies
59+
|> List.filter(fun a->
60+
letassemblyVersion= AssemblyName.GetAssemblyName(a).Version
61+
printfn"Checking version:%s (%A)" a assemblyVersion
62+
assemblyVersion= versionZero)
63+
if failedVersionCheck.Length>0then
64+
printfn"The following assemblies had a version of%A" versionZero
65+
printfn"%s\r\n"<| String.Join("\r\n", failedVersionCheck)
66+
67+
// verify that all assemblies have a commit hash
68+
letfailedCommitHash=
69+
actualAssemblies
70+
|> List.filter(fun a->
71+
letfileProductVersion= FileVersionInfo.GetVersionInfo(a).ProductVersion
72+
printfn"Checking commit hash:%s (%s)" a fileProductVersion
73+
not<| commitHashPattern.IsMatch(fileProductVersion))
74+
if failedCommitHash.Length>0then
75+
printfn"The following assemblies don't have a commit hash set"
76+
printfn"%s\r\n"<| String.Join("\r\n", failedCommitHash)
77+
78+
// return code is the number of failures
79+
failedVersionCheck.Length+ failedCommitHash.Length
80+
81+
[<EntryPoint>]
82+
letmain argv=
83+
if argv.Length<>2then
84+
printfn"Usage: AssemblyVersionCheck.exe SignToolData.json path/to/binaries"
85+
1
86+
else
87+
AssemblyVersionCheck.verifyAssemblyVersions argv.[0] argv.[1]

‎vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,4 +260,5 @@
260260
<ImportProject="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
261261
<ImportProject="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
262262
<ImportProject="$(VsSDKInstall)\Microsoft.VsSDK.targets" />
263+
<ImportProject="$(FSharpSourcesRoot)\..\build\targets\AssemblyAttributes.targets" />
263264
</Project>

‎vsintegration/src/FSharp.LanguageService.Base/Properties/AssemblyInfo.cs‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@
99
// General Information about an assembly is controlled through the following
1010
// set of attributes. Change these attribute values to modify the information
1111
// associated with an assembly.
12-
[assembly:AssemblyTitle("FSharp.LanguageService.Base")]
13-
[assembly:AssemblyDescription("")]
1412
[assembly:AssemblyConfiguration("")]
15-
[assembly:AssemblyCompany("Microsoft.VisualFSharpTools")]
16-
[assembly:AssemblyProduct("FSharp.LanguageService.Base")]
17-
[assembly:AssemblyCopyright("Copyright (c) Microsoft Corporation.")]
1813
[assembly:AssemblyTrademark("")]
1914
[assembly:AssemblyCulture("")]
2015

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp