Documentation/packaging.md
Packaging is implemented in the following files:
$(WpfArcadeSdkToolsDir)\Packaging.props
$(WpfArcadeSdkToolsDir)\Packaging.targets
$(RepoRoot)\packaging\**\*
│
├───Microsoft.DotNet.Arcade.Wpf.Sdk
│ Microsoft.DotNet.Arcade.Wpf.Sdk.ArchNeutral.csproj
│
├───Microsoft.DotNet.Wpf.DncEng
│ Microsoft.DotNet.Wpf.DncEng.ArchNeutral.csproj
│ Microsoft.DotNet.Wpf.DncEng.csproj
│
└───Microsoft.DotNet.Wpf.GitHub
Microsoft.DotNet.Wpf.GitHub.ArchNeutral.csproj
Microsoft.DotNet.Wpf.GitHub.csproj
The ArchNeutral packages are built only during the x86 (i.e., AnyCPU) build phase
ArchNeutral packages will contain a runtime.json file that incorporates the Bait & Switch technique for referencing RID-specific packages automatically.runtime.json functionality is turned off when a packaging project requests so by setting $(PlatformIndependentPackage)=true.
The packages that are not ArchNeutral are architecture-specific, and will produce packages containing the RID (win-x86, win-x64) as a prefix
There are two packages produced out of this repo, a transport package and an MsBuild Sdk package:
Microsoft.DotNet.Wpf.Github
Microsoft.DotNet.Arcade.Wpf.Sdk
An assembly opts-into a package in $(WpfArcadeSdkToolsDir)\Packaging.props by simply setting the PackageName property, for e.g., like this:
<PackageName Condition="'$(MSBuildProjectName)'=='WpfGfx'">$(DncEngTransportPackageName)</PackageName>
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})
$(WpfArcadeSdkToolsDir)\Packaging.props. The project names under $(RepoRoot)\packaging\ must match these.PreparePackageAssets target)PreparePackageAssets target is defined in $(WpfArcadeSdkToolsDir)Packaging.targetsBuild, and copies all project outputs, symbols, reference assemblies, satellite assemblies, and content files (defined in @(PackageContent) ItemGroup) to $(ArtifactsPackagingDir)$(PackageName)\lib\$(TargetFrameworkOrRuntimeIdentifier)\@(PackagingAssemblyContent) is populated, then only those files from $(OutDir) would be copied and packaged further - and none others would be included.@(Content) itemgroup with custom lsit of package-assets (CreateContentFolder target)CreateContentFolder is defined in $(WpfArcadeSdkToolsDir)Packaging.targetsGenerateNuspec target, and populates @(Content) with files that were copied during PreparePackageAssetsPackTask to create the package.$(RepoRoot)\packaging are the only ones with $(IsPackable)=true$(ArtifactsPackagindir)$(PackageName)\