-
Notifications
You must be signed in to change notification settings - Fork 243
/
TestFx.targets
87 lines (77 loc) · 4.72 KB
/
TestFx.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" Condition="$(TargetFrameworkProfile) == 'Profile259'" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" Condition="$(TargetPlatformIdentifier) == 'UAP'" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition="($(TargetFrameworkProfile) == '' or $(TargetFrameworkProfile) != 'Profile259') and $(TargetPlatformIdentifier) != 'UAP' and $(FrameworkIdentifier) != 'NetCore' and $(IncludeMicrosoftCommon) == 'true'"/>
<PropertyGroup>
<TestFxRoot Condition="$(TestFxRoot) == ''">..\..\</TestFxRoot>
<RepoRoot Condition="$(RepoRoot) == ''">..\..\</RepoRoot>
<TestFxPackagesRoot>$(TestFxRoot)packages\</TestFxPackagesRoot>
<IsLocalizationEnabled Condition="'$(UpdateXlf)' == 'true' or '$(IsLocalizedBuild)' == 'true'">true</IsLocalizationEnabled>
</PropertyGroup>
<!-- Import props/targets with $(RepoRoot) since msbuild takes the relative path based on settings.targets and not with respect to the project. -->
<Import Project="$(RepoRoot)packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets" Condition="Exists('$(RepoRoot)packages\MicroBuild.Core.0.2.0\build\MicroBuild.Core.targets')" />
<!-- Import localization specific Targets if enabled. -->
<Import Project="$(MSBuildThisFileDirectory)TestFx.Loc.targets" Condition="($(IsTest) == '' or $(IsTest) == 'false') and $(IsLocalizationEnabled) == 'true'"/>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)key.snk">
<!-- Do not have this show up in Solution Explorer in VS -->
<InProject>false</InProject>
</None>
</ItemGroup>
<!-- StyleCop settings. -->
<ItemGroup Condition="$(ShouldEnableStyleCop) != 'false' and $(IsVsixProj) != 'true'">
<AdditionalFiles Include="$(TestFxRoot)scripts\build\stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
<Analyzer Include="$(TestFxPackagesRoot)StyleCop.Analyzers\1.0.0\analyzers\dotnet\cs\Newtonsoft.Json.dll" />
<Analyzer Include="$(TestFxPackagesRoot)StyleCop.Analyzers\1.0.0\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
<Analyzer Include="$(TestFxPackagesRoot)StyleCop.Analyzers\1.0.0\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
</ItemGroup>
<!-- Signing and Localization. -->
<ItemGroup Condition="$(IsTest) == '' or $(IsTest) == 'false'">
<FilesToSign Include="$(OutDir)\$(AssemblyName).dll" Condition="'$(IsVsixProj)' == '' or '$(IsVsixProj)' != 'true'">
<Authenticode>Microsoft400</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
<SignFilesDependsOn Include="GatherLocalizedOutputsForSigning">
<!-- Do not have this show up in Solution Explorer in VS -->
<InProject>false</InProject>
</SignFilesDependsOn>
</ItemGroup>
<Target Name="GatherLocalizedOutputsForSigning" DependsOnTargets="TestFxLocalization">
<ItemGroup>
<FilesToSign Include="$(OutDir)\**\$(AssemblyName).resources.dll">
<Authenticode>Microsoft400</Authenticode>
<StrongName>StrongName</StrongName>
</FilesToSign>
</ItemGroup>
</Target>
<!-- Generate AssemblyInfo.cs -->
<PropertyGroup>
<TFBuildNumber Condition=" '$(TFBuildNumber)' == '' ">0.1</TFBuildNumber>
<MajorVersion>14.0</MajorVersion>
<AssemblyVersion>$(MajorVersion).0.0</AssemblyVersion>
<BuildVersion Condition=" '$(BuildVersion)' == '' ">$(MajorVersion).$(TFBuildNumber)</BuildVersion>
</PropertyGroup>
<ItemGroup>
<AssemblyVersionAttribute Include="System.Reflection.AssemblyVersionAttribute">
<_Parameter1>$(AssemblyVersion)</_Parameter1>
</AssemblyVersionAttribute>
<AssemblyVersionAttribute Include="System.Reflection.AssemblyFileVersionAttribute">
<_Parameter1>$(BuildVersion)</_Parameter1>
</AssemblyVersionAttribute>
<AssemblyVersionAttribute Include="System.Reflection.AssemblyInformationalVersionAttribute">
<_Parameter1>$(BuildVersion)</_Parameter1>
</AssemblyVersionAttribute>
</ItemGroup>
<Target Name="GenerateAssemblyInfoFile">
<WriteCodeFragment AssemblyAttributes="@(AssemblyVersionAttribute)" Language="C#" OutputFile="$(MSBuildProjectDirectory)\GlobalAssemblyInfo.cs" Condition="$(SkipAppendingVersion) != 'true'">
<Output TaskParameter="OutputFile" ItemName="Compile" />
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
</WriteCodeFragment>
</Target>
<PropertyGroup>
<CompileDependsOn>GenerateAssemblyInfoFile;$(CompileDependsOn)</CompileDependsOn>
</PropertyGroup>
</Project>