File tree 3 files changed +23
-10
lines changed
Assets/MRTK/Tools/MSBuild/MSBuildMRTKTemplates
3 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 16
16
17
17
<!-- This is for successful building step from dotnet cli -->
18
18
<Choose>
19
+ <When Condition="'$(XamlTargetsPathOverride)'!= ''">
20
+ <PropertyGroup>
21
+ <LanguageTargets>$(XamlTargetsPathOverride)\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
22
+ </PropertyGroup>
23
+ </When>
19
24
<When Condition="'$(MSBuildExtensionsPathOverride)'!= ''">
20
25
<PropertyGroup>
21
26
<LanguageTargets>$(MSBuildExtensionsPathOverride)\Microsoft\WindowsXaml\v15.0\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
Original file line number Diff line number Diff line change 1
1
<Project xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
2
2
3
3
<ItemGroup >
4
- <ProjectReferences Include =" ..\MSBuild\Projects\MixedRealityToolkit.sln" />
4
+ <ProjectReferences Include =" ..\MSBuild\Projects\MixedRealityToolkit.sln" />
5
5
</ItemGroup >
6
6
7
+ <PropertyGroup >
8
+ <XamlTargetsPath >C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\WindowsXaml\v16.0</XamlTargetsPath >
9
+ </PropertyGroup >
10
+
7
11
<Target Name =" BuildStandaloneEditor" >
8
12
<MSBuild Projects =" @(ProjectReferences)" Targets =" Restore;Build" Properties =" Configuration=InEditor;Platform=WindowsStandalone32;BuildProjectReferences=false;GenerateDocumentationFile=true" >
9
13
<Output TaskParameter =" TargetOutputs" ItemName =" BuildStandaloneEditorOutputs" /><!-- AssembliesBuiltByChildProjects-->
27
31
<Output TaskParameter =" TargetOutputs" ItemName =" BuildAndroidPlayerOutputs" />
28
32
</MSBuild >
29
33
</Target >
30
-
34
+
31
35
<Target Name =" BuildIOSPlayer" >
32
36
<MSBuild Projects =" @(ProjectReferences)" Targets =" Restore;Build" Properties =" Configuration=Player;Platform=IOS;BuildProjectReferences=false;GenerateDocumentationFile=true" >
33
37
<Output TaskParameter =" TargetOutputs" ItemName =" BuildIOSPlayerOutputs" />
34
38
</MSBuild >
35
39
</Target >
36
40
37
41
<Target Name =" BuildWSAPlayer" >
38
- <MSBuild Projects =" @(ProjectReferences)" Targets =" Restore;Build" Properties =" Configuration=Player;Platform=WSA;BuildProjectReferences=false;MSBuildExtensionsPathOverride=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild ;GenerateDocumentationFile=true" >
42
+ <MSBuild Projects =" @(ProjectReferences)" Targets =" Restore;Build" Properties =" Configuration=Player;Platform=WSA;BuildProjectReferences=false;XamlTargetsPathOverride=$(XamlTargetsPath) ;GenerateDocumentationFile=true" >
39
43
<Output TaskParameter =" TargetOutputs" ItemName =" BuildWSAPlayerOutputs" />
40
44
</MSBuild >
41
45
</Target >
Original file line number Diff line number Diff line change 15
15
param (
16
16
[string ]$OutputDirectory = " .\artifacts" ,
17
17
[ValidatePattern (" ^\d+\.\d+\.\d+$" )]
18
- [string ]$Version ,
19
- [string ]$UnityDirectory
18
+ [string ]$Version = " 0.0.0" ,
19
+ [Parameter (Mandatory = $true )]
20
+ [string ]$UnityDirectory ,
21
+ [string ]$VisualStudioDirectory = " C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
20
22
)
21
23
22
24
Write-Verbose " Reconciling Unity binary:"
23
- if (-not $UnityDirectory ) {
24
- throw " -UnityDirectory is a required flag"
25
- }
26
-
27
25
$unityEditor = Get-ChildItem $UnityDirectory - Filter ' Unity.exe' - Recurse | Select-Object - First 1 - ExpandProperty FullName
28
26
if (-not $unityEditor ) {
29
27
throw " Unable to find the unity editor executable in $UnityDirectory "
98
96
exit ($lastexitcode )
99
97
}
100
98
Write-Output " ============ Building Player WSA ============ "
101
- dotnet msbuild .\BuildSource.proj - target:BuildWSAPlayer > " Logs\Build.Player.WSA.$ ( $Version ) .log"
99
+ if ($VisualStudioDirectory -match " 2019" ) {
100
+ $VisualStudioDirectory = Join-Path $VisualStudioDirectory " MSBuild\Microsoft\WindowsXaml\v16.0"
101
+ }
102
+ else {
103
+ $VisualStudioDirectory = Join-Path $VisualStudioDirectory " MSBuild\Microsoft\WindowsXaml\v15.0"
104
+ }
105
+ dotnet msbuild .\BuildSource.proj - target:BuildWSAPlayer / p:XamlTargetsPath= $VisualStudioDirectory > " Logs\Build.Player.WSA.$ ( $Version ) .log"
102
106
if ($lastexitcode -ge 1 ) {
103
107
Write-Error " Building Player WSA Failed! See log file for more information $ ( Get-Location ) \Logs\Build.Player.WSA.$ ( $Version ) .log" ;
104
108
exit ($lastexitcode )
You can’t perform that action at this time.
0 commit comments