forked from getsentry/sentry-unity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.props
46 lines (41 loc) · 2.13 KB
/
Directory.Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<Project InitialTargets="ResetTargetFrameworks">
<Import Project="../Directory.Build.props" />
<PropertyGroup>
<PackageRuntimeTestsPath>../../$(DevPackageFolderName)/Tests/Runtime</PackageRuntimeTestsPath>
<PackageEditorTestsPath>../../$(DevPackageFolderName)/Tests/Editor</PackageEditorTestsPath>
</PropertyGroup>
<!-- Note: this OVERWRITES the ResetTargetFrameworks target from the parent dir -->
<Target Name="ResetTargetFrameworks" DependsOnTargets="FindUnity">
<!-- With 2022 Unity packages are already targeting ns2.1 and Unity itself only has that as an option so we must target ns2.1 here too: -->
<PropertyGroup Condition="$(UnityVersion.StartsWith('2021')) or $(UnityVersion.StartsWith('2022'))">
<TargetFrameworks>netstandard2.1</TargetFrameworks>
</PropertyGroup>
<Message Text="Selected TFM: $(TargetFrameworks) for Unity version $(UnityVersion), project: $(MSBuildProjectName)" Importance="High" />
</Target>
<!-- Add reference once we figure out where the DLL is (find Unity version and install location) -->
<Target Name="ReferenceUnityEditor" BeforeTargets="BeforeResolveReferences">
<ItemGroup>
<Reference Include="UnityEditor">
<HintPath>$(UnityManagedPath)/UnityEditor.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEditor.TestRunner">
<HintPath>$(UnityTestPath)/UnityEditor.TestRunner.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.TestRunner">
<HintPath>$(UnityTestPath)/UnityEngine.TestRunner.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<Error Condition="!Exists('$(UnityTestPath)/UnityEngine.TestRunner.dll')" Text="TestRunner not found. Expected: $(UnityTestPath)/UnityEngine.TestRunner.dll"></Error>
</Target>
<PropertyGroup>
<!-- warning NU1701: Package 'NUnit 3.5.0' was restored using '.NETFramework,Version=v4.6.1
Can this be restored for ns2.0? -->
<NoWarn>$(NoWarn);NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.5.0" />
</ItemGroup>
</Project>