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.
This commit is contained in:
Rohan Palaniappan 2021-09-01 17:09:38 -07:00 коммит произвёл GitHub
Родитель 8b149eb751
Коммит c3c8b190bd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
22 изменённых файлов: 41 добавлений и 5 удалений

Просмотреть файл

@ -3,12 +3,13 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SDKVersionRS2>10.0.15063.0</SDKVersionRS2>
<SDKVersionRS3>10.0.16299.0</SDKVersionRS3>
<SDKVersionRS4>10.0.17134.0</SDKVersionRS4>
<SDKVersionRS5>10.0.17763.0</SDKVersionRS5>
<SDKVersion19H1>10.0.18362.0</SDKVersion19H1>
<SDKVersionInsider>10.0.18362.0</SDKVersionInsider>
<SDKVersionRS3>10.0.16299.0</SDKVersionRS3>
<SDKVersionRS4>10.0.17134.0</SDKVersionRS4>
<SDKVersionRS5>10.0.17763.0</SDKVersionRS5>
<SDKVersion19H1>10.0.18362.0</SDKVersion19H1>
<SDKVersionInsider>10.0.18362.0</SDKVersionInsider>
</PropertyGroup>
<PropertyGroup>
<UseInsiderSDK>true</UseInsiderSDK>
<!-- By default we use the publicly shipped SDK version which is 19H1 now -->

Просмотреть файл

@ -37,6 +37,7 @@
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_CppWinRT)\*.nupkg" />
<ContentNugetPackages Include="$(PkgMicrosoft_WindowsAppSDK)\*.nupkg" />
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
<Content Include="@(ContentNugetPackages)">
<IncludeInVSIX>true</IncludeInVSIX>
<VSIXSubPath>Packages</VSIXSubPath>

Просмотреть файл

@ -36,6 +36,7 @@
<ItemGroup>
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
<ContentNugetPackages Include="$(PkgMicrosoft_WindowsAppSDK)\*.nupkg" />
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
<Content Include="@(ContentNugetPackages)">
<IncludeInVSIX>true</IncludeInVSIX>
<VSIXSubPath>Packages</VSIXSubPath>

Просмотреть файл

@ -34,6 +34,7 @@
<ItemGroup>
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_CppWinRT)\*.nupkg" />
<ContentNugetPackages Include="$(PkgMicrosoft_WindowsAppSDK)\*.nupkg" />
<ContentNugetPackages Include="$(PkgMicrosoft_Windows_SDK_BuildTools)\*.nupkg" />
<Content Include="@(ContentNugetPackages)">
<IncludeInVSIX>true</IncludeInVSIX>
<VSIXSubPath>Packages</VSIXSubPath>
@ -67,6 +68,9 @@
<PackageReference Include="Microsoft.WindowsAppSDK" Version="[$(WindowsAppSDKVersion)]" GeneratePathProperty="true">
<ExcludeAssets>All</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="[$(WindowsSDKBuildToolsVersion)]" GeneratePathProperty="true">
<ExcludeAssets>All</ExcludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ItemTemplates\Desktop\CSharp\BlankWindow\WinUI.Desktop.Cs.BlankWindow.csproj">

Просмотреть файл

@ -9,5 +9,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$WindowsAppSDKNupkgVersion$" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$WindowsSDKBuildToolsNupkgVersion$" />
</ItemGroup>
</Project>

Просмотреть файл

@ -28,6 +28,7 @@
<TemplateContent PreferedSolutionConfiguration="Debug|AnyCPU">
<CustomParameters>
<CustomParameter Name="$WindowsAppSDKNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<CustomParameter Name="$WindowsSDKBuildToolsNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</CustomParameters>
<Project File="ProjectTemplate.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Class1.cs</ProjectItem>

Просмотреть файл

