Skip to content

Commit 8eeb515

Browse files
author
Hovsep Mkrtchyan
committed
Added Static Analysis project to the build.
1 parent f75c453 commit 8eeb515

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

build.proj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<CmdletSolutionsToBuild Include=".\src\ServiceManagement\ServiceManagement.sln"
5454
Condition=" '$(Scope)' == 'ServiceManagement' or '$(Scope)' == 'AzureStorage' "/>
5555
<SetupSln Include=".\setup\azurepowershell.sln" />
56+
<Analysis Include=".\tools\StaticAnalysis\Static Analysis.sln" />
5657
</ItemGroup>
5758

5859
<!--
@@ -161,6 +162,14 @@
161162
Properties="Configuration=$(Configuration);Platform=Any CPU"
162163
ContinueOnError="false"
163164
Condition=" '$(Scope)' == 'all' "/>
165+
166+
<MSBuild
167+
Projects="@(Analysis)"
168+
Targets="Build"
169+
Properties="Configuration=Debug;Platform=Any CPU"
170+
ContinueOnError="false" />
171+
172+
<CallTarget Targets="DependencyAnalysis" />
164173

165174
<CallTarget Targets="CodeSignInstaller"
166175
Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == 'all'" />
@@ -280,6 +289,12 @@
280289
<Copy SourceFiles="@(InstallersToSign)" DestinationFolder="signed" Condition="$(DelaySign)" />
281290
</Target>
282291

292+
<!-- Run Dependecy Analyzer -->
293+
<Target Name="DependencyAnalysis">
294+
<Message Importance="high" Text="Running Dependency Analysis..." />
295+
<Exec Command="$(MSBuildProjectDirectory)\src\Package\StaticAnalysis.exe $(MSBuildProjectDirectory)\src\Package\$(Configuration) $(MSBuildProjectDirectory)\src\Package"/>
296+
</Target>
297+
283298
<!-- Publish all packages -->
284299
<Target Name="Publish">
285300
<Error Condition=" '$(NuGetKey)' == '' " Text="You must provide the NuGetKey parameter to the build: /p:NuGetKey=YOUR_PUBLISHING_KEY" />

tools/StaticAnalysis/Static Analysis.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<DebugSymbols>true</DebugSymbols>
1818
<DebugType>full</DebugType>
1919
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
20+
<OutputPath>..\..\src\Package</OutputPath>
2121
<DefineConstants>DEBUG;TRACE</DefineConstants>
2222
<ErrorReport>prompt</ErrorReport>
2323
<WarningLevel>4</WarningLevel>
@@ -26,7 +26,7 @@
2626
<PlatformTarget>AnyCPU</PlatformTarget>
2727
<DebugType>pdbonly</DebugType>
2828
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
29+
<OutputPath>..\..\src\Package</OutputPath>
3030
<DefineConstants>TRACE</DefineConstants>
3131
<ErrorReport>prompt</ErrorReport>
3232
<WarningLevel>4</WarningLevel>

0 commit comments

Comments
 (0)