|
1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 | <PropertyGroup> |
3 | 3 | <UnityBuild>false</UnityBuild> |
4 | | - <TargetFrameworks>netstandard2.0</TargetFrameworks> |
| 4 | + <!-- |
| 5 | + The Visual Studio Run Tests context menu command (Ctrl+R, T) always picks the first target framework |
| 6 | + in the project file, but the NUnit test adapter doesn't support .NET Standard 2.0, so it should never be |
| 7 | + first in the list. |
| 8 | + --> |
5 | 9 | <TargetFrameworks Condition="'$(MSBuildVersion)' >= '17.0'">$(TargetFrameworks);net6.0</TargetFrameworks> |
6 | 10 | <TargetFrameworks Condition="'$(RuntimeIdentifier)' != 'osx-arm64'">$(TargetFrameworks);netcoreapp3.1</TargetFrameworks> |
7 | 11 | <TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net461</TargetFrameworks> |
| 12 | + <TargetFrameworks>$(TargetFrameworks);netstandard2.0</TargetFrameworks> |
8 | 13 | <LangVersion>9.0</LangVersion> |
9 | 14 | <RootNamespace>Realms.Tests</RootNamespace> |
10 | 15 | <IsTestProject>true</IsTestProject> |
|
27 | 32 | <ItemGroup Condition="'$(UnityBuild)' != 'true'"> |
28 | 33 | <PackageReference Include="NUnit" Version="3.13.2" /> |
29 | 34 | <PackageReference Include="NUnitLite" Version="3.13.2" /> |
30 | | - <PackageReference Include="NUnit3TestAdapter" Version="4.2.1" |
| 35 | + <PackageReference Include="NUnit3TestAdapter" Version="4.2.1" |
31 | 36 | Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' OR '$(TargetFrameworkIdentifier)' == '.NETCoreApp'" /> |
32 | 37 | <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> |
| 38 | + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" /> |
33 | 39 | </ItemGroup> |
34 | 40 |
|
35 | 41 | <ItemGroup Condition="'$(UnityBuild)' == 'true'"> |
|
93 | 99 | </ItemGroup> |
94 | 100 |
|
95 | 101 | <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(UseRealmNupkgsWithVersion)' == ''"> |
96 | | - <None Include="..\..\wrappers\build\Darwin\$(Configuration)\librealm-wrappers.dylib" Condition="$(RuntimeIdentifier.StartsWith('osx'))"> |
97 | | - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| 102 | + <None Include="..\..\wrappers\build\Darwin\$(Configuration)\librealm-wrappers.dylib" |
| 103 | + Condition="$([MSBuild]::IsOsPlatform('OSX'))"> |
| 104 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
98 | 105 | </None> |
99 | | - <None Include="..\..\wrappers\build\Linux\$(Configuration)\librealm-wrappers.so" Condition="'$(RuntimeIdentifier)' == 'linux-x64'"> |
| 106 | + <None Include="..\..\wrappers\build\Linux\$(Configuration)\librealm-wrappers.so" |
| 107 | + Condition="$([MSBuild]::IsOsPlatform('Linux')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64' "> |
100 | 108 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
101 | 109 | </None> |
102 | | - <None Include="..\..\wrappers\build\Windows\$(Configuration)-x64\realm-wrappers.dll" Condition="'$(RuntimeIdentifier)' == 'win-x64'"> |
| 110 | + <None Include="..\..\wrappers\build\Windows\$(Configuration)-x64\realm-wrappers.dll" |
| 111 | + Condition="$([MSBuild]::IsOsPlatform('Windows')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64' "> |
103 | 112 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
104 | 113 | </None> |
105 | | - <None Include="..\..\wrappers\build\Windows\$(Configuration)-arm64\realm-wrappers.dll" Condition="'$(RuntimeIdentifier)' == 'win-arm64'"> |
| 114 | + <None Include="..\..\wrappers\build\Windows\$(Configuration)-arm64\realm-wrappers.dll" |
| 115 | + Condition="$([MSBuild]::IsOsPlatform('Windows')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64' "> |
106 | 116 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
107 | 117 | </None> |
108 | 118 | </ItemGroup> |
|
0 commit comments