Skip to content

Commit add3319

Browse files
Merge pull request #3647 from microsoft/staging
Release - 8/20/24
2 parents bfc595e + b8d6537 commit add3319

File tree

299 files changed

+12267
-2943
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+12267
-2943
lines changed

.github/pull_request_template.md

-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
1010
- [ ] Closes #xxx
1111
- [ ] Tests added/passed
1212
- [ ] Documentation updated
13-
- [ ] Telemetry [compliance tasks](https://aka.ms/devhome-telemetry) completed for added/updated events

Build.ps1

+9-60
Original file line numberDiff line numberDiff line change
@@ -113,66 +113,29 @@ if (-not([string]::IsNullOrWhiteSpace($SDKNugetSource))) {
113113

114114
Try {
115115
if (($BuildStep -ieq "all") -Or ($BuildStep -ieq "msix") -Or ($BuildStep -ieq "fullMsix")) {
116+
# Update C++ version resources and header
117+
$cppHeader = (Join-Path $env:Build_RootDirectory "build\cppversion\version.h")
118+
$updatebinverpath = (Join-Path $env:Build_RootDirectory "build\scripts\update-binver.ps1")
119+
& $updatebinverpath -TargetFile $cppHeader -BuildVersion $env:msix_version
120+
116121
$buildRing = "Dev"
117-
$newPackageName = $null
118-
$newPackageDisplayName = $null
119-
$newAppDisplayNameResource = $null
120-
$newWidgetProviderDisplayName = $null
122+
$appxmanifestPath = (Join-Path $env:Build_RootDirectory "src\Package-Dev.appxmanifest")
121123

122124
if ($AzureBuildingBranch -ieq "release") {
123125
$buildRing = "Stable"
124-
$newPackageName = "Microsoft.Windows.DevHome"
125-
$newPackageDisplayName = "Dev Home (Preview)"
126-
$newAppDisplayNameResource = "ms-resource:AppDisplayNameStable"
127-
$newWidgetProviderDisplayName = "ms-resource:WidgetProviderDisplayNameStable"
126+
$appxmanifestPath = (Join-Path $env:Build_RootDirectory "src\Package.appxmanifest")
128127
} elseif ($AzureBuildingBranch -ieq "staging") {
129128
$buildRing = "Canary"
130-
$newPackageName = "Microsoft.Windows.DevHome.Canary"
131-
$newPackageDisplayName = "Dev Home (Canary)"
132-
$newAppDisplayNameResource = "ms-resource:AppDisplayNameCanary"
133-
$newWidgetProviderDisplayName = "ms-resource:WidgetProviderDisplayNameCanary"
129+
$appxmanifestPath = (Join-Path $env:Build_RootDirectory "src\Package-Can.appxmanifest")
134130
}
135131

136132
[Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq")
137133
$xIdentity = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Identity");
138-
$xProperties = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Properties");
139-
$xDisplayName = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/foundation/windows10}DisplayName");
140-
$xApplications = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Applications");
141-
$xApplication = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Application");
142-
$uapVisualElements = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/uap/windows10}VisualElements");
143-
$xExtensions = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Extensions");
144-
$uapExtension = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/uap/windows10/3}Extension");
145-
$uapAppExtension = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/uap/windows10/3}AppExtension");
146-
147-
# Update C++ version resources and header
148-
$cppHeader = (Join-Path $env:Build_RootDirectory "build\cppversion\version.h")
149-
$updatebinverpath = (Join-Path $env:Build_RootDirectory "build\scripts\update-binver.ps1")
150-
& $updatebinverpath -TargetFile $cppHeader -BuildVersion $env:msix_version
151134

152135
# Update the appxmanifest
153-
$appxmanifestPath = (Join-Path $env:Build_RootDirectory "src\Package.appxmanifest")
154136
$appxmanifest = [System.Xml.Linq.XDocument]::Load($appxmanifestPath)
155137
$appxmanifest.Root.Element($xIdentity).Attribute("Version").Value = $env:msix_version
156-
if (-not ([string]::IsNullOrEmpty($newPackageName))) {
157-
$appxmanifest.Root.Element($xIdentity).Attribute("Name").Value = $newPackageName
158-
}
159-
if (-not ([string]::IsNullOrEmpty($newPackageDisplayName))) {
160-
$appxmanifest.Root.Element($xProperties).Element($xDisplayName).Value = $newPackageDisplayName
161-
}
162-
if (-not ([string]::IsNullOrEmpty($newAppDisplayNameResource))) {
163-
$appxmanifest.Root.Element($xApplications).Element($xApplication).Element($uapVisualElements).Attribute("DisplayName").Value = $newAppDisplayNameResource
164-
$extensions = $appxmanifest.Root.Element($xApplications).Element($xApplication).Element($xExtensions).Elements($uapExtension)
165-
foreach ($extension in $extensions) {
166-
if ($extension.Attribute("Category").Value -eq "windows.appExtension") {
167-
$appExtension = $extension.Element($uapAppExtension)
168-
switch ($appExtension.Attribute("Name").Value) {
169-
"com.microsoft.windows.widgets" {
170-
$appExtension.Attribute("DisplayName").Value = $newWidgetProviderDisplayName
171-
}
172-
}
173-
}
174-
}
175-
}
138+
176139
Write-XmlDocumentToFile -xmlDocument $appxmanifest -filePath $appxmanifestPath
177140

178141
# This is needed for vcxproj
@@ -217,20 +180,6 @@ Try {
217180
# Reset the appxmanifest to prevent unnecessary code changes
218181
$appxmanifest = [System.Xml.Linq.XDocument]::Load($appxmanifestPath)
219182
$appxmanifest.Root.Element($xIdentity).Attribute("Version").Value = "0.0.0.0"
220-
$appxmanifest.Root.Element($xIdentity).Attribute("Name").Value = "Microsoft.Windows.DevHome.Dev"
221-
$appxmanifest.Root.Element($xProperties).Element($xDisplayName).Value = "Dev Home (Dev)"
222-
$appxmanifest.Root.Element($xApplications).Element($xApplication).Element($uapVisualElements).Attribute("DisplayName").Value = "ms-resource:AppDisplayNameDev"
223-
$extensions = $appxmanifest.Root.Element($xApplications).Element($xApplication).Element($xExtensions).Elements($uapExtension)
224-
foreach ($extension in $extensions) {
225-
if ($extension.Attribute("Category").Value -eq "windows.appExtension") {
226-
$appExtension = $extension.Element($uapAppExtension)
227-
switch ($appExtension.Attribute("Name").Value) {
228-
"com.microsoft.windows.widgets" {
229-
$appExtension.Attribute("DisplayName").Value = "ms-resource:WidgetProviderDisplayNameDev"
230-
}
231-
}
232-
}
233-
}
234183
Write-XmlDocumentToFile -xmlDocument $appxmanifest -filePath $appxmanifestPath
235184
}
236185

DevHome.sln

+87
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WSLExtension", "WSLExtensio
163163
EndProject
164164
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WSLExtension", "extensions\WSLExtension\WSLExtension.csproj", "{B6153EEA-EADE-4BAA-B47D-6B48205C6696}"
165165
EndProject
166+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FileExplorerGitIntegration", "extensions\GitExtension\FileExplorerGitIntegration\FileExplorerGitIntegration.csproj", "{5366F178-AD59-475C-B78D-2E6483313F9E}"
167+
EndProject
168+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitExtension", "GitExtension", "{01AB3100-A939-41DD-A67F-1F8C275A307D}"
169+
EndProject
170+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FileExplorerGitIntegration.UnitTest", "extensions\GitExtension\FileExplorerGitIntegration.UnitTest\FileExplorerGitIntegration.UnitTest.csproj", "{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}"
171+
EndProject
172+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevHome.FileExplorerSourceControlIntegration", "tools\Customization\DevHome.FileExplorerSourceControlIntegration\DevHome.FileExplorerSourceControlIntegration.csproj", "{83D12033-364A-45F2-8FCA-9BD8E8322D91}"
173+
EndProject
174+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevHome.FileExplorerSourceControlIntegrationUnitTest", "tools\Customization\DevHome.FileExplorerSourceControlIntegrationUnitTest\DevHome.FileExplorerSourceControlIntegrationUnitTest.csproj", "{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}"
175+
EndProject
166176
Global
167177
GlobalSection(SolutionConfigurationPlatforms) = preSolution
168178
Debug_FailFast|arm64 = Debug_FailFast|arm64
@@ -1079,6 +1089,78 @@ Global
10791089
{B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Release|x64.Build.0 = Release|x64
10801090
{B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Release|x86.ActiveCfg = Release|x86
10811091
{B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Release|x86.Build.0 = Release|x86
1092+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug_FailFast|arm64.ActiveCfg = Debug|arm64
1093+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug_FailFast|arm64.Build.0 = Debug|arm64
1094+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug_FailFast|x64.ActiveCfg = Debug|x64
1095+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug_FailFast|x64.Build.0 = Debug|x64
1096+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug_FailFast|x86.ActiveCfg = Debug|x86
1097+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug_FailFast|x86.Build.0 = Debug|x86
1098+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug|arm64.ActiveCfg = Debug|arm64
1099+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug|arm64.Build.0 = Debug|arm64
1100+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug|x64.ActiveCfg = Debug|x64
1101+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug|x64.Build.0 = Debug|x64
1102+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug|x86.ActiveCfg = Debug|x86
1103+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Debug|x86.Build.0 = Debug|x86
1104+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Release|arm64.ActiveCfg = Release|arm64
1105+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Release|arm64.Build.0 = Release|arm64
1106+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Release|x64.ActiveCfg = Release|x64
1107+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Release|x64.Build.0 = Release|x64
1108+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Release|x86.ActiveCfg = Release|x86
1109+
{5366F178-AD59-475C-B78D-2E6483313F9E}.Release|x86.Build.0 = Release|x86
1110+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug_FailFast|arm64.ActiveCfg = Debug|arm64
1111+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug_FailFast|arm64.Build.0 = Debug|arm64
1112+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug_FailFast|x64.ActiveCfg = Debug|x64
1113+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug_FailFast|x64.Build.0 = Debug|x64
1114+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug_FailFast|x86.ActiveCfg = Debug|x86
1115+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug_FailFast|x86.Build.0 = Debug|x86
1116+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug|arm64.ActiveCfg = Debug|arm64
1117+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug|arm64.Build.0 = Debug|arm64
1118+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug|x64.ActiveCfg = Debug|x64
1119+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug|x64.Build.0 = Debug|x64
1120+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug|x86.ActiveCfg = Debug|x86
1121+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Debug|x86.Build.0 = Debug|x86
1122+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Release|arm64.ActiveCfg = Release|arm64
1123+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Release|arm64.Build.0 = Release|arm64
1124+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Release|x64.ActiveCfg = Release|x64
1125+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Release|x64.Build.0 = Release|x64
1126+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Release|x86.ActiveCfg = Release|x86
1127+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E}.Release|x86.Build.0 = Release|x86
1128+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug_FailFast|arm64.ActiveCfg = Debug|arm64
1129+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug_FailFast|arm64.Build.0 = Debug|arm64
1130+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug_FailFast|x64.ActiveCfg = Debug|x64
1131+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug_FailFast|x64.Build.0 = Debug|x64
1132+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug_FailFast|x86.ActiveCfg = Debug|x86
1133+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug_FailFast|x86.Build.0 = Debug|x86
1134+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug|arm64.ActiveCfg = Debug|arm64
1135+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug|arm64.Build.0 = Debug|arm64
1136+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug|x64.ActiveCfg = Debug|x64
1137+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug|x64.Build.0 = Debug|x64
1138+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug|x86.ActiveCfg = Debug|x86
1139+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Debug|x86.Build.0 = Debug|x86
1140+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Release|arm64.ActiveCfg = Release|arm64
1141+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Release|arm64.Build.0 = Release|arm64
1142+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Release|x64.ActiveCfg = Release|x64
1143+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Release|x64.Build.0 = Release|x64
1144+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Release|x86.ActiveCfg = Release|x86
1145+
{83D12033-364A-45F2-8FCA-9BD8E8322D91}.Release|x86.Build.0 = Release|x86
1146+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug_FailFast|arm64.ActiveCfg = Debug|arm64
1147+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug_FailFast|arm64.Build.0 = Debug|arm64
1148+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug_FailFast|x64.ActiveCfg = Debug|x64
1149+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug_FailFast|x64.Build.0 = Debug|x64
1150+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug_FailFast|x86.ActiveCfg = Debug|x86
1151+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug_FailFast|x86.Build.0 = Debug|x86
1152+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug|arm64.ActiveCfg = Debug|arm64
1153+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug|arm64.Build.0 = Debug|arm64
1154+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug|x64.ActiveCfg = Debug|x64
1155+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug|x64.Build.0 = Debug|x64
1156+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug|x86.ActiveCfg = Debug|x86
1157+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Debug|x86.Build.0 = Debug|x86
1158+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Release|arm64.ActiveCfg = Release|arm64
1159+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Release|arm64.Build.0 = Release|arm64
1160+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Release|x64.ActiveCfg = Release|x64
1161+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Release|x64.Build.0 = Release|x64
1162+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Release|x86.ActiveCfg = Release|x86
1163+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7}.Release|x86.Build.0 = Release|x86
10821164
EndGlobalSection
10831165
GlobalSection(SolutionProperties) = preSolution
10841166
HideSolutionNode = FALSE
@@ -1141,6 +1223,11 @@ Global
11411223
{D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F} = {E0A15760-487A-4CCB-8093-DE6FF3C4BC23}
11421224
{73D1E84F-56CC-412B-BF2B-FA692BF6B396} = {DCAF188B-60C3-4EDB-8049-BAA927FBCD7D}
11431225
{B6153EEA-EADE-4BAA-B47D-6B48205C6696} = {73D1E84F-56CC-412B-BF2B-FA692BF6B396}
1226+
{5366F178-AD59-475C-B78D-2E6483313F9E} = {01AB3100-A939-41DD-A67F-1F8C275A307D}
1227+
{01AB3100-A939-41DD-A67F-1F8C275A307D} = {DCAF188B-60C3-4EDB-8049-BAA927FBCD7D}
1228+
{8C1C7BF8-B27B-4F4D-97E5-A16E02C7860E} = {01AB3100-A939-41DD-A67F-1F8C275A307D}
1229+
{83D12033-364A-45F2-8FCA-9BD8E8322D91} = {623998FD-B0A6-4980-95D5-A5072301CA10}
1230+
{A1FAE679-39D4-4278-A8E8-EA351F21A3E7} = {623998FD-B0A6-4980-95D5-A5072301CA10}
11441231
EndGlobalSection
11451232
GlobalSection(ExtensibilityGlobals) = postSolution
11461233
SolutionGuid = {030B5641-B206-46BB-BF71-36FF009088FA}

Directory.Build.props

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<PropertyGroup>
2929
<_PropertySheetDisplayName>DevHome.Root.Props</_PropertySheetDisplayName>
3030
<ForceImportBeforeCppProps>$(MsbuildThisFileDirectory)\Cpp.Build.props</ForceImportBeforeCppProps>
31+
<BuildRing Condition="'$(BuildRing)'==''">Dev</BuildRing>
32+
<DefineConstants Condition="'$(BuildRing)'=='Canary'">$(DefineConstants);CANARY_BUILD</DefineConstants>
33+
<DefineConstants Condition="'$(BuildRing)'=='Stable'">$(DefineConstants);STABLE_BUILD</DefineConstants>
3134
</PropertyGroup>
3235

3336
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">

build/azure-pipelines.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ parameters:
2121

2222
variables:
2323
# MSIXVersion's second part should always be odd to account for stub app's version
24-
MSIXVersion: '0.1601'
24+
MSIXVersion: '0.1701'
2525
VersionOfSDK: '0.700'
2626
solution: '**/DevHome.sln'
2727
appxPackageDir: 'AppxPackages'
@@ -233,7 +233,9 @@ extends:
233233
234234
$(Build.SourcesDirectory)\**\bin\**\*.dll
235235
236-
$(Build.SourcesDirectory)\**\obj\**\*.r2r.ni.pdb
236+
$(Build.SourcesDirectory)\**\obj\**\*.pdb
237+
238+
$(Build.SourcesDirectory)\**\obj\**\devhome.r2r.dll
237239
238240
- template: ./build/templates/EsrpSigning-Steps.yml@self
239241
parameters:
@@ -593,4 +595,4 @@ extends:
593595
displayName: 'Publish StoreBroker Artifacts'
594596
condition: or(eq(variables['BuildingBranch'], 'staging'), eq(variables['BuildingBranch'], 'release'))
595597
artifactName: StoreBrokerPackage
596-
targetPath: '$(System.DefaultWorkingDirectory)\SBOutDir'
598+
targetPath: '$(System.DefaultWorkingDirectory)\SBOutDir'

build/scripts/CreateBuildInfo.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Param(
66
)
77

88
$Major = "0"
9-
$Minor = "16"
9+
$Minor = "17"
1010
$Patch = "99" # default to 99 for local builds
1111

1212
$versionSplit = $Version.Split(".");

common/Behaviors/AutoFocusBehavior.cs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
using CommunityToolkit.WinUI.Behaviors;
5+
using Microsoft.UI.Xaml;
6+
using Microsoft.UI.Xaml.Controls;
7+
8+
namespace DevHome.Common.Behaviors;
9+
10+
/// <summary>
11+
/// This behavior automatically sets the focus on the associated <see cref="Control"/> when it is loaded.
12+
/// </summary>
13+
/// <remarks>
14+
/// This implementation is based on the code from the Windows Community Toolkit.
15+
/// Reference: https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/winui/CommunityToolkit.WinUI.UI.Behaviors/Focus/AutoFocusBehavior.cs
16+
/// Issue: https://github.com/CommunityToolkit/Windows/issues/443
17+
/// </remarks>
18+
public sealed class AutoFocusBehavior : BehaviorBase<Control>
19+
{
20+
protected override void OnAssociatedObjectLoaded() => AssociatedObject.Focus(FocusState.Programmatic);
21+
}

common/DevHome.Common.csproj

+4-8
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@
3838
<PackageReference Include="CommunityToolkit.WinUI.Controls.Segmented" Version="8.1.240328-rc" />
3939
<PackageReference Include="CommunityToolkit.WinUI.Converters" Version="8.1.240328-rc" />
4040
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.0.240109" />
41+
<PackageReference Include="LibGit2Sharp" Version="0.30.0" />
4142
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
42-
<PackageReference Include="Microsoft.Internal.Windows.DevHome.Helpers" Version="1.0.20240709-x2135" />
43+
<PackageReference Include="Microsoft.Internal.Windows.DevHome.Helpers" Version="1.0.20240805-x2200" />
4344
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
4445
<PrivateAssets>all</PrivateAssets>
4546
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4647
</PackageReference>
4748
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
48-
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.600.494" />
49+
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.700.544" />
4950
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" />
5051
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
5152
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
@@ -55,7 +56,7 @@
5556
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
5657
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
5758
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
58-
<PackageReference Include="System.Management.Automation" Version="7.4.0" />
59+
<PackageReference Include="System.Management.Automation" Version="7.4.3" />
5960
<PackageReference Include="WinUIEx" Version="2.3.4" />
6061
</ItemGroup>
6162

@@ -112,9 +113,4 @@
112113
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
113114
</Content>
114115
</ItemGroup>
115-
116-
<PropertyGroup>
117-
<DefineConstants Condition="'$(BuildRing)'=='Canary'">$(DefineConstants);CANARY_BUILD</DefineConstants>
118-
<DefineConstants Condition="'$(BuildRing)'=='Stable'">$(DefineConstants);STABLE_BUILD</DefineConstants>
119-
</PropertyGroup>
120116
</Project>

0 commit comments

Comments
 (0)