You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The `ArchNeutral` packages are built only during the `x86` (i.e., `AnyCPU`) build phase
24
+
- Normally, the `ArchNeutral` packages will contain a `runtime.json` file that incorporates the *Bait & Switch* technique for referencing RID-specific packages automatically.
25
+
-`runtime.json` functionality is turned off when a packaging project requests so by setting `$(PlatformIndependentPackage)=true`.
26
+
- See [Improve documentation - bait and switch pattern, other #1282](https://github.com/NuGet/docs.microsoft.com-nuget/issues/1282)
27
+
28
+
29
+
- The packages that are not `ArchNeutral` are architecture-specific, and will produce packages containing the RID (`win-x86`, `win-x64`) as a prefix
30
+
- The arch-specific packages are produced in each of the build phases.
31
+
32
+
#### Package Names
33
+
34
+
There are two packages produced out of this repo, a *transport* package and an *MsBuild Sdk* package:
35
+
36
+
-`Microsoft.DotNet.Wpf.Github`
37
+
- This contains assemblies and corresponding reference binaries that are currently built out of this repo ([https://www.github.com/dotnet/wpf](https://www.github.com/dotnet/wpf)).
38
+
-`Microsoft.DotNet.Arcade.Wpf.Sdk`
39
+
- This is an *MsBuild Sdk*, and is and extension to [Microsoft.DotNet.Arcade.Sdk](https://www.github.com/dotnet/arcade).
40
+
- This Sdk contains all the build props, targets and scripts needed to build WPF.
41
+
- Since WPF's build is split across two repos, we build this Sdk out of one repo, and consume it as an *MsBuild Sdk* in the other repo.
42
+
43
+
#### Opting into a package
44
+
45
+
- An assembly opts-into a package in `$(WpfArcadeSdkToolsDir)\Packaging.props` by simply setting the `PackageName` property, for e.g., like this:
In practice, this is not needed. *Shipping* assemblies are already enumerated in detail within `$(WpfArcadeSdkToolsDir)ShippingProjects.props`, and each one of them is marked for packaging correctly within `Packaging.props` based on its `$(RepoLocation)` value (possible values are `{Internal, External}`)
50
+
51
+
- These package names that various assembly projects can opt to be packaged into are defined in `$(WpfArcadeSdkToolsDir)\Packaging.props`. The project names under `$(RepoRoot)\packaging\` must match these.
-*`PreparePackageAssets`* target is defined in `$(WpfArcadeSdkToolsDir)Packaging.targets`
58
+
- It runs after *`Build`*, and copies all project outputs, symbols, reference assemblies, satellite assemblies, and content files (defined in *`@(PackageContent)`*`ItemGroup`) to `$(ArtifactsPackagingDir)$(PackageName)\lib\$(TargetFrameworkOrRuntimeIdentifier)\`
59
+
- If `@(PackagingAssemblyContent)` is populated, then only those files from `$(OutDir)` would be copied and packaged further - and none others would be included.
60
+
- At the end of this target, all files that need to be packed would have been laid out in the right folder hierarchy, and ready to be packed.
61
+
62
+
##### Populate the `@(Content)` itemgroup with custom lsit of package-assets (*`CreateContentFolder`* target)
63
+
64
+
-*`CreateContentFolder`* is defined in `$(WpfArcadeSdkToolsDir)Packaging.targets`
65
+
- It runs just before *`GenerateNuspec`* target, and populates `@(Content)` with files that were copied during *`PreparePackageAssets`*
66
+
- This is consume by NuGet `PackTask` to create the package.
67
+
68
+
##### Create a Nuget Package
69
+
70
+
- The projects under `$(RepoRoot)\packaging` are the only ones with `$(IsPackable)=true`
71
+
- The layout of the generated package is identical to the layout under `$(ArtifactsPackagindir)$(PackageName)\`
Solutions configurations are mapped to Project configurations in the following manner.
4
+
5
+
<fontface="consolas">
6
+
<table>
7
+
<tr>
8
+
<th>Solution</th>
9
+
<th>Managed Projects</th>
10
+
<th>Native Projects</th>
11
+
</tr>
12
+
<tr>
13
+
<td>Debug|AnyCPU</td>
14
+
<td>Debug|AnyCPU</td>
15
+
<td>Debug|<font color="red">Win32</font></td>
16
+
</tr>
17
+
<tr>
18
+
<td>Debug|x86</td>
19
+
<td>Debug|<font color="red">AnyCPU</font></td>
20
+
<td>Debug|<font color="blue">Win32</font></td>
21
+
</tr>
22
+
<tr>
23
+
<td>Debug|x64</td>
24
+
<td>Debug|x64</td>
25
+
<td>Debug|x64</td>
26
+
</tr>
27
+
<tr>
28
+
<td>Release|AnyCPU</td>
29
+
<td>Release|AnyCPU</td>
30
+
<td>Release|<font color="red">Win32</font></td>
31
+
</tr>
32
+
<tr>
33
+
<td>Release|x86</td>
34
+
<td>Release|<font color="red">AnyCPU</red></td>
35
+
<td>Release|<font color="blue">Win32</font></td>
36
+
</tr>
37
+
<tr>
38
+
<td>Release|x64</td>
39
+
<td>Release|x64</td>
40
+
<td>Release|x64</td>
41
+
</tr>
42
+
</table>
43
+
</font>
44
+
45
+
46
+
-`AnyCPU`**solution** configuration is intended for developer-builds only.
47
+
- Official build would *always* specify `x86` or `x64` solution configurations explicitly.
48
+
- Native projects should map `AnyCPU` solution-configuration to `x86` project configuration
49
+
- Managed projects should map `x86` solution-configuration to `AnyCPU` project configuration
50
+
- Use Solution->Properties->Configuration view to ensure that the mapping between solution-configuration and project configuration is consistent for every possible configuration.
51
+
- Note that packaging projects under `nupkg` folder have only one (`AnyCPU`) configuration
0 commit comments