@ -12,6 +12,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$ext_WindowsAppSDKNupkgVersion$" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$ext_WindowsSDKBuildToolsNupkgVersion$" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -81,6 +81,9 @@
<PackageReference Include="Microsoft.WindowsAppSDK" Version="[$ext_WindowsAppSDKNupkgVersion$]">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="[$ext_WindowsSDKBuildToolsNupkgVersion$]">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />

Просмотреть файл

@ -27,6 +27,7 @@
<TemplateContent>
<CustomParameters>
<CustomParameter Name="$WindowsAppSDKNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<CustomParameter Name="$WindowsSDKBuildToolsNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</CustomParameters>
<Project File="WapProjTemplate.wapproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="Package.appxmanifest">Package-managed.appxmanifest</ProjectItem>

Просмотреть файл

@ -28,6 +28,7 @@
<TemplateContent PreferedSolutionConfiguration="Debug|x86">
<CustomParameters>
<CustomParameter Name="$WindowsAppSDKNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<CustomParameter Name="$WindowsSDKBuildToolsNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</CustomParameters>
<ProjectCollection>
<ProjectTemplateLink ProjectName="$projectname$ (Package)" CopyParameters="true">WapProj\WinUI.Desktop.Cs.WapProj.vstemplate</ProjectTemplateLink>

Просмотреть файл

@ -29,6 +29,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$WindowsAppSDKNupkgVersion$" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$WindowsSDKBuildToolsNupkgVersion$" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -28,6 +28,7 @@
<TemplateContent PreferedSolutionConfiguration="Debug|x86">
<CustomParameters>
<CustomParameter Name="$WindowsAppSDKNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<CustomParameter Name="$WindowsSDKBuildToolsNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</CustomParameters>
<Project File="ProjectTemplate.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="launchSettings.json">Properties\launchSettings.json</ProjectItem>

Просмотреть файл

@ -49,10 +49,12 @@
<WizardData>
<packages repository="extension" repositoryId="Microsoft.WindowsAppSDK.Cpp">
<package id="Microsoft.Windows.CppWinRT" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.Windows.SDK.BuildTools" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.WindowsAppSDK" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</packages>
<Assets>
<Asset Type="Microsoft.Windows.CppWinRT.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.SDK.BuildTools.nupkg" Source="File" Path="Microsoft.Windows.SDK.BuildTools.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.WindowsAppSDK.nupkg" Source="File" Path="Microsoft.WindowsAppSDK.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
</Assets>
</WizardData>

Просмотреть файл

@ -80,6 +80,9 @@
<PackageReference Include="Microsoft.WindowsAppSDK" Version="[$ext_WindowsAppSDKNupkgVersion$]">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="[$ext_WindowsSDKBuildToolsNupkgVersion$]">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />

Просмотреть файл

@ -27,6 +27,7 @@
<TemplateContent>
<CustomParameters>
<CustomParameter Name="$WindowsAppSDKNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<CustomParameter Name="$WindowsSDKBuildToolsNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</CustomParameters>
<Project File="WapProjTemplate.wapproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="Package.appxmanifest">Package-managed.appxmanifest</ProjectItem>

Просмотреть файл

@ -28,6 +28,7 @@
<CustomParameters>
<CustomParameter Name="$WindowsAppSDKNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<CustomParameter Name="$CppWinRTVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<CustomParameter Name="$WindowsSDKBuildToolsNupkgVersion$" Value="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</CustomParameters>
<ProjectCollection>
<ProjectTemplateLink ProjectName="$projectname$ (Package)" CopyParameters="true">WapProj\WinUI.Desktop.CppWinRT.WapProj.vstemplate</ProjectTemplateLink>

Просмотреть файл

@ -64,10 +64,12 @@
<WizardData>
<packages repository="extension" repositoryId="Microsoft.WindowsAppSDK.Cpp">
<package id="Microsoft.Windows.CppWinRT" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.Windows.SDK.BuildTools" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.WindowsAppSDK" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</packages>
<Assets>
<Asset Type="Microsoft.Windows.CppWinRT.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.SDK.BuildTools.nupkg" Source="File" Path="Microsoft.Windows.SDK.BuildTools.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.WindowsAppSDK.nupkg" Source="File" Path="Microsoft.WindowsAppSDK.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
</Assets>
</WizardData>

