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
<ImportProject="$(MSBuildProjectDirectory)\MultiTarget.props"Condition="Exists('$(MSBuildProjectDirectory)\MultiTarget.props') AND '$(MultiTarget)' == ''"/>
<ImportProject="$(MSBuildProjectDirectory)\MultiTarget.props"Condition="Exists('$(MSBuildProjectDirectory)\MultiTarget.props') AND '$(MultiTarget)' == ''" />
8
+
9
+
<!-- If in a sample project, pull the MultiTarget settings from the source project. -->
10
+
<!-- This behavior is also implemented in GeneratedAllProjectReferences.ps1 for <ProjectReference> generation. -->
11
+
<ImportProject="../../src/MultiTarget.props"Condition="$(MultiTargetIsSampleProject) == 'true' AND !Exists('$(MSBuildProjectDirectory)\MultiTarget.props') AND Exists('../../src/MultiTarget.props')" />
Copy file name to clipboardExpand all lines: MultiTarget/ReadMe.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# MultiTarget
2
2
3
-
`<MultiTarget>` is a custom property that indicates which target a project is designed to be built for / run on.
3
+
`<MultiTarget>` is a custom property that indicates which target a component is designed to be built for / run on.
4
4
5
5
The supplied targets are used to create project references, generate solution files, enable/disable TargetFrameworks, and build nuget packages.
6
6
7
7
## Basic usage
8
8
9
-
Create a `MultiTarget.props` file in the same folder as your `.csproj` to change its MultiTarget.
9
+
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.
10
10
11
11
By default, all available targets are enabled:
12
12
```xml
@@ -17,7 +17,7 @@ By default, all available targets are enabled:
17
17
</Project>
18
18
```
19
19
20
-
A project with this `MultiTarget.props` would only target UWP, WASM and Android:
20
+
For example, to only target UWP, WASM and Android:
21
21
22
22
```xml
23
23
<Project>
@@ -27,9 +27,10 @@ A project with this `MultiTarget.props` would only target UWP, WASM and Android:
27
27
</Project>
28
28
```
29
29
30
+
30
31
## ProjectReference Generation
31
32
32
-
The script `GenerateAllProjectReferences.ps1` will recursively scan the provided folders for `.csproj` files and generate a `.props`file with a MultiTarget-aware `<ProjectReference>`for each one.
33
+
The script `GenerateAllProjectReferences.ps1` will scan for experiments and generate `.props`files for each project.
0 commit comments