Skip to content

Commit c3c8b19

Browse files
authored
Update NuGet template wizard after recent Microsoft.Windows.SDK.BuildTools addition to WAS. (#1269)
* Add the new Microsoft.Windows.SDK.BuildTools package to the template so that it is installed when a new project is created using the VSIX. * Addressed comments. * Added definition for WindowsSDKBuildToolsVersion. Fixing case mismatch of WindowsAppSDKVersion in Directory.Build.props (if this change results in 0.5.7 getting used in the VSIX template project files, then clearly we were just getting lucky so far; I'll remove the line in that case). * Install of the NuGet pacakge failed because it couldn't be found. I think that's because the source was absent. It may be that we don't want to use the public nuget source here, but this at least will confirm the suspicion. * Don't underestimate the importance of the semi-colan character. * Attempted fix of: In the Packages subfolder of the VSIX install, I don't see the Microsoft.Windows.SDK.BuildTools .NUPKG. * Undoing addition of the public nuget source. We clearly don't need it since we're successfully using the CppWinRT package already. * Attempt to fix the C++ templates gap: with the wap proj blank app template, the build tools nuget isn't being installed. * Same for CS templates now. * Adding some missing changes... * Adding more missing files... * Fix mistakes. * Tabs to spaces.
1 parent 8b149eb commit c3c8b19

22 files changed

+41
-5
lines changed

SdkVersion.props

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44
<PropertyGroup>
55
<SDKVersionRS2>10.0.15063.0</SDKVersionRS2>
6-
<SDKVersionRS3>10.0.16299.0</SDKVersionRS3>
7-
<SDKVersionRS4>10.0.17134.0</SDKVersionRS4>
8-
<SDKVersionRS5>10.0.17763.0</SDKVersionRS5>
9-
<SDKVersion19H1>10.0.18362.0</SDKVersion19H1>
10-
<SDKVersionInsider>10.0.18362.0</SDKVersionInsider>
6+
<SDKVersionRS3>10.0.16299.0</SDKVersionRS3>
7+
<SDKVersionRS4>10.0.17134.0</SDKVersionRS4>
8+
<SDKVersionRS5>10.0.17763.0</SDKVersionRS5>
9+
<SDKVersion19H1>10.0.18362.0</SDKVersion19H1>
10+
<SDKVersionInsider>10.0.18362.0</SDKVersionInsider>
1111
</PropertyGroup>
12+
1213
<PropertyGroup>
1314
<UseInsiderSDK>true</UseInsiderSDK>
1415
<!-- By default we use the publicly shipped SDK version which is 19H1 now -->

dev/VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
3838
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_CppWinRT)\*.nupkg" />
3939
<ContentNugetPackages Include="$(PkgMicrosoft_WindowsAppSDK)\*.nupkg" />
40+
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
4041
<Content Include="@(ContentNugetPackages)">
4142
<IncludeInVSIX>true</IncludeInVSIX>
4243
<VSIXSubPath>Packages</VSIXSubPath>

dev/VSIX/Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<ItemGroup>
3737
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
3838
<ContentNugetPackages Include="$(PkgMicrosoft_WindowsAppSDK)\*.nupkg" />
39+
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
3940
<Content Include="@(ContentNugetPackages)">
4041
<IncludeInVSIX>true</IncludeInVSIX>
4142
<VSIXSubPath>Packages</VSIXSubPath>

dev/VSIX/Extension/Original/WindowsAppSDK.Extension.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<ItemGroup>
3535
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_CppWinRT)\*.nupkg" />
3636
<ContentNugetPackages Include="$(PkgMicrosoft_WindowsAppSDK)\*.nupkg" />
37+
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
3738
<Content Include="@(ContentNugetPackages)">
3839
<IncludeInVSIX>true</IncludeInVSIX>
3940
<VSIXSubPath>Packages</VSIXSubPath>
@@ -67,6 +68,9 @@
6768
<PackageReference Include="Microsoft.WindowsAppSDK" Version="[$(WindowsAppSDKVersion)]" GeneratePathProperty="true">
6869
<ExcludeAssets>All</ExcludeAssets>
6970
</PackageReference>
71+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="[$(WindowsSDKBuildToolsVersion)]" GeneratePathProperty="true">
72+
<ExcludeAssets>All</ExcludeAssets>
73+
</PackageReference>
7074
</ItemGroup>
7175
<ItemGroup>
7276
<ProjectReference Include="..\..\ItemTemplates\Desktop\CSharp\BlankWindow\WinUI.Desktop.Cs.BlankWindow.csproj">

dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/ProjectTemplate.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$WindowsAppSDKNupkgVersion$" />
12+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$WindowsSDKBuildToolsNupkgVersion$" />
1213
</ItemGroup>
1314
</Project>

dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.vstemplate

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<TemplateContent PreferedSolutionConfiguration="Debug|AnyCPU">
2929
<CustomParameters>
3030
<CustomParameter Name="$WindowsAppSDKNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
31+
<CustomParameter Name="$WindowsSDKBuildToolsNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
3132
</CustomParameters>
3233
<Project File="ProjectTemplate.csproj" ReplaceParameters="true">
3334
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Class1.cs</ProjectItem>

dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/ProjectTemplate.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$ext_WindowsAppSDKNupkgVersion$" />
15+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$ext_WindowsSDKBuildToolsNupkgVersion$" />
1516
<Manifest Include="$(ApplicationManifest)" />
1617
</ItemGroup>
1718
</Project>

dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.wapproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@
8181
<PackageReference Include="Microsoft.WindowsAppSDK" Version="[$ext_WindowsAppSDKNupkgVersion$]">
8282
<IncludeAssets>build</IncludeAssets>
8383
</PackageReference>
84+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="[$ext_WindowsSDKBuildToolsNupkgVersion$]">
85+
<IncludeAssets>build</IncludeAssets>
86+
</PackageReference>
8487
</ItemGroup>
8588

8689
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />

dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WinUI.Desktop.Cs.WapProj.vstemplate

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<TemplateContent>
2828
<CustomParameters>
2929
<CustomParameter Name="$WindowsAppSDKNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
30+
<CustomParameter Name="$WindowsSDKBuildToolsNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
3031
</CustomParameters>
3132
<Project File="WapProjTemplate.wapproj" ReplaceParameters="true">
3233
<ProjectItem ReplaceParameters="true" TargetFileName="Package.appxmanifest">Package-managed.appxmanifest</ProjectItem>

dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.vstemplate

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<TemplateContent PreferedSolutionConfiguration="Debug|x86">
2929
<CustomParameters>
3030
<CustomParameter Name="$WindowsAppSDKNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
31+
<CustomParameter Name="$WindowsSDKBuildToolsNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
3132
</CustomParameters>
3233
<ProjectCollection>
3334
<ProjectTemplateLink ProjectName="$projectname$ (Package)" CopyParameters="true">WapProj\WinUI.Desktop.Cs.WapProj.vstemplate</ProjectTemplateLink>

0 commit comments

Comments
 (0)