Просмотреть файл

@ -53,10 +53,12 @@
<MinSupportedVersion>10.0.17763.0</MinSupportedVersion>
<packages repository="extension" repositoryId="Microsoft.WindowsAppSDK.Cpp">
<package id="Microsoft.Windows.CppWinRT" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.Windows.SDK.BuildTools" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.WindowsAppSDK" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</packages>
<Assets>
<Asset Type="Microsoft.Windows.CppWinRT.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.SDK.BuildTools.nupkg" Source="File" Path="Microsoft.Windows.SDK.BuildTools.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.WindowsAppSDK.nupkg" Source="File" Path="Microsoft.WindowsAppSDK.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
</Assets>
</WizardData>

Просмотреть файл

@ -64,9 +64,11 @@
<UsePackageReferences>true</UsePackageReferences>
<packages repository="extension" repositoryId="Microsoft.WindowsAppSDK.Cs">
<package id="Microsoft.WindowsAppSDK" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.Windows.SDK.BuildTools" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</packages>
<Assets>
<Asset Type="Microsoft.WindowsAppSDK.nupkg" Source="File" Path="Microsoft.WindowsAppSDK.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.SDK.BuildTools.nupkg" Source="File" Path="Microsoft.Windows.SDK.BuildTools.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
</Assets>
</WizardData>
</VSTemplate>

Просмотреть файл

@ -47,9 +47,11 @@
<UsePackageReferences>true</UsePackageReferences>
<packages repository="extension" repositoryId="Microsoft.WindowsAppSDK.Cs">
<package id="Microsoft.WindowsAppSDK" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.Windows.SDK.BuildTools" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</packages>
<Assets>
<Asset Type="Microsoft.WindowsAppSDK.nupkg" Source="File" Path="Microsoft.WindowsAppSDK.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.SDK.BuildTools.nupkg" Source="File" Path="Microsoft.Windows.SDK.BuildTools.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
</Assets>
</WizardData>
</VSTemplate>

Просмотреть файл

@ -50,9 +50,11 @@
<UsePackageReferences>true</UsePackageReferences>
<packages repository="extension" repositoryId="Microsoft.WindowsAppSDK.Cs">
<package id="Microsoft.WindowsAppSDK" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.Windows.SDK.BuildTools" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</packages>
<Assets>
<Asset Type="Microsoft.WindowsAppSDK.nupkg" Source="File" Path="Microsoft.WindowsAppSDK.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.SDK.BuildTools.nupkg" Source="File" Path="Microsoft.Windows.SDK.BuildTools.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
</Assets>
</WizardData>
</VSTemplate>

Просмотреть файл

@ -66,10 +66,12 @@
<MinSupportedVersion>10.0.17763.0</MinSupportedVersion>
<packages repository="extension" repositoryId="Microsoft.WindowsAppSDK.Cpp">
<package id="Microsoft.Windows.CppWinRT" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.Windows.SDK.BuildTools" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
<package id="Microsoft.WindowsAppSDK" version="FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries" />
</packages>
<Assets>
<Asset Type="Microsoft.Windows.CppWinRT.nupkg" Source="File" Path="Microsoft.Windows.CppWinRT.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.Windows.SDK.BuildTools.nupkg" Source="File" Path="Microsoft.Windows.SDK.BuildTools.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
<Asset Type="Microsoft.WindowsAppSDK.nupkg" Source="File" Path="Microsoft.WindowsAppSDK.FIXME-Verify-Directory.Build.Targets-XmlPoke-Queries.nupkg" VsixSubPath="Packages" />
</Assets>
</WizardData>