Skip to content

Commit

Permalink
Fix arm64 build (#4485)
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd committed May 26, 2023
1 parent 17f84eb commit b02a69d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/datacollector.arm64/datacollector.arm64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<TargetFrameworks Condition=" '$(OS)' == 'WINDOWS_NT' ">$(TargetFrameworks);net472;$(NetFrameworkMinimum)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'WINDOWS_NT' ">$(TargetFrameworks);$(NetFrameworkMinimum)</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net7.0;net6.0;</TargetFrameworks>
<RuntimeIdentifier Condition="$(TargetFramework.StartsWith('net4'))">win10-arm64</RuntimeIdentifier>
<!-- Setting both RuntimeIdentifier and PlatformTarget ends up building as AnyCPU and selecting the default x86 architecture, irregardles of RuntimeIdentifier,
so order here matters. -->
<PlatformTarget Condition=" $(TargetFramework.StartsWith('net4')) AND '$(RuntimeIdentifier)' == '' ">AnyCPU</PlatformTarget>
<OutputType>Exe</OutputType>
<!-- Prevent the creation of the ".exe" for .NET Core. This was the default on .NET Core 2.1, behavior changed for .NET Core 3.1 -->
Expand All @@ -23,10 +26,6 @@
<MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);MSB3276</MSBuildWarningsAsMessages>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.TestPlatform.CommunicationUtilities\Microsoft.TestPlatform.CommunicationUtilities.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console.arm64/vstest.console.arm64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<UseAppHost>false</UseAppHost>
<RollForward>Major</RollForward>
<IsTestProject>false</IsTestProject>
<RuntimeIdentifier Condition="'$(TargetFramework)' == '$(NetFrameworkMinimum)'">win10-arm64</RuntimeIdentifier>
<!-- Setting both RuntimeIdentifier and PlatformTarget ends up building as AnyCPU and selecting the default x86 architecture, irregardles of RuntimeIdentifier,
so order here matters. -->
<PlatformTarget Condition="'$(TargetFramework)' == '$(NetFrameworkMinimum)' AND '$(RuntimeIdentifier)' == '' ">AnyCPU</PlatformTarget>
<ApplicationManifest>..\vstest.console\app.manifest</ApplicationManifest>
<RootNamespace>Microsoft.VisualStudio.TestPlatform.CommandLine</RootNamespace>
Expand All @@ -26,9 +29,6 @@
$(MSBuildWarningsAsMessages);MSB3276;
</MSBuildWarningsAsMessages>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == '$(NetFrameworkMinimum)'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkMinimum)' ">
<Reference Include="System" />
<Reference Include="System.IO" />
Expand Down

0 comments on commit b02a69d

Please sign in to comment.