forked from ormsolutions/NORMA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NORMACommon.targets
71 lines (63 loc) · 2.5 KB
/
NORMACommon.targets
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
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright © ORM Solutions, LLC. All rights reserved.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
-This .targets file provides common targets for signing and versioning NORMA assemblies.
-This .targets file should be imported before any of the properties it defines are used, but
after Neumont.Build.VisualStudio.Multitargeting.targets.
-Given different relative paths for including this file, each project file needs to define
the NORMATrunkDir property before including this file.
-->
<Choose>
<When Condition="!$(NORMAConstants.Contains(NORMA_Official)) AND ('$(NORMAOfficial)'=='1')">
<PropertyGroup>
<NORMAConstants>$(NORMAConstants);NORMA_Official</NORMAConstants>
</PropertyGroup>
</When>
</Choose>
<Choose>
<When Condition="!$(NORMAConstants.Contains(VSIX_Per_User)) AND ('$(VSIXPerUser)'=='1')">
<PropertyGroup>
<NORMAConstants>$(NORMAConstants);VSIX_Per_User</NORMAConstants>
</PropertyGroup>
</When>
</Choose>
<PropertyGroup>
<DefineConstants Condition="'$(NORMAConstants)'!=''">$(DefineConstants);$(NORMAConstants)</DefineConstants>
<MSBuildAllProjects>$(MSBuildAllProjects);$(NORMATrunkDir)\NORMACommon.targets</MSBuildAllProjects>
</PropertyGroup>
<!-- An alternate NORMA signing file should be copied into the root directory alongside ORMPackage.snk.
The base name of the file (without .snk) is stored in the NORMASigningFile variable. -->
<Choose>
<When Condition="'$(NORMASigningFile)'==''">
<Choose>
<When Condition="$(DefineConstants.Contains(NORMA_Official))">
<Choose>
<When Condition="Exists('$(NORMATrunkDir)\NORMAOfficial.snk')">
<PropertyGroup>
<NORMASigningFile>NORMAOfficial</NORMASigningFile>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<NORMASigningFile>NORMAOfficialPublic</NORMASigningFile>
</PropertyGroup>
</Otherwise>
</Choose>
</When>
<Otherwise>
<PropertyGroup>
<NORMASigningFile>ORMPackage</NORMASigningFile>
</PropertyGroup>
</Otherwise>
</Choose>
</When>
</Choose>
<Target Name="NORMAPublicKeyTokenTarget" BeforeTargets="BeforeBuild">
<Exec Command='"$(NORMATrunkDir)\GetPublicKeyToken.bat" "$(NORMATrunkDir)\$(NORMASigningFile).snk"' ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="NORMAPublicKeyToken" />
</Exec>
</Target>
</Project>