Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ReadMe.md

Outline

CommunityToolkit MultiTarget System

Simplified targeting, packaging and deployment of an application and it's supporting libraries.

Note The MultiTarget system is not designed to be used outside the Windows Community Toolkit or Toolkit Labs.

MultiTarget MSBuild Property

<MultiTarget> is a custom property that indicates which target a component is designed to be built for / run on.

The supplied targets are used to create project references, generate solution files, enable/disable TargetFrameworks, build nuget packages, and more.

Basic usage

Create a MultiTarget.props file in the root of your source project to change the platform targets for your component. This will be picked up automatically by your sample project, unless it has a MultiTarget.props of its own defined.

By default, all available targets are enabled:

<Project>
    <PropertyGroup>
        <MultiTarget>uwp;wasdk;wpf;wasm;linuxgtk;macos;ios;android;</MultiTarget>
    </PropertyGroup>
</Project>

For example, to only target UWP, WASM and Android:

<Project>
    <PropertyGroup>
        <MultiTarget>uwp;wasm;android</MultiTarget>
    </PropertyGroup>
</Project>

ProjectReference Generation

The script GenerateAllProjectReferences.ps1 will scan for toolkit components and generate .props files for each.

NuGet Packages

The <MultiTarget> property is used to define the TargetFrameworks supported by that project. Projects packed into a NuGet packages will reflect this.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.