aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Bal/test/examples/examples.proj
blob: c15447668a22aa8be0ccac581e5fedbcdc4b6877 (plain)
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
47
48
49
<?xml version="1.0" encoding="utf-8"?>
<!-- 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. -->


<Project Sdk="Microsoft.Build.Traversal">

  <PropertyGroup>
    <EarliestCoreMBAProjectPath>EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath>
    <LatestCoreMBAProjectPath>LatestCoreMBA\Example.LatestCoreMBA.csproj</LatestCoreMBAProjectPath>
    <WPFCoreMBAProjectPath>WPFCoreMBA\Example.WPFCoreMBA.csproj</WPFCoreMBAProjectPath>
    <MBAPublishPath>$(OutputPath)examples\publish\</MBAPublishPath>
  </PropertyGroup>

  <ItemGroup>
    <CoreMBAProject Include="$(EarliestCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.EarliestCoreMBA</PublishPath>
      <TrimMode>CopyUsed</TrimMode>
    </CoreMBAProject>
    <CoreMBAProject Include="$(LatestCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.LatestCoreMBA</PublishPath>
      <TrimMode>Link</TrimMode>
    </CoreMBAProject>
    <CoreMBAProject Include="$(WPFCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.WPFCoreMBA</PublishPath>
      <SkipFDDx86>true</SkipFDDx86>
      <SkipSCD>true</SkipSCD>
    </CoreMBAProject>
  </ItemGroup>

  <Target Name="PublishCoreExamples" BeforeTargets="Build">
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd-x86" -r win-x86 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipFDDx86)'==''" />
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x64 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipFDD)'==''" />
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x64 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipSCD)'==''" />
    <!--
    Publishing a library is "undefined" (per https://github.com/dotnet/runtime/issues/91535)
    and is now a build error. This will go away when BAs go out of proc, so not spending a
    lot of time to keep building trimmed in VS 17.8.
    -->
    <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)"'
          Condition="'%(CoreMBAProject.TrimMode)'!=''" />
  </Target>

  <ItemGroup>
    <ProjectReference Include="**\*.wixproj" />
  </ItemGroup>
</Project>