Skip to content

Commit b5a7ad0

Browse files
authored
Add dotnet/diagnostics to source-build (#1824)
This produces the Microsoft.Diagnostics.NETCore.Client package that's shipped as part of the Microsoft SDK too. Adding this also adds some additional dependencies: <AnnotatedUsage Id="Microsoft.NETCore.DotNetAppHost" Version="2.1.0" File="src/diagnostics.b6de9d322756aed892dafa0aed0053caa7db4fa6/artifacts/obj/Microsoft.Diagnostics.NETCore.Client/project.assets.json" Project="src/diagnostics.b6de9d322756aed892dafa0aed0053caa7db4fa6/" SourceBuildPackageIdCreator="runtime MicrosoftNETCoreDotNetAppHostPackageVersion/5.0.0-preview.8.20407.11" /> <AnnotatedUsage Id="Microsoft.NETCore.DotNetHostPolicy" Version="2.1.0" File="src/diagnostics.b6de9d322756aed892dafa0aed0053caa7db4fa6/artifacts/obj/Microsoft.Diagnostics.NETCore.Client/project.assets.json" Project="src/diagnostics.b6de9d322756aed892dafa0aed0053caa7db4fa6/" SourceBuildPackageIdCreator="runtime MicrosoftNETCoreDotNetHostPolicyPackageVersion/5.0.0-preview.8.20407.11" /> <AnnotatedUsage Id="Microsoft.NETCore.DotNetHostResolver" Version="2.1.0" File="src/diagnostics.b6de9d322756aed892dafa0aed0053caa7db4fa6/artifacts/obj/Microsoft.Diagnostics.NETCore.Client/project.assets.json" Project="src/diagnostics.b6de9d322756aed892dafa0aed0053caa7db4fa6/" SourceBuildPackageIdCreator="runtime MicrosoftNETCoreDotNetHostResolverPackageVersion/5.0.0-preview.8.20407.11" /> <AnnotatedUsage Id="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" File="src/diagnostics.b6de9d322756aed892dafa0aed0053caa7db4fa6/artifacts/obj/Microsoft.Diagnostics.NETCore.Client/project.assets.json" IsDirectDependency="true" IsAutoReferenced="true" Project="src/diagnostics.b6de9d322756aed892dafa0aed0053caa7db4fa6/" /> But all of these Package+Version usages are already present in the file.
1 parent da3a31e commit b5a7ad0

File tree

4 files changed

+76
-0
lines changed

4 files changed

+76
-0
lines changed

eng/Version.Details.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@
9696
<Uri>https://github.com/dotnet/installer</Uri>
9797
<Sha>473d1b592e8c281f03dcc4024c04c7c188e99c03</Sha>
9898
</Dependency>
99+
<Dependency Name="Microsoft.Diagnostics.NETCore.Client" Version="0.2.0-preview.20419.2">
100+
<Uri>https://github.com/dotnet/diagnostics</Uri>
101+
<Sha>47296ca69bb66180c132f3b16667f904dfc7c6c7</Sha>
102+
</Dependency>
99103
<!-- external dependencies, not handled by Maestro/Arcade -->
100104
<Dependency Name="Newtonsoft.Json" Version="12.0.2">
101105
<Uri>https://github.com/adaggarwal/Newtonsoft.Json</Uri>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 76a2a98998151ca6db805f3f032cf169f2ec5ef9 Mon Sep 17 00:00:00 2001
2+
From: Omair Majid <omajid@redhat.com>
3+
Date: Thu, 22 Oct 2020 19:07:08 -0400
4+
Subject: [PATCH] Dont build analyzers for source-build
5+
6+
---
7+
eng/Analyzers.props | 4 ++--
8+
1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+
diff --git a/eng/Analyzers.props b/eng/Analyzers.props
11+
index 438ae20b..97d83e0a 100644
12+
--- a/eng/Analyzers.props
13+
+++ b/eng/Analyzers.props
14+
@@ -1,9 +1,9 @@
15+
<Project>
16+
- <PropertyGroup>
17+
+ <PropertyGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
18+
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)CodeAnalysis.ruleset</CodeAnalysisRuleset>
19+
<EnableAnalyzers>true</EnableAnalyzers>
20+
</PropertyGroup>
21+
- <ItemGroup>
22+
+ <ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
23+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0-beta3.final" PrivateAssets="all" />
24+
</ItemGroup>
25+
</Project>
26+
--
27+
2.26.2
28+

repos/diagnostics.proj

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<Project>
2+
3+
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
4+
5+
<PropertyGroup>
6+
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
7+
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
8+
<PackagesOutput>$(ProjectDirectory)/artifacts/packages/$(Configuration)/Shipping</PackagesOutput>
9+
<RepoApiImplemented>false</RepoApiImplemented>
10+
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
15+
</ItemGroup>
16+
17+
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
18+
19+
<Target Name="RepoBuild">
20+
<PropertyGroup>
21+
<BuildCommandArgs>$(ProjectDirectory)/src/Microsoft.Diagnostics.NETCore.Client/Microsoft.Diagnostics.NETCore.Client.csproj</BuildCommandArgs>
22+
<BuildCommandArgs>$(BuildCommandArgs) /p:Configuration=$(Configuration)</BuildCommandArgs>
23+
<BuildCommandArgs>$(BuildCommandArgs) /v:$(LogVerbosity)</BuildCommandArgs>
24+
<BuildCommandArgs>$(BuildCommandArgs) $(RedirectRepoOutputToLog)</BuildCommandArgs>
25+
</PropertyGroup>
26+
27+
<Exec Command="$(DotnetToolCommand) restore /bl:restore.binlog $(BuildCommandArgs) "
28+
EnvironmentVariables="@(EnvironmentVariables)"
29+
WorkingDirectory="$(ProjectDirectory)"
30+
IgnoreStandardErrorWarningFormat="true" />
31+
32+
<Exec Command="$(DotnetToolCommand) build /bl:build.binlog $(BuildCommandArgs)"
33+
EnvironmentVariables="@(EnvironmentVariables)"
34+
WorkingDirectory="$(ProjectDirectory)"
35+
IgnoreStandardErrorWarningFormat="true" />
36+
37+
<Exec Command="$(DotnetToolCommand) pack /bl:pack.binlog $(BuildCommandArgs)"
38+
EnvironmentVariables="@(EnvironmentVariables)"
39+
WorkingDirectory="$(ProjectDirectory)"
40+
IgnoreStandardErrorWarningFormat="true" />
41+
</Target>
42+
43+
</Project>

repos/vstest.proj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
<ItemGroup>
2424
<EnvironmentVariables Include="DotNetPackageVersionPropsPath=$(PackageVersionPropsPath)" />
25+
<RepositoryReference Include="diagnostics" />
2526
<RepositoryReference Include="runtime" />
2627
<RepositoryReference Include="newtonsoft-json" />
2728
</ItemGroup>

0 commit comments

Comments
 (0)