Skip to content

Commit 4d2bce6

Browse files
authored
DevCheck: LongPath support, verify nuget.exe, fix ExitCode, fix InstallWindowsSDK, add/fix SettingsFile, update Getting Started docs #5785
* New options: * -CheckNugetExe - Verify nuget.exe is present * -FixAll - Enable all -Fix* options plus -NugetRestore * -FixLongPath - Enable LongPath support if necessary * -InstallWindowsSDK - Download and install Windows Platform SDKs (if necessary) * -NugetExe <path> - Location of nuget.exe (default=".user\nuget.exe") * -NugetMinVersion <version> - Minimum required version of nuget.exe (default="6.14.0.116") * -NugetExeUpdate - Download nuget.exe to the -NugetExe path * -NugetRestore - Restore nuget packages * Fixed error reporting. ExitCode=0 if successful, ExitCode=1 if 1+ issue(s) occurred * Added LongPath detection/enablement * Enhanced -CheckVisualStudio to detect `vswhere.exe` in PATH if not found at default install location * Fixed Install-WindowsSDK to respect -Offline * Changed SettingsFile handling: * -SaveSettingsFile is now a boolean * Default filename is DevCheck-Settings.ps1 next to DevCheck.ps1 * Removed fallback to look for SettingsFile in root\.user * Added a default settings file for this repo * paths to check/update dependencies (-CheckDependencies, -SyncDependencies) * Windows SDK versions/URLs to check/install (-CheckWindowsSDK, -InstallWindowsSDK) * paths/files to check to restore Nuget packages (-NugetRestore) * Updated Getting Started documentation (`docs\Coding-Guidelines\GettingStarted.md`) Ubersimplified usage to check everything is ready to rock and if not, fix it: ``` DevCheck -FixAll ``` See Getting Started documentation for more details.
1 parent 0a8c767 commit 4d2bce6

File tree

4 files changed

+427
-123
lines changed

4 files changed

+427
-123
lines changed

build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ parameters:
88

99
steps:
1010
- task: powershell@2
11-
displayName: 'DevCheck: Setup/Verify development environment'
11+
displayName: 'DevCheck: Setup/Verify test environment'
1212
inputs:
1313
targetType: filePath
1414
filePath: tools\DevCheck\DevCheck.ps1
15-
arguments: -NoInteractive -Offline -Verbose -CheckTestPfx -Clean -CheckDependencies -CheckVisualStudio -ShowSystemInfo
15+
arguments: -NoInteractive -Offline -Verbose -CheckTestPfx -Clean -ShowSystemInfo
1616
workingDirectory: '$(Build.SourcesDirectory)'
1717

1818
- task: DownloadPipelineArtifact@2
@@ -150,7 +150,7 @@ steps:
150150
Get-Service | Out-Host
151151
sc.exe queryex te.service | Write-Host
152152
sc.exe qc te.service | Write-Host
153-
153+
154154
- task: PowerShell@2
155155
displayName: 'Run TAEF Tests'
156156
inputs:
@@ -198,4 +198,4 @@ steps:
198198
inputs:
199199
targetPath: '$(Build.SourcesDirectory)\TestOutput'
200200
artifact: '$(System.StageName)_${{ parameters.ImageName }}_$(buildConfiguration)$(buildPlatform)_$(Agent.JobStatus)$(artifactAttempt)'
201-
Parallel: true
201+
Parallel: true

docs/Coding-Guidelines/GettingStarted.md

Lines changed: 23 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,77 +2,37 @@
22

33
# Tooling Prerequisites
44

