Skip to content

Commit 5b21e97

Browse files
committed
update targets file to support CI build
1 parent 2305aa2 commit 5b21e97

7 files changed

+75
-2
lines changed

MicrosoftAspNetSessionState.msbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="tools\MicrosoftAspNetSessionState.settings.targets"/>
3+
<Import Project="tools\CI\CITask.targets" Condition="Exists('tools\CI\CITask.targets')"/>
34

45
<ItemGroup>
56
<AssemblyProject Include="src\SessionStateModule\Microsoft.AspNet.SessionState.SessionStateModule.csproj" />

tools/CI/CITask.targets

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="$(MSBuildThisFileDirectory)QERM.targets"/>
3+
<Import Project="$(MSBuildThisFileDirectory)CodeSign.targets"/>
4+
5+
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Web.MsBuildTasks2.dll" TaskName="Microsoft.Web.MsBuildTasks.PoliCheck"/>
6+
7+
<Target Name="BuildCI" DependsOnTargets="Clean;PoliCheck;Build;BinScope" />
8+
<Target Name="SignBinaries" DependsOnTargets="CopyInstallScripts;CodeSign" />
9+
<Target Name="PoliCheck">
10+
<ItemGroup>
11+
<ObjFiles Include="src\**\obj\**\*.*;test\**\obj\**\*.*;test\**\bin\**\*.*;"/>
12+
</ItemGroup>
13+
14+
<!-- Intermediate folders can cause false positives for PoliCheck -->
15+
<Delete Files="@(ObjFiles)"/>
16+
17+
<ItemGroup>
18+
<!-- Exclusions specific to the src folder -->
19+
<SrcExclusions Include="src\SessionStateModule\TaskAsyncHelper.cs">
20+
<Justification>
21+
Suppress the warning of using "execution" and "race". Both of them are used in the comments to describe the "execution context"
22+
and "race condition" which are typical software terms.
23+
</Justification>
24+
</SrcExclusions>
25+
</ItemGroup>
26+
27+
<PropertyGroup>
28+
<!-- Semicolon separated list of general terms to exclude across projects -->
29+
<Exclusions>components;invalid</Exclusions>
30+
</PropertyGroup>
31+
32+
<PoliCheck FolderToScan="src"
33+
Severity="4"
34+
FailSeverity="4"
35+
ExcludeTerms="$(Exclusions)"
36+
ExcludeFiles=""
37+
DetailedExclusions="@(SrcExclusions)" />
38+
</Target>
39+
40+
<ItemGroup>
41+
<BinScopeTargetFiles Include="$(OutputPath)Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.dll" />
42+
<BinScopeTargetFiles Include="$(OutputPath)Microsoft.AspNet.SessionState.SessionStateModule.dll" />
43+
</ItemGroup>
44+
45+
</Project>
File renamed without changes.

tools/CI/QERM.targets

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<!-- BinScope properties and targets -->
5+
<PropertyGroup>
6+
<BinScopeOutDir Condition="'$(BinScopeOutDir)' == ''">$(OutputPath)BinScope\</BinScopeOutDir>
7+
<BinScopeTargetDir Condition="'$(BinScopeTarget)' == ''">$(IntermediateOutputPath)BinScope\</BinScopeTargetDir>
8+
<BinScopeLogFile Condition="'$(BinScopeLogFile)' == ''">$(BinScopeOutDir)BinScopeResults.xml</BinScopeLogFile>
9+
10+
<BinScope61BetaInstallDir>$(MSBuildProgramFiles32)\Microsoft\BinScope for SDL 6.1 (Beta)\</BinScope61BetaInstallDir>
11+
<BinScope61InstallDir>$(MSBuildProgramFiles32)\Microsoft\BinScope for SDL 6.1\</BinScope61InstallDir>
12+
13+
<!-- If nothing is defined, we will assume that it's the 6.1 Beta release. -->
14+
<BinScopeInstallDir Condition="('$(BinScopeInstallerDir)' == '') And (Exists('$(BinScope61BetaInstallDir)')) ">$(BinScope61BetaInstallDir)</BinScopeInstallDir>
15+
<BinScopeInstallDir Condition="('$(BinScopeInstallerDir)' == '') And (Exists('$(BinScope61InstallDir)'))">$(BinScope61InstallDir)</BinScopeInstallDir>
16+
<BinScopeEXE Condition="'$(BinScopeEXE)' == ''">$(BinScopeInstallDir)BinScope.EXE</BinScopeEXE>
17+
18+
<BinScopeSymbolOption Condition="'$(BinScopeSymPath)' != ''">/sympath $(BinScopeSymPath)</BinScopeSymbolOption>
19+
</PropertyGroup>
20+
21+
<Target Name="BinScope">
22+
<RemoveDir Directories="$(BinScopeTargetDir)" />
23+
<MakeDir Directories="$(BinScopeTargetDir)" />
24+
25+
<Copy SourceFiles="@(BinScopeTargetFiles)" DestinationFiles="@(BinScopeTargetFiles->'$(BinScopeTargetDir)%(RecursiveDir)\%(Filename)%(Extension)')" />
26+
27+
<Exec Command="&quot;$(BinScopeEXE)&quot; /target $(BinScopeTargetDir) $(BinScopeSymbolOption) /logfile $(BinScopeLogFile)" />
28+
</Target>
29+
</Project>
File renamed without changes.

tools/MicrosoftAspNetSessionState.Extensions.targets

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.nuproj'">
55
<NuGetPackageVersion Condition="'$(UpdateNightlyPackages)' == 'true'">$(NuGetPackageVersion)-b$(VersionBuild)</NuGetPackageVersion>
66
</PropertyGroup>
7-
8-
<Import Project="$(MSBuildThisFileDirectory)CodeSign.targets"/>
97

108
<Target Name="CopyInstallScripts">
119
<Copy SourceFiles="@(NuGetInstallScripts)"

0 commit comments

Comments
 (0)