main
proj 49 lines 2.59 KB
Raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5 <Project Sdk="Microsoft.Build.Traversal">
6
7 <PropertyGroup>
8 <EarliestCoreMBAProjectPath>EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath>
9 <LatestCoreMBAProjectPath>LatestCoreMBA\Example.LatestCoreMBA.csproj</LatestCoreMBAProjectPath>
10 <WPFCoreMBAProjectPath>WPFCoreMBA\Example.WPFCoreMBA.csproj</WPFCoreMBAProjectPath>
11 <MBAPublishPath>$(OutputPath)examples\publish\</MBAPublishPath>
12 </PropertyGroup>
13
14 <ItemGroup>
15 <CoreMBAProject Include="$(EarliestCoreMBAProjectPath)">
16 <PublishPath>$(MBAPublishPath)Example.EarliestCoreMBA</PublishPath>
17 <TrimMode>CopyUsed</TrimMode>
18 </CoreMBAProject>
19 <CoreMBAProject Include="$(LatestCoreMBAProjectPath)">
20 <PublishPath>$(MBAPublishPath)Example.LatestCoreMBA</PublishPath>
21 <TrimMode>Link</TrimMode>
22 </CoreMBAProject>
23 <CoreMBAProject Include="$(WPFCoreMBAProjectPath)">
24 <PublishPath>$(MBAPublishPath)Example.WPFCoreMBA</PublishPath>
25 <SkipFDDx86>true</SkipFDDx86>
26 <SkipSCD>true</SkipSCD>
27 </CoreMBAProject>
28 </ItemGroup>
29
30 <Target Name="PublishCoreExamples" BeforeTargets="Build">
31 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd-x86" -r win-x86 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
32 Condition="'%(CoreMBAProject.SkipFDDx86)'==''" />
33 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x64 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
34 Condition="'%(CoreMBAProject.SkipFDD)'==''" />
35 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x64 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"'
36 Condition="'%(CoreMBAProject.SkipSCD)'==''" />
37 <!--
38 Publishing a library is "undefined" (per https://github.com/dotnet/runtime/issues/91535)
39 and is now a build error. This will go away when BAs go out of proc, so not spending a
40 lot of time to keep building trimmed in VS 17.8.
41 -->
42 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x64 -c $(Configuration) --self-contained true -p:PublishTrimmed=false -p:TrimMode=%(CoreMBAProject.TrimMode) "%(CoreMBAProject.Identity)"'
43 Condition="'%(CoreMBAProject.TrimMode)'!=''" />
44 </Target>
45
46 <ItemGroup>
47 <ProjectReference Include="**\*.wixproj" />
48 </ItemGroup>
49 </Project>