5-
Development requires the following installed tools...
6-
7-
1. Windows 10 SDK 10.0.17763.0 (RS5)
8-
9-
The SDK can be installed via winget:
10-
11-
winget install Microsoft.WindowsSDK.10.0.17736
12-
13-
or via the browser:
14-
15-
* Browse to https://go.microsoft.com/fwlink/p/?LinkID=2033908
16-
* Save the offered download `winsdksetup.exe`
17-
* Run winsdksetup.exe
18-
19-
**NOTE:** Visual Studio 2022 doesn't include this SDK but will use it if installed on the machine.
20-
21-
2. Windows 11 SDK 10.0.26100.2454 (24H2)
22-
a. Browse to https://go.microsoft.com/fwlink/?linkid=2300556
23-
b. Save the offered download `winsdksetup.exe`
24-
c. Run winsdksetup.exe
25-
26-
**NOTE:** Visual Studio 2022 doesn't include this SDK but will use it if installed on the machine.
27-
28-
3. Visual Studio 2022 with...
29-
* Workloads
30-
* .NET desktop development
31-
* Desktop development with C++
32-
* Universal Windows Platform development
33-
* Individual components including
34-
* .NET 6.0 Runtime (LTS)
35-
* .NET 7.0 Runtime
36-
* .NET SDK
37-
* Git for Windows
38-
* NuGet package manager
39-
* NuGet targets and build tasks
40-
* C# and Visual Basic Roslyn compilers
41-
* MSBuild
42-
* MSVC v143 - VS 2022 C++ ARM64 build tools (Latest)
43-
* MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
44-
* MSVC v143 - VS 2022 C++ ARM64 Spectre-mitigated libs (Latest)
45-
* MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest)
46-
* Windows Universal CRT SDK
47-
* C# and Visual Basic
48-
* C++ core features
49-
* C++/WinRT
50-
* Windows 10 SDK (10.0.18362.0)
51-
* Windows 10 SDK (10.0.19041.0)
52-
* Windows 10 SDK (10.0.20348.0)
53-
* Windows 10 SDK (10.0.22000.0)
54-
* Windows 10 SDK (10.0.22621.0)
55-
* Windows Universal C Runtime
56-
* and more! See [VisualStudio2022.vsconfig](https://github.com/microsoft/WindowsAppSDK/blob/develop/docs/Coding-Guidelines/VisualStudio2022.vsconfig) for the complete list
57-
58-
**NOTE:** You can tell the Visual Studio Installer to do the heavy lifting for you
59-
via `More` / `Import configuration` and select `docs\Coding-Guidelines\VisualStudio2022.vsconfig`.
60-
61-
4. Run NuGet Restore
62-
* Download nuget.exe version >= 6.2.1 from https://www.nuget.org/downloads
63-
e.g. https://dist.nuget.org/win-x86-commandline/v6.2.1/nuget.exe
64-
* Open a command prompt
65-
* CD to the project root e.g. `cd c:\source\repos\windowsappsdk`
66-
* Run `nuget.exe restore`
5+
Development requires the following installation:
6+
7+
1. Install Visual Studio 2022
8+
9+
Select the following workloads:
10+
* .NET desktop development
11+
* Desktop development with C++
12+
* Universal Windows Platform development
13+
14+
Additional components are quired. To add them via the Visual Studio Installer...
15+
* select `More` / `Import configuration`
16+
* select the file `docs\Coding-Guidelines\VisualStudio2022.vsconfig` in the repository
17+
* select `Review details`
18+
* select `Modify`
19+
and wait for the install to complete.
20+
21+
2. Run `DevCheck -CheckAll -FixAll` from an admin prompt to verify your configuration and perform
22+
additional installation and configuration updates (if necessary). See `One-Time Setup` for more details.
6723

6824
# One-Time Setup
6925

7026
Run the `DevCheck.cmd` from an elevated command prompt (e.g. right-click on "Command Prompt"
7127
in the Start Menu and select `Run as Administrator`) to update your development environment. The script will:
7228

7329
* Verify Windows' Developer Mode is enabled.
30+
* Verify LongPath support (and enable if necessary).
31+
* Verify nuget.exe is available (and download if necessary).
7432
* Verify Visual Studio is installed with the required components.
75-
* Create a test certificate and add it to the certificate store. Used to sign test packages for inner-loop development and testing.
33+
* Verify Windows 10 SDK 10.0.17763.0 is installed (and install if necessary).
34+
* Verify Windows 11 SDK 10.0.26100.4654+ is installed (and install if necessary).
35+
* Verify a password-protected test certificate exists and add it to the certificate store (or create if necessary). Used to sign test packages for inner-loop development and testing.
7636
* Install the TAEF service (TE.Service). Used by TAEF to enable test functionality (e.g. RunAs).
7737
* Verify the project's dependencies are sanctioned and using the correct version(s).
7838

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) Microsoft Corporation and Contributors.
2+
# Licensed under the MIT License.
3+
4+
# DevCheck Settings
5+
6+
# Do not alter contents except in the Customization block
7+
# Everything else is owned by DevCheck and subject to change without warning
8+
9+
$me = (Get-Item $PSScriptRoot).FullName
10+
Write-Verbose "$me BEGIN Customization"
11+
#-----------------------------------------------------------------------
12+
# BEGIN Customization
13+
14+
# Set paths to scan by -CheckDependencies and -SyncDependencies
15+
$global:dependency_paths = ('dev', 'test', 'installer', 'tools')
16+
17+
# Set Windows SDKs to check/install by -CheckWindowsSDK and -InstallWindowsSDK
18+
$global:windows_sdks = (('10.0.17763.0', 'https://go.microsoft.com/fwlink/p/?LinkID=2033908'),
19+
('10.0.26100.4654', 'https://go.microsoft.com/fwlink/p/?LinkID=2327008'))
20+
21+
# Set Nuget Restore paths/filenames (relative to project root directory)
22+
$global:nuget_restore_filenames = ('WindowsAppRuntime.sln')
23+
24+
# END Customization
25+
#-----------------------------------------------------------------------
26+
$me = (Get-Item $PSScriptRoot).FullName
27+
Write-Verbose "$me END Customization"

0 commit comments

Comments
 (0)