Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build orchestration updates #2157

Open
wants to merge 6 commits into
base: master
from

Conversation

@vatsan-madhavan
Copy link
Member

vatsan-madhavan commented Nov 4, 2019

Today, the assemblies built out of dotnet/wpf are packaged into a transport NuGet package (Microsoft.DotNet.Wpf.GitHub). This package is consumed by an internal repo that builds native DLL's, and produces another transport package Microsoft.DotNet.Wpf.DncEng.

Both of these transport packages are in eventually consumed by dotnet/windowsdesktop (alongwith a transport package from WinForms) to build the WindowsDesktop shared runtime.

These updates to build targets will enable us to build a single transport package - Microsoft.DotNet.Wpf.GitHub - to flow into dotnet/windowsdesktop. This repo will use Microsoft.DotNet.Wpf.DncEng as an input (which contains native DLL's) and will produce a single transport package that contains all relevant WPF binaries (including those that came from Microsoft.DotNet.Wpf.DncEng).

These changes along do not institute changes to the overall build orchestration, and will not make effective the intent described above. These changes are intended to enable the goals outlined here shortly. Additional changes will likely be needed before the build orchestration can be further streamlined like this:

Now:

             +-----------------------------------------------------------------------------------------------------+
             |                                                                                                     |
             |                                                                                                     |
             |                                                                                                     |
             |                                                                                                     |
             |                                                                                                     |
             |                        +-----------------+    Microsoft.DotNet.Wpf.GitHub                           |
             |                 +----->+                 +-------------------------------------------------+ +------v---------------------+
+------------+-----+           |      |   WPF           |                                                 | |   dotnet/windowsdesktop    |
|                  |           |      +-------+---------+                                                 | |                            |        Microsoft.WindowsDesktop.App
|  WinForms        +-----------+              |                                                           +->     WindowsDesktop         +------>
|                  |           |              |                                                             |      composition           |
+------------------+           +-----+       Microsoft.DotNet.Wpf.GitHub                                    |                            |
                                     |        |                                                             |                            |
                                     |        |                                                             +--------------^-------------+
                                     |        |                     +--------------------------------+                     |
                                     |        +--------------------->       dotnet-wpf-int           |                     |
                                     Microsoft.Private.Winforms----v+                                |                     |
                                                                    |                                |                     |
                                                                    |   Native binaries built here   |                     |
                                                                    |                                |                     |
                                                                    |                                +-----------Microsoft.DotNet.Wpf.DncEng
                                                                    |                                |
                                                                    |                                |
                                                                    |                                |
                                                                    +--------------------------------+


Eventually:

                                                     Microsoft.Private.Winforms
                +-----------------------------------------------------------------------------------------------+
                |                                                                                               |
                |                                                                                               |
                |                                                                                               |
                |                                                                                               |
+---------------+-----------+                     +-----------------------------+                 +-------------v------------------+
|                           |                     |                             |                 |      dotnet/windowsdesktop     |
|                           |                     |                             |                 |                                |
|    WinForms               +--------------------->        WPF                  +-Microsoft.DotNet.Wpf.GitHub                      |
|                           |                     |                             |                <|                                |
|                           |                     |                             |                 |                                |
+---------------------------+                     |                             +--------+        |                                |
                                                  +--------------+--------------+        |        +--------------------------------+
                                                                 ^                       |
                                                                 |                       |
                                                                 |                       |
                                                                 |                       |
                                                            Microsoft.DotNet.Wpf.DncEng  | reverse flow:
                                                                 |                       |   1x/day toolset only
                                                                 |                       |   update (build props/targets)
                                                                 |                       |
                                                                 |                       |
                                                                 |                       |
                                                                 |                       |
                                                   +-------------+---------------+       |
                                                   |     dotnet-wpf-int          |       |
                                                   |                             |       |
                                                   |                             |       |
                                                   |                             <-------+
                                                   |                             |
                                                   |                             |
                                                   +-----------------------------+
@msftbot msftbot bot requested a review from rladuca Nov 4, 2019
@msftbot msftbot bot added the PR label Nov 4, 2019
@msftbot msftbot bot requested a review from SamBent Nov 4, 2019
@vatsan-madhavan vatsan-madhavan self-assigned this Nov 5, 2019
@vatsan-madhavan vatsan-madhavan added this to the 5.0 milestone Nov 5, 2019

<Delete Files="$(CppHelperProject)" Condition="Exists('$(CppHelperProject)')" />

<WriteLinesToFile Lines="%(CppSupportProject.Text)"

This comment has been minimized.

Copy link
@lindexi

lindexi Nov 6, 2019

Contributor

Maybe we can use MSBuild Escape that we can use ; and @ etc.

See https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-escape-special-characters-in-msbuild?view=vs-2019 and https://blog.lindexi.com/post/Roslyn-how-to-use-WriteLinesToFile-to-write-the-semicolons-to-file.html

Here is the example from my blog

    <PropertyGroup>
      <SomeThing>
        <![CDATA[
            Console.WriteLine("I am lindexi");
       ]]>
      </SomeThing>
    </PropertyGroup>
    <WriteLinesToFile File="lindexi.cs" Lines="$([MSBuild]::Escape($(SomeThing)))" Overwrite="true"></WriteLinesToFile>
<MSBuild Projects="@(ProjectToBuild)"
Targets="IdentifyNuGetReferences"
Properties="TargetFramework=$(TfmForBuild);Platform=$(Architecture);RuntimeIdentifier=win-$(Architecture)">
<Output TaskParameter="TargetOutputs" ItemName="NuGetReferencesForCpp" />

This comment has been minimized.

Copy link
@lindexi

lindexi Nov 6, 2019

Contributor
Suggested change
<Output TaskParameter="TargetOutputs" ItemName="NuGetReferencesForCpp" />
<Output TaskParameter="TargetOutputs" ItemName="NuGetReferencesForCpp" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.