-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
MultiModule.csproj
32 lines (30 loc) · 1.42 KB
/
MultiModule.csproj
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>0</CLRTestPriority>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- This test always runs as multimodule. It's not supported if we don't have framework object files. -->
<CLRTestTargetUnsupported Condition="'$(BuildNativeAotFrameworkObjects)' != 'true'">true</CLRTestTargetUnsupported>
<IlcMultiModule>true</IlcMultiModule>
</PropertyGroup>
<ItemGroup>
<Compile Include="MultiModule.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="Library.csproj" />
</ItemGroup>
<!--
When building a library as a reference, the returned build outputs include both the
IL assembly produced by CSC and the native obj produced by Ilc. Separate the native
object file here so it isn't passed to CSC, and instead redirect it to be picked up
by the LinkNative target.
-->
<Target Name="RemoveObjFiles" AfterTargets="ResolveProjectReferences">
<ItemGroup>
<ObjFiles Include="@(_ResolvedProjectReferencePaths)" Condition="'%(Extension)' == '.obj' or '%(Extension)' == '.bc'" />
<LinkerArg Include="@(_ResolvedProjectReferencePaths)" Condition="'%(Extension)' == '.obj'" />
<IlcReference Include="@(_ResolvedProjectReferencePaths)" Condition="'%(Extension)' == '.dll'" />
<_ResolvedProjectReferencePaths Remove="@(ObjFiles)" />
</ItemGroup>
</Target>
</Project>