forked from roslynpad/roslynpad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
34 lines (34 loc) · 2.7 KB
/
Directory.Build.targets
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
<Project>
<ItemGroup Condition=" '$(CopyRoslynPadRuntimeAssemblies)' == 'true' ">
<ProjectReference Include="$(RepoRoot)src\RoslynPad.Runtime\RoslynPad.Runtime.csproj" SetTargetFramework="TargetFramework=$(LtsTargetFramework)" ReferenceOutputAssembly="false" />
<ProjectReference Include="$(RepoRoot)src\RoslynPad.Runtime\RoslynPad.Runtime.csproj" SetTargetFramework="TargetFramework=netstandard2.0" ReferenceOutputAssembly="false" />
</ItemGroup>
<Target Name="CopyRoslynPadRuntimeAssembliesOnBuild" AfterTargets="Build"
Condition=" '$(CopyRoslynPadRuntimeAssemblies)' == 'true' ">
<Copy SourceFiles="$(RepoRoot)src\RoslynPad.Runtime\bin\$(Configuration)\$(LtsTargetFramework)\$(_RoslynPadInitialRuntimeIdentifier)\RoslynPad.Runtime.dll" DestinationFolder="$(OutputPath)\runtimes\net" />
<Copy SourceFiles="$(RepoRoot)src\RoslynPad.Runtime\bin\$(Configuration)\netstandard2.0\$(_RoslynPadInitialRuntimeIdentifier)\RoslynPad.Runtime.dll" DestinationFolder="$(OutputPath)\runtimes\netfx" />
</Target>
<Target Name="CopyRoslynPadRuntimeAssembliesOnPublish" AfterTargets="Publish"
Condition=" '$(CopyRoslynPadRuntimeAssemblies)' == 'true' and '$(PublishSingleFile)' != '' ">
<Copy SourceFiles="$(RepoRoot)src\RoslynPad.Runtime\bin\$(Configuration)\$(LtsTargetFramework)\$(_RoslynPadInitialRuntimeIdentifier)\RoslynPad.Runtime.dll" DestinationFolder="$(PublishDir)\runtimes\net" />
<Copy SourceFiles="$(RepoRoot)src\RoslynPad.Runtime\bin\$(Configuration)\netstandard2.0\$(_RoslynPadInitialRuntimeIdentifier)\RoslynPad.Runtime.dll" DestinationFolder="$(PublishDir)\runtimes\netfx" />
</Target>
<!-- hack to make macOS asset packaging (actool) work on non-Catalyst builds -->
<Target Name="Before_CoreCompileImageAssets" BeforeTargets="_CoreCompileImageAssets">
<PropertyGroup>
<Original_SdkPlatform>$(_SdkPlatform)</Original_SdkPlatform>
<_SdkPlatform>MacCatalyst</_SdkPlatform>
<Original_UIDeviceFamily>$(_UIDeviceFamily)</Original_UIDeviceFamily>
<_UIDeviceFamily>IPad</_UIDeviceFamily>
<Original_ComputedTargetFrameworkMoniker>$(_ComputedTargetFrameworkMoniker)</Original_ComputedTargetFrameworkMoniker>
<_ComputedTargetFrameworkMoniker>$(_ComputedTargetFrameworkMoniker.Replace('=macos', '=maccatalyst'))</_ComputedTargetFrameworkMoniker>
</PropertyGroup>
</Target>
<Target Name="After_CoreCompileImageAssets" AfterTargets="_CoreCompileImageAssets">
<PropertyGroup>
<_SdkPlatform>$(Original_SdkPlatform)</_SdkPlatform>
<_UIDeviceFamily>$(Original_UIDeviceFamily)</_UIDeviceFamily>
<_ComputedTargetFrameworkMoniker>$(Original_ComputedTargetFrameworkMoniker)</_ComputedTargetFrameworkMoniker>
</PropertyGroup>
</Target>
</Project>