Skip to content

Commit 1ce0473

Browse files
committed
Merge pull request Azure#1758 from hovsepm/dev
[#111727062] Added Static Analysis project to the build.
2 parents f75c453 + 50eeb1b commit 1ce0473

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
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+
<StaticAnalysis Include=".\tools\StaticAnalysis\StaticAnalysis.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="@(StaticAnalysis)"
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 renamed to tools/StaticAnalysis/StaticAnalysis.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>

tools/StaticAnalysis/Static Analysis.sln renamed to tools/StaticAnalysis/StaticAnalysis.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 2013
44
VisualStudioVersion = 12.0.40629.0
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Static Analysis", "Static Analysis.csproj", "{68384B59-BA0C-4B7B-B3F6-9C7988296C16}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Static Analysis", "StaticAnalysis.csproj", "{68384B59-BA0C-4B7B-B3F6-9C7988296C16}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution

0 commit comments

Comments
 (0)