-
Notifications
You must be signed in to change notification settings - Fork 382
Consume cDac package and other cleanup #5482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
369d947
95e84fc
5747f07
42d80d8
6048ec1
ae469d4
11a56ab
3a5292c
7378077
5d86cae
eec089c
14c55d9
cf4ad31
0c220ff
ca6bcee
dce253d
0b4568c
7221378
b2226f4
ceec407
48dfb28
d3162e5
441ed07
1fd15a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,35 @@ | |
<RepositoryName>diagnostics</RepositoryName> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" /> | ||
|
||
<!-- | ||
$(TargetOS) - target operating system (win, linux, osx). Defaults to host OS. | ||
$(TargetArch) - architecture to test (x64, x86, arm, arm64). Defaults to host architecture. | ||
$(TargetRid) - the runtime identifier (rid) to against (win-x64, linux-arm64, linux-musl-x64, etc). | ||
$(Configuration) - configuration to test (Debug, Release). Defaults to Debug. | ||
$(ArtifactsBinDir) - artifacts\bin directory | ||
--> | ||
|
||
<PropertyGroup Condition="'$(TargetOS)' == ''"> | ||
steveisok marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<TargetOS>linux</TargetOS> | ||
<TargetOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">Windows_NT</TargetOS> | ||
<TargetOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">linux</TargetOS> | ||
<TargetOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">osx</TargetOS> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<TargetArch Condition="'$(TargetArch)' == ''">$(Platform)</TargetArch> | ||
<TargetArch Condition="'$(TargetArch)' == 'AnyCpu'">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</TargetArch> | ||
<ArtifactsBinNativeDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', '$(TargetOS).$(TargetArch).$(Configuration)'))</ArtifactsBinNativeDir> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetRid)' == ''"> | ||
<TargetRidOS>$(TargetOS)</TargetRidOS> | ||
<TargetRidOS Condition="'$(TargetOS)' == 'Windows_NT'">win</TargetRidOS> | ||
<TargetRid>$(TargetRidOS)-$(TargetArch)</TargetRid> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't this give us linux-x64 on musl? I remember mike having to use this for a case, but not sure if it's doing what's expected. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't apparently break obviously since it gets funneled down from buildnative. This does mean something like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TargetRid is set by the build native script so yes |
||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<DesktopTargetFramework>net462</DesktopTargetFramework> | ||
<!-- | ||
|
@@ -37,4 +66,5 @@ | |
<!-- This is the list of TFMs we build our unit tests as. --> | ||
<SupportedXUnitTestTargetFrameworks>net8.0</SupportedXUnitTestTargetFrameworks> | ||
</PropertyGroup> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Project> | ||
<!-- | ||
*MicrosoftDotNetCdacTransportVersion is from Versions.props. This is how we integrate the cDAC transport packs into our builds | ||
--> | ||
<PropertyGroup> | ||
<_cdacPackageVersion Condition="'$(TargetRid)' == 'win-x64'">$(runtimewinx64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. silly nit - do we ever foresee them being versioned separately? If not - pick one. It'd be best if we had the IL only one, but we don't yet so let's leave this for cleanup. |
||
<_cdacPackageVersion Condition="'$(TargetRid)' == 'win-arm64'">$(runtimewinarm64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion> | ||
<_cdacPackageVersion Condition="'$(TargetRid)' == 'linux-x64'">$(runtimelinuxx64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion> | ||
<_cdacPackageVersion Condition="'$(TargetRid)' == 'linux-arm64'">$(runtimelinuxarm64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion> | ||
<_cdacPackageVersion Condition="'$(TargetRid)' == 'osx-x64'">$(runtimeosxx64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion> | ||
<_cdacPackageVersion Condition="'$(TargetRid)' == 'osx-arm64'">$(runtimeosxarm64MicrosoftDotNetCdacTransportVersion)</_cdacPackageVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageDownload Condition="'$(_cdacPackageVersion)' != ''" | ||
Include="runtime.$(TargetRid).Microsoft.DotNet.Cdac.Transport" | ||
Version="[$(_cdacPackageVersion)]" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageSourceFiles Condition="'$(_cdacPackageVersion)' != ''" | ||
Include="$(NuGetPackageRoot)runtime.$(TargetRid).microsoft.dotnet.cdac.transport\$(_cdacPackageVersion)\runtimes\$(TargetRid)\native\*" /> | ||
</ItemGroup> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<Project> | ||
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props"/> | ||
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" /> | ||
</Project> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- All Rights Reserved. Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. --> | ||
<Project> | ||
<!-- | ||
$(ArtifactsBinNativeDir) - Native artifacts directory (e.g. artifacts\bin\Windows_NT.x64.Debug). | ||
$(TargetRid) - Target runtime identifier (e.g. win-x64, linux-x64, osx-x64). | ||
|
||
From Versions.props: | ||
|
||
$(MicrosoftDiaSymReaderNativeVersion) | ||
|
||
From Arcade: | ||
|
||
$(NuGetPackageRoot) - nuget packages root directory | ||
--> | ||
|
||
<ItemGroup> | ||
<PackageDownload Include="Microsoft.DiaSymReader.Native" Version="[$(MicrosoftDiaSymReaderNativeVersion)]" Condition="'$(OS)' == 'Windows_NT'" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageSourceFiles Include="$(NuGetPackageRoot)microsoft.diasymreader.native\$(MicrosoftDiaSymReaderNativeVersion)\runtimes\$(TargetRid)\native\*" Condition="'$(OS)' == 'Windows_NT'" /> | ||
</ItemGroup> | ||
|
||
<Import Condition="'$(PackageWithCDac)' == 'true'" Project="$(RepositoryEngineeringDir)CdacPackageItems.props" /> | ||
|
||
<!-- | ||
Installs the above packages into the $(ArtifactsBinNativeDir) directory. | ||
--> | ||
<Target Name="InstallNativePackages"> | ||
<Message Importance="High" Text="Installing packages to $(ArtifactsBinNativeDir)..." /> | ||
|
||
<Copy SourceFiles="@(PackageSourceFiles)" DestinationFolder="$(ArtifactsBinNativeDir)" SkipUnchangedFiles="false"> | ||
<Output TaskParameter="CopiedFiles" ItemName="CopiedPackageFiles" /> | ||
</Copy> | ||
|
||
<Message Importance="High" Text="Installed packages: @(CopiedPackageFiles)" /> | ||
</Target> | ||
</Project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Any reason no to normalize everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to stop the warning on Windows. It is fine on other build platforms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen it in newer linux versions of the containers.