forked from dotnet/templating
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsign.proj
More file actions
81 lines (66 loc) · 4.02 KB
/
sign.proj
File metadata and controls
81 lines (66 loc) · 4.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="SignFiles" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == ''">$(NUGET_PACKAGES)</NuGetPackageRoot> <!-- Respect environment variable if set -->
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == ''">$(UserProfile)\.nuget\packages</NuGetPackageRoot>
<MicroBuildVersion>0.2.0</MicroBuildVersion>
<MicroBuildPropsAndTargetsPath>$(NuGetPackageRoot)/microbuild.core/$(MicroBuildVersion)/build/</MicroBuildPropsAndTargetsPath>
</PropertyGroup>
<Import Project="$(MicroBuildPropsAndTargetsPath)MicroBuild.Core.props" Condition="Exists('$(MicroBuildPropsAndTargetsPath)MicroBuild.Core.props')" />
<!-- This will be overridden if we're building with MicroBuild. -->
<Target Name="SignFiles">
<Message Text="Fake sign target. Would sign: @(FilesToSign)" />
</Target>
<Target Name="PostCompileSign" DependsOnTargets="GetPostCompileSignFiles;SignFiles" />
<Target Name="GetPostCompileSignFiles">
<PropertyGroup>
<!-- The OutDir and IntermediateOutputPath properties are required by MicroBuild. MicroBuild only
signs files that are under these paths. -->
<OutDir>$(MSBuildThisFileDirectory)</OutDir>
<IntermediateOutputPath>$(MSBuildThisFileDirectory)artifacts\scratch</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<!-- Adding the assemblies to sign -->
<FilesToSign Include="$(OutDir)src\**\microsoft.templateengine.abstractions.dll;
$(OutDir)src\**\microsoft.templateengine.cli.dll;
$(OutDir)src\**\microsoft.templateengine.cli.resources.dll;
$(OutDir)src\**\microsoft.templateengine.core.dll;
$(OutDir)src\**\microsoft.templateengine.core.contracts.dll;
$(OutDir)src\**\microsoft.templateengine.edge.dll;
$(OutDir)src\**\microsoft.templateengine.ide.dll;
$(OutDir)src\**\microsoft.templateengine.orchestrator.runnableprojects.dll;
$(OutDir)src\**\microsoft.templateengine.utils.dll;
$(OutDir)test\**\microsoft.templateengine.mocks.dll;
$(OutDir)test\**\microsoft.templateengine.testhelper.dll"
Exclude="$(OutDir)src\**\obj\**\*.dll;
$(OutDir)test\**\obj\**\*.dll">
<Authenticode>Microsoft400</Authenticode>
</FilesToSign>
</ItemGroup>
</Target>
<Target Name="SNSignLocResources">
<ItemGroup>
<LocAssemblies Include="$(MSBuildThisFileDirectory)artifacts\localize\**\Microsoft.TemplateEngine.Cli.resources.dll" />
</ItemGroup>
<GetFrameworkSdkPath>
<Output TaskParameter="Path" PropertyName="SdkPath" />
</GetFrameworkSdkPath>
<Exec Command=""$(SdkPath)bin\NETFX 4.6.1 Tools\sn.exe" -R "%(LocAssemblies.Identity)" "$(MSBuildThisFileDirectory)key.snk"" />
</Target>
<Target Name="PostCompileLocSign" DependsOnTargets="GetPostCompileLocSignFiles;SignFiles" />
<Target Name="GetPostCompileLocSignFiles">
<PropertyGroup>
<!-- The OutDir and IntermediateOutputPath properties are required by MicroBuild. MicroBuild only
signs files that are under these paths. -->
<OutDir>$(MSBuildThisFileDirectory)artifacts\</OutDir>
<IntermediateOutputPath>$(MSBuildThisFileDirectory)artifacts\scratch</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<!-- Adding the loc assemblies to sign. -->
<FilesToSign Include="$(OutDir)localize\**\Microsoft.TemplateEngine.Cli.resources.dll">
<Authenticode>Microsoft400</Authenticode>
</FilesToSign>
</ItemGroup>
</Target>
<Import Project="$(MicroBuildPropsAndTargetsPath)MicroBuild.Core.targets" Condition="Exists('$(MicroBuildPropsAndTargetsPath)MicroBuild.Core.targets')" />
</Project>