diff --git a/.editorconfig b/.editorconfig index ecfa251206..c25d5a04a4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -87,16 +87,13 @@ csharp_style_var_elsewhere = true:suggestion csharp_style_var_for_built_in_types = true:suggestion #prefer var when the type is already mentioned on the right-hand side of a declaration expression csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_implicit_object_creation_when_type_is_apparent = true:warning #Style - language keyword and framework type options #prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion -#Style - Language rules -csharp_style_implicit_object_creation_when_type_is_apparent = true:warning -csharp_style_var_for_built_in_types = true:warning - #Style - modifier options #prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods. @@ -131,6 +128,9 @@ csharp_style_expression_bodied_operators = false:silent csharp_style_expression_bodied_indexers = true:silent csharp_style_expression_bodied_lambdas = true:silent csharp_style_expression_bodied_local_functions = false:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:silent [*.{cs,vb}] dotnet_style_operator_placement_when_wrapping = beginning_of_line @@ -146,7 +146,6 @@ dotnet_style_collection_initializer = true:suggestion dotnet_style_prefer_simplified_boolean_expressions = true:suggestion dotnet_style_prefer_conditional_expression_over_assignment = true:silent dotnet_style_prefer_conditional_expression_over_return = true:silent -[*.{cs,vb}] #Style - Unnecessary code rules csharp_style_unused_value_assignment_preference = discard_variable:warning @@ -193,16 +192,37 @@ dotnet_naming_style.pascal_case.required_suffix = dotnet_naming_style.pascal_case.word_separator = dotnet_naming_style.pascal_case.capitalization = pascal_case -dotnet_naming_style.pascal_case.required_prefix = -dotnet_naming_style.pascal_case.required_suffix = -dotnet_naming_style.pascal_case.word_separator = -dotnet_naming_style.pascal_case.capitalization = pascal_case dotnet_style_explicit_tuple_names = true:suggestion dotnet_style_prefer_inferred_tuple_names = true:suggestion dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion dotnet_style_prefer_compound_assignment = true:warning dotnet_style_prefer_simplified_interpolation = true:suggestion +# Define what we will treat as private fields. +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private + +dotnet_naming_symbols.const_private_fields.applicable_kinds = field +dotnet_naming_symbols.const_private_fields.applicable_accessibilities = private +dotnet_naming_symbols.const_private_fields.required_modifiers = const + +# Define rule that something must begin with an underscore and be in camel case. +dotnet_naming_style.require_underscore_prefix_and_camel_case.required_prefix = _ +dotnet_naming_style.require_underscore_prefix_and_camel_case.capitalization = camel_case + +# Define rule that something must not begin with an underscore and be in pascal case +dotnet_naming_style.require_no_prefix_and_pascal_case.required_prefix = +dotnet_naming_style.require_no_prefix_and_pascal_case.capitalization = pascal_case + +# Appy our rule to private fields. +dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.symbols = private_fields +dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.style = require_underscore_prefix_and_camel_case +dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.severity = warning + +dotnet_naming_rule.const_fields_must_begin_with_no_prefix_and_be_in_pascal_case.symbols = const_private_fields +dotnet_naming_rule.const_fields_must_begin_with_no_prefix_and_be_in_pascal_case.style = require_no_prefix_and_pascal_case +dotnet_naming_rule.const_fields_must_begin_with_no_prefix_and_be_in_pascal_case.severity = warning + # Spelling spelling_exclusion_path = .\exclusion.dic diff --git a/tools/QuietBackgroundProcesses/.gitattributes b/.gitattributes similarity index 100% rename from tools/QuietBackgroundProcesses/.gitattributes rename to .gitattributes diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a0190f1c2f..2ad0d746c6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,3 +10,4 @@ - [ ] Closes #xxx - [ ] Tests added/passed - [ ] Documentation updated +- [ ] Telemetry [compliance tasks](https://aka.ms/devhome-telemetry) completed for added/updated events diff --git a/DevHome.sln b/DevHome.sln index f721edeb0a..7c9dfcd078 100644 --- a/DevHome.sln +++ b/DevHome.sln @@ -146,13 +146,28 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevHome.EnvironmentVariable EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevHome.Telemetry.Native", "telemetry\DevHome.Telemetry.Native\DevHome.Telemetry.Native.vcxproj", "{8EB52F7D-D216-49FF-BF16-DE06E4695950}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{E0A15760-487A-4CCB-8093-DE6FF3C4BC23}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevHome.Services.WindowsPackageManager", "services\DevHome.Services.WindowsPackageManager\DevHome.Services.WindowsPackageManager.csproj", "{DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevHome.Services.Core", "services\DevHome.Services.Core\DevHome.Services.Core.csproj", "{8FB1EF90-B693-4A2A-A7F2-44ECA499D769}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{E768781A-D1F7-4C03-B46D-E76354FAB587}" ProjectSection(SolutionItems) = preProject tools\scripts\CaptureDevHomeLogs.ps1 = tools\scripts\CaptureDevHomeLogs.ps1 EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevHome.Services.DesiredStateConfiguration", "services\DevHome.Services.DesiredStateConfiguration\DevHome.Services.DesiredStateConfiguration.csproj", "{D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WSLExtension", "WSLExtension", "{73D1E84F-56CC-412B-BF2B-FA692BF6B396}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WSLExtension", "extensions\WSLExtension\WSLExtension.csproj", "{B6153EEA-EADE-4BAA-B47D-6B48205C6696}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_FailFast|arm64 = Debug_FailFast|arm64 + Debug_FailFast|x64 = Debug_FailFast|x64 + Debug_FailFast|x86 = Debug_FailFast|x86 Debug|arm64 = Debug|arm64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 @@ -161,6 +176,15 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug_FailFast|arm64.Deploy.0 = Debug_FailFast|arm64 + {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug_FailFast|x64.Deploy.0 = Debug_FailFast|x64 + {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 + {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug_FailFast|x86.Deploy.0 = Debug_FailFast|x86 {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug|arm64.ActiveCfg = Debug|arm64 {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug|arm64.Build.0 = Debug|arm64 {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug|arm64.Deploy.0 = Debug|arm64 @@ -179,6 +203,12 @@ Global {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Release|x86.ActiveCfg = Release|x86 {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Release|x86.Build.0 = Release|x86 {60E0FD98-5396-436D-BAB7-187A853A5DC6}.Release|x86.Deploy.0 = Release|x86 + {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Debug|arm64.ActiveCfg = Debug|arm64 {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Debug|arm64.Build.0 = Debug|arm64 {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Debug|x64.ActiveCfg = Debug|x64 @@ -191,6 +221,12 @@ Global {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Release|x64.Build.0 = Release|x64 {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Release|x86.ActiveCfg = Release|x86 {8BE0016E-5BBD-459E-A382-B1CE56E7CA5D}.Release|x86.Build.0 = Release|x86 + {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Debug|arm64.ActiveCfg = Debug|arm64 {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Debug|arm64.Build.0 = Debug|arm64 {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Debug|x64.ActiveCfg = Debug|x64 @@ -203,6 +239,12 @@ Global {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Release|x64.Build.0 = Release|x64 {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Release|x86.ActiveCfg = Release|x86 {3B409BF0-59D5-4AA3-8927-8E11476E6CEB}.Release|x86.Build.0 = Release|x86 + {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Debug|arm64.ActiveCfg = Debug|arm64 {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Debug|arm64.Build.0 = Debug|arm64 {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Debug|x64.ActiveCfg = Debug|x64 @@ -215,6 +257,12 @@ Global {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Release|x64.Build.0 = Release|x64 {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Release|x86.ActiveCfg = Release|x86 {E9F49E1C-C15D-4B87-92CA-9003C1C31DB5}.Release|x86.Build.0 = Release|x86 + {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Debug|arm64.ActiveCfg = Debug|arm64 {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Debug|arm64.Build.0 = Debug|arm64 {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Debug|x64.ActiveCfg = Debug|x64 @@ -227,6 +275,12 @@ Global {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Release|x64.Build.0 = Release|x64 {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Release|x86.ActiveCfg = Release|x86 {CD512D91-FDA6-4908-89D5-4106F090A7BE}.Release|x86.Build.0 = Release|x86 + {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Debug|arm64.ActiveCfg = Debug|arm64 {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Debug|arm64.Build.0 = Debug|arm64 {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Debug|x64.ActiveCfg = Debug|x64 @@ -239,6 +293,12 @@ Global {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Release|x64.Build.0 = Release|x64 {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Release|x86.ActiveCfg = Release|x86 {C45241F7-8B4A-44F2-A78B-AFB6288F55B9}.Release|x86.Build.0 = Release|x86 + {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Debug|arm64.ActiveCfg = Debug|arm64 {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Debug|arm64.Build.0 = Debug|arm64 {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Debug|x64.ActiveCfg = Debug|x64 @@ -251,6 +311,12 @@ Global {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Release|x64.Build.0 = Release|x64 {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Release|x86.ActiveCfg = Release|x86 {0901B260-1B88-4B99-A9F8-477ED0A74FBD}.Release|x86.Build.0 = Release|x86 + {9A62BDDC-F33E-4EBE-B407-533263A92511}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {9A62BDDC-F33E-4EBE-B407-533263A92511}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {9A62BDDC-F33E-4EBE-B407-533263A92511}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {9A62BDDC-F33E-4EBE-B407-533263A92511}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {9A62BDDC-F33E-4EBE-B407-533263A92511}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {9A62BDDC-F33E-4EBE-B407-533263A92511}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {9A62BDDC-F33E-4EBE-B407-533263A92511}.Debug|arm64.ActiveCfg = Debug|arm64 {9A62BDDC-F33E-4EBE-B407-533263A92511}.Debug|arm64.Build.0 = Debug|arm64 {9A62BDDC-F33E-4EBE-B407-533263A92511}.Debug|x64.ActiveCfg = Debug|x64 @@ -263,6 +329,12 @@ Global {9A62BDDC-F33E-4EBE-B407-533263A92511}.Release|x64.Build.0 = Release|x64 {9A62BDDC-F33E-4EBE-B407-533263A92511}.Release|x86.ActiveCfg = Release|x86 {9A62BDDC-F33E-4EBE-B407-533263A92511}.Release|x86.Build.0 = Release|x86 + {F65759A2-AF44-4211-9817-76E6D02F37D0}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {F65759A2-AF44-4211-9817-76E6D02F37D0}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {F65759A2-AF44-4211-9817-76E6D02F37D0}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {F65759A2-AF44-4211-9817-76E6D02F37D0}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {F65759A2-AF44-4211-9817-76E6D02F37D0}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {F65759A2-AF44-4211-9817-76E6D02F37D0}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {F65759A2-AF44-4211-9817-76E6D02F37D0}.Debug|arm64.ActiveCfg = Debug|arm64 {F65759A2-AF44-4211-9817-76E6D02F37D0}.Debug|arm64.Build.0 = Debug|arm64 {F65759A2-AF44-4211-9817-76E6D02F37D0}.Debug|x64.ActiveCfg = Debug|x64 @@ -275,6 +347,12 @@ Global {F65759A2-AF44-4211-9817-76E6D02F37D0}.Release|x64.Build.0 = Release|x64 {F65759A2-AF44-4211-9817-76E6D02F37D0}.Release|x86.ActiveCfg = Release|x86 {F65759A2-AF44-4211-9817-76E6D02F37D0}.Release|x86.Build.0 = Release|x86 + {54082587-A435-423F-AE1B-01B906FFA7C5}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {54082587-A435-423F-AE1B-01B906FFA7C5}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {54082587-A435-423F-AE1B-01B906FFA7C5}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {54082587-A435-423F-AE1B-01B906FFA7C5}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {54082587-A435-423F-AE1B-01B906FFA7C5}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {54082587-A435-423F-AE1B-01B906FFA7C5}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {54082587-A435-423F-AE1B-01B906FFA7C5}.Debug|arm64.ActiveCfg = Debug|arm64 {54082587-A435-423F-AE1B-01B906FFA7C5}.Debug|arm64.Build.0 = Debug|arm64 {54082587-A435-423F-AE1B-01B906FFA7C5}.Debug|x64.ActiveCfg = Debug|x64 @@ -287,6 +365,12 @@ Global {54082587-A435-423F-AE1B-01B906FFA7C5}.Release|x64.Build.0 = Release|x64 {54082587-A435-423F-AE1B-01B906FFA7C5}.Release|x86.ActiveCfg = Release|x86 {54082587-A435-423F-AE1B-01B906FFA7C5}.Release|x86.Build.0 = Release|x86 + {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Debug|arm64.ActiveCfg = Debug|arm64 {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Debug|arm64.Build.0 = Debug|arm64 {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Debug|x64.ActiveCfg = Debug|x64 @@ -299,6 +383,12 @@ Global {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Release|x64.Build.0 = Release|x64 {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Release|x86.ActiveCfg = Release|x86 {D2303635-3DD9-4DCA-A38A-F5306D0BB8FE}.Release|x86.Build.0 = Release|x86 + {6254ADB1-B6FD-4D74-AF13-40C997919178}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {6254ADB1-B6FD-4D74-AF13-40C997919178}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {6254ADB1-B6FD-4D74-AF13-40C997919178}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {6254ADB1-B6FD-4D74-AF13-40C997919178}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {6254ADB1-B6FD-4D74-AF13-40C997919178}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {6254ADB1-B6FD-4D74-AF13-40C997919178}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {6254ADB1-B6FD-4D74-AF13-40C997919178}.Debug|arm64.ActiveCfg = Debug|arm64 {6254ADB1-B6FD-4D74-AF13-40C997919178}.Debug|arm64.Build.0 = Debug|arm64 {6254ADB1-B6FD-4D74-AF13-40C997919178}.Debug|x64.ActiveCfg = Debug|x64 @@ -311,6 +401,12 @@ Global {6254ADB1-B6FD-4D74-AF13-40C997919178}.Release|x64.Build.0 = Release|x64 {6254ADB1-B6FD-4D74-AF13-40C997919178}.Release|x86.ActiveCfg = Release|x86 {6254ADB1-B6FD-4D74-AF13-40C997919178}.Release|x86.Build.0 = Release|x86 + {72CE876A-7272-4460-92EB-845A45B743FB}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {72CE876A-7272-4460-92EB-845A45B743FB}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {72CE876A-7272-4460-92EB-845A45B743FB}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {72CE876A-7272-4460-92EB-845A45B743FB}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {72CE876A-7272-4460-92EB-845A45B743FB}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {72CE876A-7272-4460-92EB-845A45B743FB}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {72CE876A-7272-4460-92EB-845A45B743FB}.Debug|arm64.ActiveCfg = Debug|arm64 {72CE876A-7272-4460-92EB-845A45B743FB}.Debug|arm64.Build.0 = Debug|arm64 {72CE876A-7272-4460-92EB-845A45B743FB}.Debug|x64.ActiveCfg = Debug|x64 @@ -323,6 +419,12 @@ Global {72CE876A-7272-4460-92EB-845A45B743FB}.Release|x64.Build.0 = Release|x64 {72CE876A-7272-4460-92EB-845A45B743FB}.Release|x86.ActiveCfg = Release|x86 {72CE876A-7272-4460-92EB-845A45B743FB}.Release|x86.Build.0 = Release|x86 + {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Debug|arm64.ActiveCfg = Debug|ARM64 {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Debug|arm64.Build.0 = Debug|ARM64 {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Debug|x64.ActiveCfg = Debug|x64 @@ -335,6 +437,12 @@ Global {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Release|x64.Build.0 = Release|x64 {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Release|x86.ActiveCfg = Release|x86 {940FD524-1AC0-4BBA-BBBE-1E4F2E797508}.Release|x86.Build.0 = Release|x86 + {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Debug|arm64.ActiveCfg = Debug|ARM64 {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Debug|arm64.Build.0 = Debug|ARM64 {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Debug|x64.ActiveCfg = Debug|x64 @@ -347,6 +455,12 @@ Global {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Release|x64.Build.0 = Release|x64 {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Release|x86.ActiveCfg = Release|x86 {A7E5FD7B-B41A-4CAE-A45A-E686DFA8ACF1}.Release|x86.Build.0 = Release|x86 + {053AF75C-5CD8-497F-BA25-47435BD86047}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {053AF75C-5CD8-497F-BA25-47435BD86047}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {053AF75C-5CD8-497F-BA25-47435BD86047}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {053AF75C-5CD8-497F-BA25-47435BD86047}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {053AF75C-5CD8-497F-BA25-47435BD86047}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {053AF75C-5CD8-497F-BA25-47435BD86047}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {053AF75C-5CD8-497F-BA25-47435BD86047}.Debug|arm64.ActiveCfg = Debug|ARM64 {053AF75C-5CD8-497F-BA25-47435BD86047}.Debug|arm64.Build.0 = Debug|ARM64 {053AF75C-5CD8-497F-BA25-47435BD86047}.Debug|x64.ActiveCfg = Debug|x64 @@ -359,6 +473,12 @@ Global {053AF75C-5CD8-497F-BA25-47435BD86047}.Release|x64.Build.0 = Release|x64 {053AF75C-5CD8-497F-BA25-47435BD86047}.Release|x86.ActiveCfg = Release|x86 {053AF75C-5CD8-497F-BA25-47435BD86047}.Release|x86.Build.0 = Release|x86 + {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Debug|arm64.ActiveCfg = Debug|ARM64 {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Debug|arm64.Build.0 = Debug|ARM64 {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Debug|x64.ActiveCfg = Debug|x64 @@ -371,6 +491,12 @@ Global {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Release|x64.Build.0 = Release|x64 {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Release|x86.ActiveCfg = Release|x86 {0D879E08-99AA-4019-9D04-DEA9F7C7BFC1}.Release|x86.Build.0 = Release|x86 + {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Debug|arm64.ActiveCfg = Debug|arm64 {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Debug|arm64.Build.0 = Debug|arm64 {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Debug|x64.ActiveCfg = Debug|x64 @@ -383,6 +509,12 @@ Global {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Release|x64.Build.0 = Release|x64 {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Release|x86.ActiveCfg = Release|x86 {69F8B7DF-F52B-4B74-9A16-AB3241BB8912}.Release|x86.Build.0 = Release|x86 + {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Debug|arm64.ActiveCfg = Debug|arm64 {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Debug|arm64.Build.0 = Debug|arm64 {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Debug|x64.ActiveCfg = Debug|x64 @@ -395,6 +527,12 @@ Global {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Release|x64.Build.0 = Release|x64 {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Release|x86.ActiveCfg = Release|x86 {2F9AD5AF-EF3B-496A-8566-9E9539E3DF43}.Release|x86.Build.0 = Release|x86 + {75945141-03AC-4C40-A586-16D463A0AC1B}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|ARM + {75945141-03AC-4C40-A586-16D463A0AC1B}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|ARM + {75945141-03AC-4C40-A586-16D463A0AC1B}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {75945141-03AC-4C40-A586-16D463A0AC1B}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {75945141-03AC-4C40-A586-16D463A0AC1B}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|Win32 + {75945141-03AC-4C40-A586-16D463A0AC1B}.Debug_FailFast|x86.Build.0 = Debug_FailFast|Win32 {75945141-03AC-4C40-A586-16D463A0AC1B}.Debug|arm64.ActiveCfg = Debug|ARM64 {75945141-03AC-4C40-A586-16D463A0AC1B}.Debug|arm64.Build.0 = Debug|ARM64 {75945141-03AC-4C40-A586-16D463A0AC1B}.Debug|x64.ActiveCfg = Debug|x64 @@ -407,6 +545,12 @@ Global {75945141-03AC-4C40-A586-16D463A0AC1B}.Release|x64.Build.0 = Release|x64 {75945141-03AC-4C40-A586-16D463A0AC1B}.Release|x86.ActiveCfg = Release|Win32 {75945141-03AC-4C40-A586-16D463A0AC1B}.Release|x86.Build.0 = Release|Win32 + {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Debug|arm64.ActiveCfg = Debug|ARM64 {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Debug|arm64.Build.0 = Debug|ARM64 {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Debug|x64.ActiveCfg = Debug|x64 @@ -419,6 +563,12 @@ Global {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Release|x64.Build.0 = Release|x64 {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Release|x86.ActiveCfg = Release|x86 {092AC740-DA01-4872-8E93-B9557DAD6BE5}.Release|x86.Build.0 = Release|x86 + {80805B43-CE75-4C6E-92F8-F385C1039E53}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|ARM + {80805B43-CE75-4C6E-92F8-F385C1039E53}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|ARM + {80805B43-CE75-4C6E-92F8-F385C1039E53}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {80805B43-CE75-4C6E-92F8-F385C1039E53}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {80805B43-CE75-4C6E-92F8-F385C1039E53}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|Win32 + {80805B43-CE75-4C6E-92F8-F385C1039E53}.Debug_FailFast|x86.Build.0 = Debug_FailFast|Win32 {80805B43-CE75-4C6E-92F8-F385C1039E53}.Debug|arm64.ActiveCfg = Debug|ARM64 {80805B43-CE75-4C6E-92F8-F385C1039E53}.Debug|arm64.Build.0 = Debug|ARM64 {80805B43-CE75-4C6E-92F8-F385C1039E53}.Debug|x64.ActiveCfg = Debug|x64 @@ -431,6 +581,12 @@ Global {80805B43-CE75-4C6E-92F8-F385C1039E53}.Release|x64.Build.0 = Release|x64 {80805B43-CE75-4C6E-92F8-F385C1039E53}.Release|x86.ActiveCfg = Release|Win32 {80805B43-CE75-4C6E-92F8-F385C1039E53}.Release|x86.Build.0 = Release|Win32 + {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|ARM + {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|ARM + {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|Win32 + {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Debug_FailFast|x86.Build.0 = Debug_FailFast|Win32 {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Debug|arm64.ActiveCfg = Debug|ARM64 {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Debug|arm64.Build.0 = Debug|ARM64 {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Debug|x64.ActiveCfg = Debug|x64 @@ -443,6 +599,12 @@ Global {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Release|x64.Build.0 = Release|x64 {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Release|x86.ActiveCfg = Release|Win32 {4B370E2F-FB1D-4887-90BF-3B72517485CE}.Release|x86.Build.0 = Release|Win32 + {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Debug|arm64.ActiveCfg = Debug|arm64 {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Debug|arm64.Build.0 = Debug|arm64 {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Debug|x64.ActiveCfg = Debug|x64 @@ -455,6 +617,12 @@ Global {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Release|x64.Build.0 = Release|x64 {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Release|x86.ActiveCfg = Release|x86 {1477F3EA-A9F6-4B4F-82F4-C2427F57EBEE}.Release|x86.Build.0 = Release|x86 + {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|ARM64 + {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|ARM64 + {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|Win32 + {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Debug_FailFast|x86.Build.0 = Debug_FailFast|Win32 {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Debug|arm64.ActiveCfg = Debug|ARM64 {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Debug|arm64.Build.0 = Debug|ARM64 {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Debug|x64.ActiveCfg = Debug|x64 @@ -467,6 +635,12 @@ Global {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Release|x64.Build.0 = Release|x64 {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Release|x86.ActiveCfg = Release|Win32 {AF5A7FA0-E3E8-44C8-8830-31DD08F583E8}.Release|x86.Build.0 = Release|Win32 + {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Debug|arm64.ActiveCfg = Debug|ARM64 {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Debug|arm64.Build.0 = Debug|ARM64 {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Debug|x64.ActiveCfg = Debug|x64 @@ -479,6 +653,12 @@ Global {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Release|x64.Build.0 = Release|x64 {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Release|x86.ActiveCfg = Release|x86 {CFD8A90D-8B6D-4ED6-BA35-FF894BEB46C0}.Release|x86.Build.0 = Release|x86 + {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Debug|arm64.ActiveCfg = Debug|ARM64 {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Debug|arm64.Build.0 = Debug|ARM64 {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Debug|x64.ActiveCfg = Debug|x64 @@ -491,6 +671,12 @@ Global {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Release|x64.Build.0 = Release|x64 {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Release|x86.ActiveCfg = Release|x86 {0689521A-1686-46DB-81E1-3B84AA0EF1AC}.Release|x86.Build.0 = Release|x86 + {A716481F-C1AF-4243-84F9-7B9399055E51}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {A716481F-C1AF-4243-84F9-7B9399055E51}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {A716481F-C1AF-4243-84F9-7B9399055E51}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {A716481F-C1AF-4243-84F9-7B9399055E51}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {A716481F-C1AF-4243-84F9-7B9399055E51}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {A716481F-C1AF-4243-84F9-7B9399055E51}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {A716481F-C1AF-4243-84F9-7B9399055E51}.Debug|arm64.ActiveCfg = Debug|arm64 {A716481F-C1AF-4243-84F9-7B9399055E51}.Debug|arm64.Build.0 = Debug|arm64 {A716481F-C1AF-4243-84F9-7B9399055E51}.Debug|x64.ActiveCfg = Debug|x64 @@ -503,6 +689,12 @@ Global {A716481F-C1AF-4243-84F9-7B9399055E51}.Release|x64.Build.0 = Release|x64 {A716481F-C1AF-4243-84F9-7B9399055E51}.Release|x86.ActiveCfg = Release|x86 {A716481F-C1AF-4243-84F9-7B9399055E51}.Release|x86.Build.0 = Release|x86 + {75976510-22B7-4910-96F2-3E1519C3FF35}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|ARM64 + {75976510-22B7-4910-96F2-3E1519C3FF35}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|ARM64 + {75976510-22B7-4910-96F2-3E1519C3FF35}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {75976510-22B7-4910-96F2-3E1519C3FF35}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {75976510-22B7-4910-96F2-3E1519C3FF35}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {75976510-22B7-4910-96F2-3E1519C3FF35}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {75976510-22B7-4910-96F2-3E1519C3FF35}.Debug|arm64.ActiveCfg = Debug|ARM64 {75976510-22B7-4910-96F2-3E1519C3FF35}.Debug|arm64.Build.0 = Debug|ARM64 {75976510-22B7-4910-96F2-3E1519C3FF35}.Debug|x64.ActiveCfg = Debug|x64 @@ -515,6 +707,12 @@ Global {75976510-22B7-4910-96F2-3E1519C3FF35}.Release|x64.Build.0 = Release|x64 {75976510-22B7-4910-96F2-3E1519C3FF35}.Release|x86.ActiveCfg = Release|x86 {75976510-22B7-4910-96F2-3E1519C3FF35}.Release|x86.Build.0 = Release|x86 + {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Debug|arm64.ActiveCfg = Debug|arm64 {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Debug|arm64.Build.0 = Debug|arm64 {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Debug|x64.ActiveCfg = Debug|x64 @@ -527,6 +725,12 @@ Global {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Release|x64.Build.0 = Release|x64 {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Release|x86.ActiveCfg = Release|x86 {D92BC45D-6D1B-4DE3-9303-4B3ED1971192}.Release|x86.Build.0 = Release|x86 + {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Debug|arm64.ActiveCfg = Debug|arm64 {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Debug|arm64.Build.0 = Debug|arm64 {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Debug|x64.ActiveCfg = Debug|x64 @@ -539,6 +743,12 @@ Global {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Release|x64.Build.0 = Release|x64 {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Release|x86.ActiveCfg = Release|x86 {D8256951-EB23-45AA-8A0B-4573DF8E26F2}.Release|x86.Build.0 = Release|x86 + {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Debug|arm64.ActiveCfg = Debug|arm64 {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Debug|arm64.Build.0 = Debug|arm64 {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Debug|x64.ActiveCfg = Debug|x64 @@ -551,6 +761,12 @@ Global {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Release|x64.Build.0 = Release|x64 {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Release|x86.ActiveCfg = Release|x86 {2C7522A3-DCE2-4ED0-889A-AD10F241EDF4}.Release|x86.Build.0 = Release|x86 + {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|ARM64 + {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|ARM64 + {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|Win32 + {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Debug_FailFast|x86.Build.0 = Debug_FailFast|Win32 {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Debug|arm64.ActiveCfg = Debug|ARM64 {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Debug|arm64.Build.0 = Debug|ARM64 {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Debug|x64.ActiveCfg = Debug|x64 @@ -563,6 +779,12 @@ Global {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Release|x64.Build.0 = Release|x64 {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Release|x86.ActiveCfg = Release|Win32 {D6B0C16D-858A-4C1B-99CF-D6F4CF5BCD5F}.Release|x86.Build.0 = Release|Win32 + {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Debug|arm64.ActiveCfg = Debug|arm64 {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Debug|arm64.Build.0 = Debug|arm64 {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Debug|x64.ActiveCfg = Debug|x64 @@ -575,6 +797,12 @@ Global {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Release|x64.Build.0 = Release|x64 {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Release|x86.ActiveCfg = Release|x86 {AC872D0F-2F11-48C4-949C-2464EA1AC66F}.Release|x86.Build.0 = Release|x86 + {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Debug|arm64.ActiveCfg = Debug|arm64 {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Debug|arm64.Build.0 = Debug|arm64 {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Debug|x64.ActiveCfg = Debug|x64 @@ -587,6 +815,12 @@ Global {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Release|x64.Build.0 = Release|x64 {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Release|x86.ActiveCfg = Release|x86 {F9121D0A-BB3A-4010-A982-CD8B77F47AA2}.Release|x86.Build.0 = Release|x86 + {F4095FD3-6A3F-490B-966D-E63059612EE6}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {F4095FD3-6A3F-490B-966D-E63059612EE6}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {F4095FD3-6A3F-490B-966D-E63059612EE6}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {F4095FD3-6A3F-490B-966D-E63059612EE6}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {F4095FD3-6A3F-490B-966D-E63059612EE6}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {F4095FD3-6A3F-490B-966D-E63059612EE6}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {F4095FD3-6A3F-490B-966D-E63059612EE6}.Debug|arm64.ActiveCfg = Debug|ARM64 {F4095FD3-6A3F-490B-966D-E63059612EE6}.Debug|arm64.Build.0 = Debug|ARM64 {F4095FD3-6A3F-490B-966D-E63059612EE6}.Debug|x64.ActiveCfg = Debug|x64 @@ -599,6 +833,12 @@ Global {F4095FD3-6A3F-490B-966D-E63059612EE6}.Release|x64.Build.0 = Release|x64 {F4095FD3-6A3F-490B-966D-E63059612EE6}.Release|x86.ActiveCfg = Release|x86 {F4095FD3-6A3F-490B-966D-E63059612EE6}.Release|x86.Build.0 = Release|x86 + {0E05A442-BDC7-43D4-A000-F8C986826716}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {0E05A442-BDC7-43D4-A000-F8C986826716}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {0E05A442-BDC7-43D4-A000-F8C986826716}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {0E05A442-BDC7-43D4-A000-F8C986826716}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {0E05A442-BDC7-43D4-A000-F8C986826716}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {0E05A442-BDC7-43D4-A000-F8C986826716}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {0E05A442-BDC7-43D4-A000-F8C986826716}.Debug|arm64.ActiveCfg = Debug|ARM64 {0E05A442-BDC7-43D4-A000-F8C986826716}.Debug|arm64.Build.0 = Debug|ARM64 {0E05A442-BDC7-43D4-A000-F8C986826716}.Debug|x64.ActiveCfg = Debug|x64 @@ -611,6 +851,12 @@ Global {0E05A442-BDC7-43D4-A000-F8C986826716}.Release|x64.Build.0 = Release|x64 {0E05A442-BDC7-43D4-A000-F8C986826716}.Release|x86.ActiveCfg = Release|x86 {0E05A442-BDC7-43D4-A000-F8C986826716}.Release|x86.Build.0 = Release|x86 + {D759CD66-494C-4A00-8075-8B65A9891349}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {D759CD66-494C-4A00-8075-8B65A9891349}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {D759CD66-494C-4A00-8075-8B65A9891349}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {D759CD66-494C-4A00-8075-8B65A9891349}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {D759CD66-494C-4A00-8075-8B65A9891349}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {D759CD66-494C-4A00-8075-8B65A9891349}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {D759CD66-494C-4A00-8075-8B65A9891349}.Debug|arm64.ActiveCfg = Debug|arm64 {D759CD66-494C-4A00-8075-8B65A9891349}.Debug|arm64.Build.0 = Debug|arm64 {D759CD66-494C-4A00-8075-8B65A9891349}.Debug|x64.ActiveCfg = Debug|x64 @@ -623,6 +869,12 @@ Global {D759CD66-494C-4A00-8075-8B65A9891349}.Release|x64.Build.0 = Release|x64 {D759CD66-494C-4A00-8075-8B65A9891349}.Release|x86.ActiveCfg = Release|x86 {D759CD66-494C-4A00-8075-8B65A9891349}.Release|x86.Build.0 = Release|x86 + {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|ARM64 + {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|ARM64 + {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Debug|arm64.ActiveCfg = Debug|ARM64 {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Debug|arm64.Build.0 = Debug|ARM64 {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Debug|x64.ActiveCfg = Debug|x64 @@ -635,6 +887,12 @@ Global {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Release|x64.Build.0 = Release|x64 {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Release|x86.ActiveCfg = Release|x86 {CAAC0CDF-9AB8-4F43-A3EB-38D785AF5725}.Release|x86.Build.0 = Release|x86 + {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Debug|arm64.ActiveCfg = Debug|arm64 {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Debug|arm64.Build.0 = Debug|arm64 {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Debug|x64.ActiveCfg = Debug|x64 @@ -647,6 +905,12 @@ Global {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Release|x64.Build.0 = Release|x64 {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Release|x86.ActiveCfg = Release|x86 {AF527EA4-6A24-4BD6-BC6E-A5863DC3489C}.Release|x86.Build.0 = Release|x86 + {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Debug|arm64.ActiveCfg = Debug|arm64 {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Debug|arm64.Build.0 = Debug|arm64 {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Debug|x64.ActiveCfg = Debug|x64 @@ -659,6 +923,12 @@ Global {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Release|x64.Build.0 = Release|x64 {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Release|x86.ActiveCfg = Release|x86 {19C08C57-7C22-48C9-9B6C-FAAF1FCC65E7}.Release|x86.Build.0 = Release|x86 + {1317314E-9BDD-4F1C-A76F-22121637A091}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {1317314E-9BDD-4F1C-A76F-22121637A091}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {1317314E-9BDD-4F1C-A76F-22121637A091}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {1317314E-9BDD-4F1C-A76F-22121637A091}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {1317314E-9BDD-4F1C-A76F-22121637A091}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {1317314E-9BDD-4F1C-A76F-22121637A091}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {1317314E-9BDD-4F1C-A76F-22121637A091}.Debug|arm64.ActiveCfg = Debug|ARM64 {1317314E-9BDD-4F1C-A76F-22121637A091}.Debug|arm64.Build.0 = Debug|ARM64 {1317314E-9BDD-4F1C-A76F-22121637A091}.Debug|arm64.Deploy.0 = Debug|ARM64 @@ -677,6 +947,12 @@ Global {1317314E-9BDD-4F1C-A76F-22121637A091}.Release|x86.ActiveCfg = Release|x86 {1317314E-9BDD-4F1C-A76F-22121637A091}.Release|x86.Build.0 = Release|x86 {1317314E-9BDD-4F1C-A76F-22121637A091}.Release|x86.Deploy.0 = Release|x86 + {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Debug|arm64.ActiveCfg = Debug|ARM64 {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Debug|arm64.Build.0 = Debug|ARM64 {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Debug|arm64.Deploy.0 = Debug|ARM64 @@ -695,6 +971,12 @@ Global {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Release|x86.ActiveCfg = Release|x86 {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Release|x86.Build.0 = Release|x86 {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9}.Release|x86.Deploy.0 = Release|x86 + {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|arm64 + {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|arm64 + {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|x86 + {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Debug_FailFast|x86.Build.0 = Debug_FailFast|x86 {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Debug|arm64.ActiveCfg = Debug|arm64 {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Debug|arm64.Build.0 = Debug|arm64 {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Debug|x64.ActiveCfg = Debug|x64 @@ -707,6 +989,12 @@ Global {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Release|x64.Build.0 = Release|x64 {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Release|x86.ActiveCfg = Release|x86 {5F9749BC-F34E-4F45-933F-61E0F3ED521F}.Release|x86.Build.0 = Release|x86 + {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Debug_FailFast|arm64.ActiveCfg = Debug_FailFast|x64 + {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Debug_FailFast|arm64.Build.0 = Debug_FailFast|x64 + {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Debug_FailFast|x64.ActiveCfg = Debug_FailFast|x64 + {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Debug_FailFast|x64.Build.0 = Debug_FailFast|x64 + {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Debug_FailFast|x86.ActiveCfg = Debug_FailFast|Win32 + {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Debug_FailFast|x86.Build.0 = Debug_FailFast|Win32 {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Debug|arm64.ActiveCfg = Debug|x64 {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Debug|arm64.Build.0 = Debug|x64 {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Debug|x64.ActiveCfg = Debug|x64 @@ -719,6 +1007,78 @@ Global {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Release|x64.Build.0 = Release|x64 {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Release|x86.ActiveCfg = Release|Win32 {8EB52F7D-D216-49FF-BF16-DE06E4695950}.Release|x86.Build.0 = Release|Win32 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug_FailFast|arm64.ActiveCfg = Debug|ARM64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug_FailFast|arm64.Build.0 = Debug|ARM64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug_FailFast|x64.ActiveCfg = Debug|x64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug_FailFast|x64.Build.0 = Debug|x64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug_FailFast|x86.ActiveCfg = Debug|x86 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug_FailFast|x86.Build.0 = Debug|x86 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug|arm64.ActiveCfg = Debug|ARM64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug|arm64.Build.0 = Debug|ARM64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug|x64.ActiveCfg = Debug|x64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug|x64.Build.0 = Debug|x64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug|x86.ActiveCfg = Debug|x86 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Debug|x86.Build.0 = Debug|x86 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Release|arm64.ActiveCfg = Release|ARM64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Release|arm64.Build.0 = Release|ARM64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Release|x64.ActiveCfg = Release|x64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Release|x64.Build.0 = Release|x64 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Release|x86.ActiveCfg = Release|x86 + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C}.Release|x86.Build.0 = Release|x86 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug_FailFast|arm64.ActiveCfg = Debug|ARM64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug_FailFast|arm64.Build.0 = Debug|ARM64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug_FailFast|x64.ActiveCfg = Debug|x64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug_FailFast|x64.Build.0 = Debug|x64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug_FailFast|x86.ActiveCfg = Debug|x86 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug_FailFast|x86.Build.0 = Debug|x86 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug|arm64.ActiveCfg = Debug|ARM64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug|arm64.Build.0 = Debug|ARM64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug|x64.ActiveCfg = Debug|x64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug|x64.Build.0 = Debug|x64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug|x86.ActiveCfg = Debug|x86 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Debug|x86.Build.0 = Debug|x86 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Release|arm64.ActiveCfg = Release|ARM64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Release|arm64.Build.0 = Release|ARM64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Release|x64.ActiveCfg = Release|x64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Release|x64.Build.0 = Release|x64 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Release|x86.ActiveCfg = Release|x86 + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769}.Release|x86.Build.0 = Release|x86 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug_FailFast|arm64.ActiveCfg = Debug|ARM64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug_FailFast|arm64.Build.0 = Debug|ARM64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug_FailFast|x64.ActiveCfg = Debug|x64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug_FailFast|x64.Build.0 = Debug|x64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug_FailFast|x86.ActiveCfg = Debug|x86 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug_FailFast|x86.Build.0 = Debug|x86 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug|arm64.ActiveCfg = Debug|ARM64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug|arm64.Build.0 = Debug|ARM64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug|x64.ActiveCfg = Debug|x64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug|x64.Build.0 = Debug|x64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug|x86.ActiveCfg = Debug|x86 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Debug|x86.Build.0 = Debug|x86 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Release|arm64.ActiveCfg = Release|ARM64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Release|arm64.Build.0 = Release|ARM64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Release|x64.ActiveCfg = Release|x64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Release|x64.Build.0 = Release|x64 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Release|x86.ActiveCfg = Release|x86 + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F}.Release|x86.Build.0 = Release|x86 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug_FailFast|arm64.ActiveCfg = Debug|ARM64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug_FailFast|arm64.Build.0 = Debug|ARM64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug_FailFast|x64.ActiveCfg = Debug|x64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug_FailFast|x64.Build.0 = Debug|x64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug_FailFast|x86.ActiveCfg = Debug|x86 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug_FailFast|x86.Build.0 = Debug|x86 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug|arm64.ActiveCfg = Debug|ARM64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug|arm64.Build.0 = Debug|ARM64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug|x64.ActiveCfg = Debug|x64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug|x64.Build.0 = Debug|x64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug|x86.ActiveCfg = Debug|x86 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Debug|x86.Build.0 = Debug|x86 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Release|arm64.ActiveCfg = Release|ARM64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Release|arm64.Build.0 = Release|ARM64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Release|x64.ActiveCfg = Release|x64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Release|x64.Build.0 = Release|x64 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Release|x86.ActiveCfg = Release|x86 + {B6153EEA-EADE-4BAA-B47D-6B48205C6696}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -775,7 +1135,12 @@ Global {1317314E-9BDD-4F1C-A76F-22121637A091} = {FAB6FAA7-ADF4-4B65-9831-0C819915E6E1} {2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9} = {FAB6FAA7-ADF4-4B65-9831-0C819915E6E1} {5F9749BC-F34E-4F45-933F-61E0F3ED521F} = {FAB6FAA7-ADF4-4B65-9831-0C819915E6E1} + {DA5C4FC8-18AF-4446-807F-A2FFFE4DCF6C} = {E0A15760-487A-4CCB-8093-DE6FF3C4BC23} + {8FB1EF90-B693-4A2A-A7F2-44ECA499D769} = {E0A15760-487A-4CCB-8093-DE6FF3C4BC23} {E768781A-D1F7-4C03-B46D-E76354FAB587} = {A972EC5B-FC61-4964-A6FF-F9633EB75DFD} + {D7A1C2CE-36B1-43A8-9BA6-1EE2CF24479F} = {E0A15760-487A-4CCB-8093-DE6FF3C4BC23} + {73D1E84F-56CC-412B-BF2B-FA692BF6B396} = {DCAF188B-60C3-4EDB-8049-BAA927FBCD7D} + {B6153EEA-EADE-4BAA-B47D-6B48205C6696} = {73D1E84F-56CC-412B-BF2B-FA692BF6B396} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {030B5641-B206-46BB-BF71-36FF009088FA} diff --git a/Directory.Build.props b/Directory.Build.props index 4f951f1b9f..70daf3ff7f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -40,4 +40,8 @@ + + False + + \ No newline at end of file diff --git a/TestingScenarios.md b/TestingScenarios.md index c99bcbc31d..e4e4724ac9 100644 --- a/TestingScenarios.md +++ b/TestingScenarios.md @@ -13,3 +13,4 @@ These are the testing scenarios that need to be validated before shipping a new 1. [Creating Environment](tools/SetupFlow/DevHome.SetupFlow.UnitTest/TestingScenarios/CreateEnvironment.md) 1. [Setting up an Environment](tools/SetupFlow/DevHome.SetupFlow.UnitTest/TestingScenarios/SetupEnvironment.md) 1. [Quickstart Playground](tools/SetupFlow/DevHome.SetupFlow.UnitTest/TestingScenarios/QuickstartPlayground.md) +1. [Utilities](tools/Utilities/UtilitiesTestingScenarios.md) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 66ffde2521..7a27e5f7d8 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -21,8 +21,8 @@ parameters: variables: # MSIXVersion's second part should always be odd to account for stub app's version - MSIXVersion: '0.1501' - VersionOfSDK: '0.600' + MSIXVersion: '0.1601' + VersionOfSDK: '0.700' solution: '**/DevHome.sln' appxPackageDir: 'AppxPackages' testOutputArtifactDir: 'TestResults' @@ -81,7 +81,7 @@ extends: symbolProject: 'DevHome' indexSources: false symbolsArtifactName: 'DevHomeSDK' - symbolsVersion: '$(Build.BuildNumber)' + symbolsVersion: '$(BuildingBranch)$(Build.BuildNumber)' searchPattern: | **/bin/**/*.pdb **/bin/**/*.exe @@ -225,7 +225,7 @@ extends: subscription: $(SymbolSubscription) indexSources: true symbolsArtifactName: 'DevHome_${{ platform }}_${{ configuration }}' - symbolsVersion: $(Build.BuildNumber) + symbolsVersion: '$(BuildingBranch)$(Build.BuildNumber)' searchPattern: >- $(Build.SourcesDirectory)\**\bin\**\*.pdb diff --git a/build/scripts/CreateBuildInfo.ps1 b/build/scripts/CreateBuildInfo.ps1 index 232711ad55..84342e5581 100644 --- a/build/scripts/CreateBuildInfo.ps1 +++ b/build/scripts/CreateBuildInfo.ps1 @@ -6,7 +6,7 @@ Param( ) $Major = "0" -$Minor = "15" +$Minor = "16" $Patch = "99" # default to 99 for local builds $versionSplit = $Version.Split("."); diff --git a/codeAnalysis/GlobalSuppressions.cs b/codeAnalysis/GlobalSuppressions.cs index 19eeee6190..40d58d8500 100644 --- a/codeAnalysis/GlobalSuppressions.cs +++ b/codeAnalysis/GlobalSuppressions.cs @@ -55,3 +55,7 @@ // Code quality [assembly: SuppressMessage("CodeQuality", "IDE0076:Invalid global 'SuppressMessageAttribute'", Justification = "Affect predefined suppressions.")] + +// Logger +[assembly: SuppressMessage("Performance", "CA1848:Use the LoggerMessage delegates", Justification = "Allow using LoggerExtensions methods")] +[assembly: SuppressMessage("Usage", "CA2254:Template should be a static expression", Justification = "Allow string concatenation or interpolation")] diff --git a/common/.gitattributes b/common/.gitattributes deleted file mode 100644 index c210a8dc46..0000000000 --- a/common/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -# Set default behavior to automatically normalize line endings. - -* text=crlf diff --git a/common/Contracts/IDevHomeActionSetRender.cs b/common/Contracts/IDevHomeActionSetRender.cs index ee7424123c..9ce212afae 100644 --- a/common/Contracts/IDevHomeActionSetRender.cs +++ b/common/Contracts/IDevHomeActionSetRender.cs @@ -7,7 +7,7 @@ namespace DevHome.Common.Contracts; /// /// Represents a renderer for an adaptive card action set that Dev Home can use to invoke actions from within -/// the action set. This is useful for invoking an adaptive card action from an abitraty button within Dev Home's UI. +/// the action set. This is useful for invoking an adaptive card action from an arbitrary button within Dev Home's UI. /// public interface IDevHomeActionSetRender : IAdaptiveElementRenderer { diff --git a/common/DevHome.Common.csproj b/common/DevHome.Common.csproj index d730ac47e8..b3865c90b5 100644 --- a/common/DevHome.Common.csproj +++ b/common/DevHome.Common.csproj @@ -7,6 +7,7 @@ enable true $(DevHomeSDKVersion) + Debug;Release;Debug_FailFast @@ -38,8 +39,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -59,7 +60,7 @@ - + diff --git a/common/Environments/Exceptions/CreateCreateComputeSystemOperationException.cs b/common/Environments/Exceptions/CreateCreateComputeSystemOperationException.cs index 9a2597ccbb..55af999534 100644 --- a/common/Environments/Exceptions/CreateCreateComputeSystemOperationException.cs +++ b/common/Environments/Exceptions/CreateCreateComputeSystemOperationException.cs @@ -2,10 +2,6 @@ // Licensed under the MIT License. using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace DevHome.Common.Environments.Exceptions; diff --git a/common/Environments/Helpers/ComputeSystemHelpers.cs b/common/Environments/Helpers/ComputeSystemHelpers.cs index ec305bbfee..db644b54fa 100644 --- a/common/Environments/Helpers/ComputeSystemHelpers.cs +++ b/common/Environments/Helpers/ComputeSystemHelpers.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using DevHome.Common.Environments.Models; using DevHome.Common.TelemetryEvents.SetupFlow.Environments; -using Microsoft.Extensions.Hosting; using Microsoft.UI.Xaml.Media.Imaging; using Microsoft.Windows.DevHome.SDK; using Serilog; diff --git a/common/Environments/Models/ComputeSystem.cs b/common/Environments/Models/ComputeSystem.cs index 5d3f6722b0..4280cb9bac 100644 --- a/common/Environments/Models/ComputeSystem.cs +++ b/common/Environments/Models/ComputeSystem.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; using System.Text; @@ -13,7 +12,6 @@ using Microsoft.Windows.DevHome.SDK; using Serilog; using Windows.Foundation; -using Windows.Win32; using WinRT; namespace DevHome.Common.Environments.Models; @@ -27,7 +25,7 @@ public class ComputeSystem { private readonly ILogger _log = Log.ForContext("SourceContext", nameof(ComputeSystem)); - private readonly string errorString; + private readonly string _errorString; private readonly IComputeSystem _computeSystem; @@ -66,7 +64,7 @@ public ComputeSystem(IComputeSystem computeSystem) AssociatedDeveloperId = computeSystem.AssociatedDeveloperId; AssociatedProviderId = new string(computeSystem.AssociatedProviderId); _computeSystem.StateChanged += OnComputeSystemStateChanged; - errorString = StringResourceHelper.GetResource("ComputeSystemUnexpectedError", DisplayName); + _errorString = StringResourceHelper.GetResource("ComputeSystemUnexpectedError", DisplayName); } public event TypedEventHandler StateChanged = (sender, state) => { }; @@ -93,7 +91,7 @@ public async Task GetStateAsync() catch (Exception ex) { _log.Error(ex, $"GetStateAsync for: {this} failed due to exception"); - return new ComputeSystemStateResult(ex, errorString, ex.Message); + return new ComputeSystemStateResult(ex, _errorString, ex.Message); } } @@ -106,7 +104,7 @@ public async Task StartAsync(string options) catch (Exception ex) { _log.Error(ex, $"StartAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -119,7 +117,7 @@ public async Task ShutDownAsync(string options) catch (Exception ex) { _log.Error(ex, $"ShutDownAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -132,7 +130,7 @@ public async Task RestartAsync(string options) catch (Exception ex) { _log.Error(ex, $"RestartAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -145,7 +143,7 @@ public async Task TerminateAsync(string options) catch (Exception ex) { _log.Error(ex, $"TerminateAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -158,7 +156,7 @@ public async Task DeleteAsync(string options) catch (Exception ex) { _log.Error(ex, $"DeleteAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -171,7 +169,7 @@ public async Task SaveAsync(string options) catch (Exception ex) { _log.Error(ex, $"SaveAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -184,7 +182,7 @@ public async Task PauseAsync(string options) catch (Exception ex) { _log.Error(ex, $"PauseAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -197,7 +195,7 @@ public async Task ResumeAsync(string options) catch (Exception ex) { _log.Error(ex, $"ResumeAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -210,7 +208,7 @@ public async Task CreateSnapshotAsync(string optio catch (Exception ex) { _log.Error(ex, $"CreateSnapshotAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -223,7 +221,7 @@ public async Task RevertSnapshotAsync(string optio catch (Exception ex) { _log.Error(ex, $"RevertSnapshotAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -236,7 +234,7 @@ public async Task DeleteSnapshotAsync(string optio catch (Exception ex) { _log.Error(ex, $"DeleteSnapshotAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -249,7 +247,7 @@ public async Task ModifyPropertiesAsync(string opt catch (Exception ex) { _log.Error(ex, $"ModifyPropertiesAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -262,7 +260,7 @@ public async Task GetComputeSystemThumbnailAsync(s catch (Exception ex) { _log.Error(ex, $"GetComputeSystemThumbnailAsync for: {this} failed due to exception"); - return new ComputeSystemThumbnailResult(ex, errorString, ex.Message); + return new ComputeSystemThumbnailResult(ex, _errorString, ex.Message); } } @@ -304,7 +302,7 @@ public async Task ConnectAsync(string options) catch (Exception ex) { _log.Error(ex, $"ConnectAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -323,7 +321,7 @@ public async Task PinToStartMenuAsync(string optio catch (Exception ex) { _log.Error(ex, $"PinToStartMenuAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -342,7 +340,7 @@ public async Task UnpinFromStartMenuAsync(string o catch (Exception ex) { _log.Error(ex, $"UnpinFromStartMenuAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -361,7 +359,7 @@ public async Task PinToTaskbarAsync(string options catch (Exception ex) { _log.Error(ex, $"PinToTaskbarAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -380,7 +378,7 @@ public async Task UnpinFromTaskbarAsync(string opt catch (Exception ex) { _log.Error(ex, $"UnpinFromTaskbarAsync for: {this} failed due to exception"); - return new ComputeSystemOperationResult(ex, errorString, ex.Message); + return new ComputeSystemOperationResult(ex, _errorString, ex.Message); } } @@ -399,7 +397,7 @@ public async Task GetIsPinnedToStartMenuAsync() catch (Exception ex) { _log.Error(ex, $"GetIsPinnedToStartMenuAsync for: {this} failed due to exception"); - return new ComputeSystemPinnedResult(ex, errorString, ex.Message); + return new ComputeSystemPinnedResult(ex, _errorString, ex.Message); } } @@ -418,7 +416,7 @@ public async Task GetIsPinnedToTaskbarAsync() catch (Exception ex) { _log.Error(ex, $"GetIsPinnedToTaskbarAsync for: {this} failed due to exception"); - return new ComputeSystemPinnedResult(ex, errorString, ex.Message); + return new ComputeSystemPinnedResult(ex, _errorString, ex.Message); } } diff --git a/common/Environments/Models/ComputeSystemProvider.cs b/common/Environments/Models/ComputeSystemProvider.cs index ad64203245..3f8e5f9cdc 100644 --- a/common/Environments/Models/ComputeSystemProvider.cs +++ b/common/Environments/Models/ComputeSystemProvider.cs @@ -22,7 +22,7 @@ public class ComputeSystemProvider { private readonly ILogger _log = Log.ForContext("SourceContext", nameof(ComputeSystemProvider)); - private readonly string errorString; + private readonly string _errorString; private readonly IComputeSystemProvider _computeSystemProvider; @@ -41,7 +41,7 @@ public ComputeSystemProvider(IComputeSystemProvider computeSystemProvider) DisplayName = computeSystemProvider.DisplayName; SupportedOperations = computeSystemProvider.SupportedOperations; Icon = computeSystemProvider.Icon; - errorString = StringResourceHelper.GetResource("ComputeSystemUnexpectedError", DisplayName); + _errorString = StringResourceHelper.GetResource("ComputeSystemUnexpectedError", DisplayName); } public ComputeSystemAdaptiveCardResult CreateAdaptiveCardSessionForDeveloperId(IDeveloperId developerId, ComputeSystemAdaptiveCardKind sessionKind) @@ -53,7 +53,7 @@ public ComputeSystemAdaptiveCardResult CreateAdaptiveCardSessionForDeveloperId(I catch (Exception ex) { _log.Error(ex, $"CreateAdaptiveCardSessionForDeveloperId for: {this} failed due to exception"); - return new ComputeSystemAdaptiveCardResult(ex, errorString, ex.Message); + return new ComputeSystemAdaptiveCardResult(ex, _errorString, ex.Message); } } @@ -66,7 +66,7 @@ public ComputeSystemAdaptiveCardResult CreateAdaptiveCardSessionForComputeSystem catch (Exception ex) { _log.Error(ex, $"CreateAdaptiveCardSessionForComputeSystem for: {this} failed due to exception"); - return new ComputeSystemAdaptiveCardResult(ex, errorString, ex.Message); + return new ComputeSystemAdaptiveCardResult(ex, _errorString, ex.Message); } } @@ -79,7 +79,7 @@ public async Task GetComputeSystemsAsync(IDeveloperId deve catch (Exception ex) { _log.Error(ex, $"GetComputeSystemsAsync for: {this} failed due to exception"); - return new ComputeSystemsResult(ex, errorString, ex.Message); + return new ComputeSystemsResult(ex, _errorString, ex.Message); } } diff --git a/common/Environments/Scripts/HyperVSetupScript.cs b/common/Environments/Scripts/HyperVSetupScript.cs index 6274e083c6..01348c7909 100644 --- a/common/Environments/Scripts/HyperVSetupScript.cs +++ b/common/Environments/Scripts/HyperVSetupScript.cs @@ -1,12 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - namespace DevHome.Common.Environments.Scripts; public static class HyperVSetupScript @@ -41,11 +35,12 @@ 6. The user is already in the Hyper-V Admin group and the Hyper-V Feature is alr { $featureEnablementResult = [OperationStatus]::OperationNotRun $adminGroupResult = [OperationStatus]::OperationNotRun + $hyperVGroupSid = 'S-1-5-32-578' # Check the security token the user logged on with contains the Hyper-V Administrators group SID (S-1-5-32-578). This can only be updated, # once the user logs off and on again. Even if we add the user to the group later on in the script. - $foundSecurityTokenString = [System.Security.Principal.WindowsIdentity]::GetCurrent().Groups.Value | Where-Object { $_ -eq 'S-1-5-32-578' } - $doesUserSecurityTokenContainHyperAdminGroup = $foundSecurityTokenString -eq 'S-1-5-32-578' + $foundSecurityTokenString = [System.Security.Principal.WindowsIdentity]::GetCurrent().Groups.Value | Where-Object { $_ -eq $hyperVGroupSid } + $doesUserSecurityTokenContainHyperAdminGroup = $foundSecurityTokenString -eq $hyperVGroupSid # Check if the Hyper-V feature is enabled $featureState = Get-WindowsOptionalFeature -FeatureName 'Microsoft-Hyper-V' -Online | Select-Object -ExpandProperty State @@ -76,13 +71,13 @@ exit 6 } # Check the Hyper-V Administrators group to see if the user is inside the group - $userGroupObject = Get-LocalGroupMember -Group 'Hyper-V Administrators' | Where-Object { $_.Name -eq ([System.Security.Principal.WindowsIdentity]::GetCurrent().Name) } + $userGroupObject = Get-LocalGroupMember -Sid $hyperVGroupSid | Where-Object { $_.Name -eq ([System.Security.Principal.WindowsIdentity]::GetCurrent().Name) } $isUserInGroup = $null -ne $userGroupObject # Add user to Hyper-v Administrators group if they aren't already in the group if (-not $isUserInGroup) { - Add-LocalGroupMember -Group 'Hyper-V Administrators' -Member ([System.Security.Principal.WindowsIdentity]::GetCurrent().Name) + Add-LocalGroupMember -Sid $hyperVGroupSid -Member ([System.Security.Principal.WindowsIdentity]::GetCurrent().Name) # Check if the last command succeeded if ($?) diff --git a/common/Environments/Services/ComputeSystemManager.cs b/common/Environments/Services/ComputeSystemManager.cs index 7643daea17..6428015c94 100644 --- a/common/Environments/Services/ComputeSystemManager.cs +++ b/common/Environments/Services/ComputeSystemManager.cs @@ -9,7 +9,6 @@ using DevHome.Common.Contracts.Services; using DevHome.Common.Environments.Models; using DevHome.Common.Models; -using DevHome.Common.Services; using Microsoft.Windows.DevHome.SDK; using Serilog; using Windows.Foundation; @@ -17,7 +16,7 @@ namespace DevHome.Common.Environments.Services; /// -/// Service thats used to get the ComputeSystems from the providers so they can be loaded into the UI. +/// Service that's used to get the ComputeSystems from the providers so they can be loaded into the UI. /// This class is also used to keep track of the ComputeSystem that a configuration file will be applied to. /// public class ComputeSystemManager : IComputeSystemManager @@ -33,7 +32,7 @@ public class ComputeSystemManager : IComputeSystemManager private readonly object _creationOperationLock = new(); // Used in the setup flow to store the ComputeSystem needed to configure. - public ComputeSystemReviewItem? ComputeSystemSetupItem { get; set; } + public ComputeSystemReviewItem? ComputeSystemSetupItem { get; set; } public ComputeSystemManager(IComputeSystemService computeSystemService) { @@ -101,7 +100,7 @@ public List GetRunningOperationsForCreation() { lock (_creationOperationLock) { - return _createComputeSystemOperations.Values.ToList(); + return _createComputeSystemOperations.Values.ToList(); } } @@ -117,7 +116,7 @@ public void RemoveOperation(CreateComputeSystemOperation operation) { lock (_creationOperationLock) { - _createComputeSystemOperations.Remove(operation.OperationId); + _createComputeSystemOperations.Remove(operation.OperationId); } } diff --git a/common/Environments/Styles/HorizontalCardStyles.xaml b/common/Environments/Styles/HorizontalCardStyles.xaml index 7a9e98c2b8..db6109d5e2 100644 --- a/common/Environments/Styles/HorizontalCardStyles.xaml +++ b/common/Environments/Styles/HorizontalCardStyles.xaml @@ -238,4 +238,12 @@ + diff --git a/common/Helpers/AdaptiveCardHelpers.cs b/common/Helpers/AdaptiveCardHelpers.cs index 2332714e8d..c17c360e4d 100644 --- a/common/Helpers/AdaptiveCardHelpers.cs +++ b/common/Helpers/AdaptiveCardHelpers.cs @@ -3,11 +3,6 @@ using System; using System.IO; -using System.Text; -using System.Text.Json; -using System.Threading.Tasks; -using DevHome.Common.Helpers; -using DevHome.Common.Models; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media.Imaging; using Serilog; diff --git a/common/Helpers/CommonConstants.cs b/common/Helpers/CommonConstants.cs index 879748a45c..e1238da23e 100644 --- a/common/Helpers/CommonConstants.cs +++ b/common/Helpers/CommonConstants.cs @@ -1,17 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - namespace DevHome.Common.Helpers; public static class CommonConstants { - public const string HyperVExtensionClassId = "F8B26528-976A-488C-9B40-7198FB425C9E"; + public const string HyperVExtensionClassId = "F8B26528-976A-488C-9B40-7198FB425C9E"; + + public const string WSLExtensionClassId = "121253AB-BA5D-4E73-99CF-25A2CB8BF173"; public const string HyperVWindowsOptionalFeatureName = "Microsoft-Hyper-V"; } diff --git a/common/Helpers/Deployment.cs b/common/Helpers/Deployment.cs index c25cb02e3f..36c79791f6 100644 --- a/common/Helpers/Deployment.cs +++ b/common/Helpers/Deployment.cs @@ -9,7 +9,7 @@ namespace DevHome.Common.Helpers; public static class Deployment { - private static readonly string DeploymentIdentifierKeyName = "DevHomeDeploymentIdentifier"; + private static readonly string _deploymentIdentifierKeyName = "DevHomeDeploymentIdentifier"; // This creates and returns a Guid associated with this deployment of DevHome. This uniquely // identifies this deployment across multiple launches and will be different per Windows user. @@ -23,18 +23,18 @@ public static Guid Identifier try { var localSettings = ApplicationData.Current.LocalSettings; - if (localSettings.Values.TryGetValue(DeploymentIdentifierKeyName, out var value)) + if (localSettings.Values.TryGetValue(_deploymentIdentifierKeyName, out var value)) { return (Guid)value; } var newGuid = Guid.NewGuid(); - localSettings.Values[DeploymentIdentifierKeyName] = newGuid; + localSettings.Values[_deploymentIdentifierKeyName] = newGuid; return newGuid; } catch (Exception ex) { - // We do not want this identifer's access to ever create a problem in the + // We do not want this identifier's access to ever create a problem in the // application, so if we can't get it, return empty guid. An empty guid is also a // signal that the data is unknown for filtering purposes. Log.Error(ex, $"Failed getting Deployment Identifier"); diff --git a/common/Helpers/ManagementInfrastructureHelper.cs b/common/Helpers/ManagementInfrastructureHelper.cs index 5e734def24..39f20143a4 100644 --- a/common/Helpers/ManagementInfrastructureHelper.cs +++ b/common/Helpers/ManagementInfrastructureHelper.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. using System; -using System.Globalization; using Microsoft.Management.Infrastructure; using Serilog; +using static DevHome.Common.Helpers.WindowsOptionalFeatures; namespace DevHome.Common.Helpers; @@ -23,6 +23,11 @@ public static class ManagementInfrastructureHelper private static readonly ILogger _log = Log.ForContext("SourceContext", nameof(ManagementInfrastructureHelper)); public static FeatureAvailabilityKind IsWindowsFeatureAvailable(string featureName) + { + return GetWindowsFeatureDetails(featureName)?.AvailabilityKind ?? FeatureAvailabilityKind.Unknown; + } + + public static FeatureInfo? GetWindowsFeatureDetails(string featureName) { try { @@ -37,7 +42,19 @@ public static FeatureAvailabilityKind IsWindowsFeatureAvailable(string featureNa var featureAvailability = GetAvailabilityKindFromState(installState); _log.Information($"Found feature: '{featureName}' with enablement state: '{featureAvailability}'"); - return featureAvailability; + + // Most optional features do not have a description, so we provide one for known features + var description = featureInstance.CimInstanceProperties["Description"]?.Value as string ?? string.Empty; + if (string.IsNullOrEmpty(description) && WindowsOptionalFeatures.FeatureDescriptions.TryGetValue(featureName, out var featureDescription)) + { + description = featureDescription; + } + + return new FeatureInfo( + featureName, + featureInstance.CimInstanceProperties["Caption"]?.Value as string ?? featureName, + description, + featureAvailability); } } } @@ -47,7 +64,7 @@ public static FeatureAvailabilityKind IsWindowsFeatureAvailable(string featureNa } _log.Information($"Unable to get state of {featureName} feature"); - return FeatureAvailabilityKind.Unknown; + return null; } private static FeatureAvailabilityKind GetAvailabilityKindFromState(uint state) diff --git a/common/Helpers/RestartHelper.cs b/common/Helpers/RestartHelper.cs new file mode 100644 index 0000000000..ac5fb7d5f5 --- /dev/null +++ b/common/Helpers/RestartHelper.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using System.Diagnostics; +using CommunityToolkit.Mvvm.Input; + +namespace DevHome.Common.Helpers; + +public partial class RestartHelper +{ + [RelayCommand] + public static void RestartComputer() + { + var startInfo = new ProcessStartInfo + { + WindowStyle = ProcessWindowStyle.Hidden, + FileName = Environment.SystemDirectory + "\\shutdown.exe", + Arguments = "-r -t 0", + Verb = string.Empty, + }; + + var process = new Process + { + StartInfo = startInfo, + }; + process.Start(); + } +} diff --git a/common/Helpers/WindowsIdentityHelper.cs b/common/Helpers/WindowsIdentityHelper.cs index 1c6a76b646..13be26cb7e 100644 --- a/common/Helpers/WindowsIdentityHelper.cs +++ b/common/Helpers/WindowsIdentityHelper.cs @@ -26,4 +26,14 @@ public virtual bool IsUserHyperVAdmin() { return _currentUserIdentity?.Name; } + + // Returns true if the current user has the built-in Administrators claim indicating that + // they could elevate to an administrator role via UAC if needed. Does not check if the process + // is running elevated. + public virtual bool IsUserAdministrator() + { + using WindowsIdentity identity = WindowsIdentity.GetCurrent(); + var adminSid = new SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null).Value; + return identity.Claims.Any(c => c.Value == adminSid); + } } diff --git a/common/Helpers/WindowsOptionalFeatures.cs b/common/Helpers/WindowsOptionalFeatures.cs new file mode 100644 index 0000000000..aa75858124 --- /dev/null +++ b/common/Helpers/WindowsOptionalFeatures.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System.Collections.Generic; +using DevHome.Common.Environments.Helpers; + +namespace DevHome.Common.Helpers; + +public static class WindowsOptionalFeatures +{ + // If changes are made to the set of features here, consider updating ModifyWindowsOptionalFeatures' valid feature set. + public const string Containers = "Containers"; + public const string GuardedHost = "HostGuardian"; + public const string HyperV = "Microsoft-Hyper-V-All"; + public const string HyperVManagementTools = "Microsoft-Hyper-V-Tools-All"; + public const string HyperVPlatform = "Microsoft-Hyper-V"; + public const string VirtualMachinePlatform = "VirtualMachinePlatform"; + public const string WindowsHypervisorPlatform = "HypervisorPlatform"; + public const string WindowsSandbox = "Containers-DisposableClientVM"; + public const string WindowsSubsystemForLinux = "Microsoft-Windows-Subsystem-Linux"; + + public static IEnumerable VirtualMachineFeatures => new[] + { + Containers, + GuardedHost, + HyperV, + HyperVManagementTools, + HyperVPlatform, + VirtualMachinePlatform, + WindowsHypervisorPlatform, + WindowsSandbox, + WindowsSubsystemForLinux, + }; + + public static readonly Dictionary FeatureDescriptions = new() + { + { Containers, GetFeatureDescription(nameof(Containers)) }, + { GuardedHost, GetFeatureDescription(nameof(GuardedHost)) }, + { HyperV, GetFeatureDescription(nameof(HyperV)) }, + { HyperVManagementTools, GetFeatureDescription(nameof(HyperVManagementTools)) }, + { HyperVPlatform, GetFeatureDescription(nameof(HyperVPlatform)) }, + { VirtualMachinePlatform, GetFeatureDescription(nameof(VirtualMachinePlatform)) }, + { WindowsHypervisorPlatform, GetFeatureDescription(nameof(WindowsHypervisorPlatform)) }, + { WindowsSandbox, GetFeatureDescription(nameof(WindowsSandbox)) }, + { WindowsSubsystemForLinux, GetFeatureDescription(nameof(WindowsSubsystemForLinux)) }, + }; + + private static string GetFeatureDescription(string featureName) + { + return StringResourceHelper.GetResource(featureName + "Description"); + } + + public class FeatureInfo + { + public string FeatureName { get; set; } + + public string DisplayName { get; set; } + + public string Description { get; set; } + + public bool IsEnabled { get; set; } + + public bool IsAvailable { get; set; } + + public FeatureAvailabilityKind AvailabilityKind { get; set; } + + public FeatureInfo(string featureName, string displayName, string description, FeatureAvailabilityKind availabilityKind) + { + FeatureName = featureName; + DisplayName = displayName; + Description = description; + AvailabilityKind = availabilityKind; + IsEnabled = AvailabilityKind == FeatureAvailabilityKind.Enabled; + IsAvailable = AvailabilityKind == FeatureAvailabilityKind.Enabled || AvailabilityKind == FeatureAvailabilityKind.Disabled; + } + } +} diff --git a/common/Models/ExtensionAdaptiveCardSession.cs b/common/Models/ExtensionAdaptiveCardSession.cs index 089308e6fb..1016b80073 100644 --- a/common/Models/ExtensionAdaptiveCardSession.cs +++ b/common/Models/ExtensionAdaptiveCardSession.cs @@ -2,11 +2,7 @@ // Licensed under the MIT License. using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; -using DevHome.Common.Helpers; using Microsoft.Windows.DevHome.SDK; using Serilog; @@ -61,7 +57,7 @@ public void Dispose() } catch (Exception ex) { - _log.Error(ex, $"Dispose failed due to exception"); + _log.Error(ex, $"Dispose failed due to exception"); } } @@ -73,8 +69,8 @@ public async Task OnAction(string action, string inputs } catch (Exception ex) { - _log.Error(ex, $"OnAction failed due to exception"); - return new ProviderOperationResult(ProviderOperationStatus.Failure, ex, ex.Message, ex.Message); + _log.Error(ex, $"OnAction failed due to exception"); + return new ProviderOperationResult(ProviderOperationStatus.Failure, ex, ex.Message, ex.Message); } } diff --git a/common/Models/WindowsOptionalFeatureState.cs b/common/Models/WindowsOptionalFeatureState.cs new file mode 100644 index 0000000000..cd9ef0bb36 --- /dev/null +++ b/common/Models/WindowsOptionalFeatureState.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using CommunityToolkit.Mvvm.ComponentModel; +using static DevHome.Common.Helpers.WindowsOptionalFeatures; + +namespace DevHome.Common.Models; + +public partial class WindowsOptionalFeatureState : ObservableObject +{ + public FeatureInfo Feature { get; } + + [ObservableProperty] + private bool _isModifiable; + + [ObservableProperty] + [NotifyPropertyChangedFor(nameof(HasChanged))] + private bool _isEnabled; + + public bool HasChanged => IsEnabled != Feature.IsEnabled; + + public WindowsOptionalFeatureState(FeatureInfo feature, bool modifiable) + { + Feature = feature; + IsEnabled = feature.IsEnabled; + IsModifiable = modifiable; + } +} diff --git a/common/Renderers/ChooseFileAction.cs b/common/Renderers/ChooseFileAction.cs index 9abc3dbe41..1354a3cde9 100644 --- a/common/Renderers/ChooseFileAction.cs +++ b/common/Renderers/ChooseFileAction.cs @@ -12,7 +12,6 @@ using Windows.Data.Json; using Windows.Storage.Pickers; using WinRT.Interop; -using WinUIEx; namespace DevHome.Common.Renderers; diff --git a/common/Renderers/DevHomeChoiceSetWithDynamicRefresh.cs b/common/Renderers/DevHomeChoiceSetWithDynamicRefresh.cs index afdb62137a..f320e84802 100644 --- a/common/Renderers/DevHomeChoiceSetWithDynamicRefresh.cs +++ b/common/Renderers/DevHomeChoiceSetWithDynamicRefresh.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Text.Json; using AdaptiveCards.ObjectModel.WinUI3; diff --git a/common/Renderers/TextInputRenderer.cs b/common/Renderers/TextInputRenderer.cs index 0352c49faf..6312534ce9 100644 --- a/common/Renderers/TextInputRenderer.cs +++ b/common/Renderers/TextInputRenderer.cs @@ -1,12 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.Linq; using AdaptiveCards.ObjectModel.WinUI3; using AdaptiveCards.Rendering.WinUI3; using CommunityToolkit.WinUI; using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Automation; using Microsoft.UI.Xaml.Controls; namespace DevHome.Common.Renderers; diff --git a/common/Scripts/ModifyLongPathsSetting.cs b/common/Scripts/ModifyLongPathsSetting.cs new file mode 100644 index 0000000000..b09d9405cf --- /dev/null +++ b/common/Scripts/ModifyLongPathsSetting.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using System.Diagnostics; +using Serilog; + +namespace DevHome.Common.Scripts; + +public static class ModifyLongPathsSetting +{ + public static ExitCode ModifyLongPaths(bool enabled, ILogger? log = null) + { + var scriptString = enabled ? EnableScript : DisableScript; + var process = new Process + { + StartInfo = new ProcessStartInfo + { + WindowStyle = ProcessWindowStyle.Hidden, + FileName = "powershell.exe", + Arguments = $"-ExecutionPolicy Bypass -Command {scriptString}", + UseShellExecute = true, + Verb = "runas", + }, + }; + + try + { + process.Start(); + process.WaitForExit(); + + return FromExitCode(process.ExitCode); + } + catch (Exception ex) + { + log?.Error(ex, "Failed to modify Long Paths setting"); + return ExitCode.Failure; + } + } + + public enum ExitCode + { + Success = 0, + Failure = 1, + } + + private static ExitCode FromExitCode(int exitCode) + { + return exitCode switch + { + 0 => ExitCode.Success, + _ => ExitCode.Failure, + }; + } + + private const string EnableScript = +@" +$ErrorActionPreference='stop' +Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1 +if ($?) { exit 0 } else { exit 1 } +"; + + private const string DisableScript = +@" +$ErrorActionPreference='stop' +Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 0 +if ($?) { exit 0 } else { exit 1 } +"; +} diff --git a/common/Scripts/ModifyWindowsOptionalFeatures.cs b/common/Scripts/ModifyWindowsOptionalFeatures.cs new file mode 100644 index 0000000000..dd0c340476 --- /dev/null +++ b/common/Scripts/ModifyWindowsOptionalFeatures.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using DevHome.Common.Models; +using DevHome.Common.TelemetryEvents; +using Serilog; + +namespace DevHome.Common.Scripts; + +public static class ModifyWindowsOptionalFeatures +{ + public static async Task ModifyFeaturesAsync( + IEnumerable features, + ILogger? log = null, + CancellationToken cancellationToken = default) + { + if (!features.Any(f => f.HasChanged)) + { + return ExitCode.Success; + } + + // Format the argument for the PowerShell script using `n as a newline character since the list + // will be parsed with ConvertFrom-StringData. + // The format is FeatureName1=True|False`nFeatureName2=True|False`n... + var featuresString = string.Empty; + foreach (var featureState in features) + { + if (featureState.HasChanged) + { + featuresString += $"{featureState.Feature.FeatureName}={featureState.IsEnabled}`n"; + } + } + + var scriptString = Script.Replace("FEATURE_STRING_INPUT", featuresString); + var process = new Process + { + StartInfo = new ProcessStartInfo + { + WindowStyle = ProcessWindowStyle.Hidden, + FileName = "powershell.exe", + Arguments = $"-ExecutionPolicy Bypass -Command {scriptString}", + UseShellExecute = true, + Verb = "runas", + }, + }; + + var exitCode = ExitCode.Failure; + + Stopwatch stopwatch = Stopwatch.StartNew(); + + await Task.Run( + () => + { + // Since a UAC prompt will be shown, we need to wait for the process to exit + // This can also be cancelled by the user which will result in an exception, + // which is handled as a failure. + try + { + if (cancellationToken.IsCancellationRequested) + { + log?.Information("Operation was cancelled."); + exitCode = ExitCode.Cancelled; + return; + } + + process.Start(); + while (!process.WaitForExit(1000)) + { + if (cancellationToken.IsCancellationRequested) + { + // Attempt to kill the process if cancellation is requested + exitCode = ExitCode.Cancelled; + process.Kill(); + log?.Information("Operation was cancelled."); + return; + } + } + + exitCode = FromExitCode(process.ExitCode); + } + catch (Exception ex) + { + // This is most likely a case where the user cancelled the UAC prompt. + if (ex is System.ComponentModel.Win32Exception win32Exception) + { + if (win32Exception.NativeErrorCode == 1223) + { + log?.Information(ex, "UAC was cancelled by the user."); + exitCode = ExitCode.Cancelled; + } + } + else + { + log?.Error(ex, "Script failed"); + exitCode = ExitCode.Failure; + } + } + }, + cancellationToken); + + stopwatch.Stop(); + + ModifyWindowsOptionalFeaturesEvent.Log( + featuresString, + exitCode, + stopwatch.ElapsedMilliseconds); + + return exitCode; + } + + public enum ExitCode + { + Success = 0, + Failure = 1, + Cancelled = 2, + } + + private static ExitCode FromExitCode(int exitCode) + { + return exitCode switch + { + 0 => ExitCode.Success, + 1 => ExitCode.Failure, + _ => ExitCode.Cancelled, + }; + } + + public static string GetExitCodeDescription(ExitCode exitCode) + { + return exitCode switch + { + ExitCode.Success => "Success", + ExitCode.Failure => "Failure", + _ => "Cancelled", + }; + } + + /// + /// PowerShell script for modifying Windows optional features. + /// + /// This script takes a string argument representing feature names and their desired states (enabled or disabled). + /// It parses this string into a dictionary, iterates over each feature, and performs the necessary enable or disable operation based on the desired state. + /// + /// The script defines the following possible exit statuses: + /// - OperationSucceeded (0): All operations (enable or disable) succeeded. + /// - OperationFailed (1): At least one operation failed. + /// + /// Only features present in "validFeatures" are considered valid. If an invalid feature name is encountered, the script exits with OperationFailed. + /// This list should generally be kept consistent with the list of features in the WindowsOptionalFeatures class. + /// + /// + private const string Script = +@" +$ErrorActionPreference='stop' + +enum OperationStatus +{ + OperationSucceeded = 0 + OperationFailed = 1 +} + +$validFeatures = @( + 'Containers', + 'HostGuardian', + 'Microsoft-Hyper-V-All', + 'Microsoft-Hyper-V-Tools-All', + 'Microsoft-Hyper-V', + 'VirtualMachinePlatform', + 'HypervisorPlatform', + 'Containers-DisposableClientVM', + 'Microsoft-Windows-Subsystem-Linux' +) + +function ModifyFeatures($featuresString) +{ + $features = ConvertFrom-StringData $featuresString + + foreach ($feature in $features.GetEnumerator()) + { + $featureName = $feature.Key + if ($featureName -notin $validFeatures) + { + exit [OperationStatus]::OperationFailed + } + + $isEnabled = [bool]::Parse($feature.Value); + $featureState = Get-WindowsOptionalFeature -FeatureName $featureName -Online | Select-Object -ExpandProperty State; + $currentEnabled = $featureState -eq 'Enabled'; + + if ($currentEnabled -ne $isEnabled) + { + $result = $null + if ($isEnabled) + { + $result = Enable-WindowsOptionalFeature -Online -FeatureName $featureName -All -NoRestart + } + else + { + $result = Disable-WindowsOptionalFeature -Online -FeatureName $featureName -NoRestart + } + + if ($null -eq $result) + { + exit [OperationStatus]::OperationFailed; + } + } + } + + exit [OperationStatus]::OperationSucceeded; +} + +ModifyFeatures FEATURE_STRING_INPUT; +"; +} diff --git a/common/Services/IAppInfoService.cs b/common/Services/IAppInfoService.cs index 35f332f87d..0df1d7acba 100644 --- a/common/Services/IAppInfoService.cs +++ b/common/Services/IAppInfoService.cs @@ -7,9 +7,27 @@ namespace DevHome.Common.Services; public interface IAppInfoService { + /// + /// Gets the localized name of the application. + /// + /// The localized name of the application. public string GetAppNameLocalized(); + /// + /// Gets the version of the application. + /// + /// The version of the application. public Version GetAppVersion(); + /// + /// Gets the path for the icon of the application. + /// public string IconPath { get; } + + /// + /// Gets the preferred language of the user. + /// If no preferred language is set, then default to + /// + /// Preferred language is set in the system settings under "Language & region" + public string UserPreferredLanguage { get; } } diff --git a/common/Services/IPackageDeploymentService.cs b/common/Services/IPackageDeploymentService.cs deleted file mode 100644 index ccdeb4f7b9..0000000000 --- a/common/Services/IPackageDeploymentService.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Windows.ApplicationModel; -using Windows.Management.Deployment; - -namespace DevHome.Common.Services; - -/// -/// Interface for using the deployment API -/// -/// -public interface IPackageDeploymentService -{ - /// - /// Register a package for the current user - /// - /// Package family name - /// Register package options - /// Exception thrown if registration failed - public Task RegisterPackageForCurrentUserAsync(string packageFamilyName, RegisterPackageOptions? options = null); - - /// - /// Find packages for the current user. If maxVersion is specified, package versions must be - /// between minVersion and maxVersion. If maxVersion is null, packages must be above minVersion. - /// If no minVersion is specified, returns packages of any version. - /// - /// An IEnumerable containing the installed packages that meet the version criteria. - public IEnumerable FindPackagesForCurrentUser(string packageFamilyName, params (Version minVersion, Version? maxVersion)[] ranges); -} - -/// -/// Parameter object for -/// More details: https://learn.microsoft.com/uwp/api/windows.management.deployment.packagemanager.registerpackagebyfamilynameasync?view=winrt-22621 -/// -public sealed class RegisterPackageOptions -{ - /// - /// Gets or sets the family names of the dependency packages to be registered. - /// - public IEnumerable? DependencyPackageFamilyNames { get; set; } - - /// - /// Gets or sets the package deployment option. - /// - public DeploymentOptions? DeploymentOptions { get; set; } - - /// - /// Gets or sets the package volume to store that app data on. - /// - public PackageVolume? AppDataVolume { get; set; } - - /// - /// Gets or sets the optional package family names from the main bundle to be registered. - /// - public IEnumerable? OptionalPackageFamilyNames { get; set; } -} diff --git a/common/Services/LocalSettingsService.cs b/common/Services/LocalSettingsService.cs index 3bd1a6ca30..5da1340101 100644 --- a/common/Services/LocalSettingsService.cs +++ b/common/Services/LocalSettingsService.cs @@ -15,8 +15,8 @@ namespace DevHome.Common.Services; public class LocalSettingsService : ILocalSettingsService { - private const string _defaultApplicationDataFolder = "DevHome/ApplicationData"; - private const string _defaultLocalSettingsFile = "LocalSettings.json"; + private const string DefaultApplicationDataFolder = "DevHome/ApplicationData"; + private const string DefaultLocalSettingsFile = "LocalSettings.json"; private readonly IFileService _fileService; private readonly LocalSettingsOptions _options; @@ -34,8 +34,8 @@ public LocalSettingsService(IFileService fileService, IOptions(); } diff --git a/common/Services/QuickstartSetupService.cs b/common/Services/QuickstartSetupService.cs index d379b060df..aeee99dd66 100644 --- a/common/Services/QuickstartSetupService.cs +++ b/common/Services/QuickstartSetupService.cs @@ -5,12 +5,12 @@ using System.Linq; using System.Threading.Tasks; using DevHome.Common.Contracts; -using DevHome.Common.Services; +using DevHome.Services.Core.Contracts; using Serilog; namespace DevHome.Services; -public class QuickstartSetupService(IAppInstallManagerService appInstallManagerService, IPackageDeploymentService packageDeploymentService) : IQuickstartSetupService +public class QuickstartSetupService(IMicrosoftStoreService msStoreService, IPackageDeploymentService packageDeploymentService) : IQuickstartSetupService { #if CANARY_BUILD private const string AzureExtensionStorePackageId = "9NBVFRMSFXHW"; @@ -25,7 +25,7 @@ public class QuickstartSetupService(IAppInstallManagerService appInstallManagerS private readonly ILogger _log = Log.ForContext("SourceContext", nameof(QuickstartSetupService)); - private readonly IAppInstallManagerService _appInstallManagerService = appInstallManagerService; + private readonly IMicrosoftStoreService _msStoreService = msStoreService; private readonly IPackageDeploymentService _packageDeploymentService = packageDeploymentService; public bool IsDevHomeAzureExtensionInstalled() @@ -43,7 +43,7 @@ public async Task InstallDevHomeAzureExtensionAsync() try { _log.Information("Installing DevHomeAzureExtension"); - await _appInstallManagerService.TryInstallPackageAsync(AzureExtensionStorePackageId); + await _msStoreService.TryInstallPackageAsync(AzureExtensionStorePackageId); } catch (Exception ex) { diff --git a/common/Strings/en-us/Resources.resw b/common/Strings/en-us/Resources.resw index a2d1803b91..922cd4f409 100644 --- a/common/Strings/en-us/Resources.resw +++ b/common/Strings/en-us/Resources.resw @@ -131,7 +131,7 @@ vCPU: - Title for the virtual cpu property of a compute system + Title for the virtual CPU property of a compute system Created @@ -287,14 +287,14 @@ Couldn't get title from the extension - Error text to be displayed to the user when a dev home extension that wants a content dialog to be displayed does not provide Dev Home with a title for the content dialog + Error text to be displayed to the user when a Dev Home extension that wants a content dialog to be displayed does not provide Dev Home with a title for the content dialog An item must be selected Error text advising the user that they must select an item in the list before proceeding - An unexpected error occured while attempting to create your new environment + An unexpected error occurred while attempting to create your new environment Error text for when there was an unexpected error that we could not handle within Dev Home. @@ -323,4 +323,40 @@ Choose file + + Provides services and tools to create and manage Windows Server Containers and their resources. + Locked="{Windows Server Containers}" Description for the Containers optional feature. + + + Enables the device to create and run Shielded Virtual Machine using remote attestation. + Locked="{Shielded Virtual Machine}" Description for the HostGuardian optional feature. + + + Provides services and management tools for creating and running virtual machines and their resources. + Description for the Microsoft-Hyper-V-All optional feature. + + + Includes GUI and command-line tools for managing Hyper-V. + Description for the Microsoft-Hyper-V-Tools-All optional feature. + + + Provides the services that you can use to create and manage virtual machines and their resources. + Description for the Microsoft-Hyper-V optional feature. + + + Enables platform support for virtual machines. + Description for the VirtualMachinePlatform optional feature. + + + Enables virtualization software to run on the Windows hypervisor. + Description for the WindowsHypervisorPlatform optional feature. + + + Enables the dependencies required to run Windows Sandbox scenarios. + Locked="{Windows Sandbox}" Description for the Containers-DisposableClientVM optional feature. + + + Provides services and environments for running native user-mode Linux shells and tools on Windows. + Description for the Containers-Microsoft-Windows-Subsystem-Linux optional feature. + \ No newline at end of file diff --git a/common/TelemetryEvents/DeveloperId/EntryPointEvent.cs b/common/TelemetryEvents/DeveloperId/EntryPointEvent.cs index 3ea65d387f..1ff4c47618 100644 --- a/common/TelemetryEvents/DeveloperId/EntryPointEvent.cs +++ b/common/TelemetryEvents/DeveloperId/EntryPointEvent.cs @@ -28,7 +28,7 @@ public enum EntryPoint Widget = 4, } - private readonly string[] entryPointNames = + private readonly string[] _entryPointNames = [ string.Empty, "Settings", @@ -39,7 +39,7 @@ public enum EntryPoint public EntryPointEvent(EntryPoint entryPoint) { - EntryPointName = entryPointNames[(int)entryPoint]; + EntryPointName = _entryPointNames[(int)entryPoint]; } public override void ReplaceSensitiveStrings(Func replaceSensitiveStrings) diff --git a/common/TelemetryEvents/EnvironmentRedirectionUserEvent.cs b/common/TelemetryEvents/EnvironmentRedirectionUserEvent.cs index 8e6af37312..0e2c3c0234 100644 --- a/common/TelemetryEvents/EnvironmentRedirectionUserEvent.cs +++ b/common/TelemetryEvents/EnvironmentRedirectionUserEvent.cs @@ -2,11 +2,7 @@ // Licensed under the MIT License. using System; -using System.Collections.Generic; using System.Diagnostics.Tracing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using DevHome.Telemetry; using Microsoft.Diagnostics.Telemetry; using Microsoft.Diagnostics.Telemetry.Internal; diff --git a/common/TelemetryEvents/Environments/EnvironmentRestartUserEvent.cs b/common/TelemetryEvents/Environments/EnvironmentRestartUserEvent.cs index abfcbb5049..ad3344525f 100644 --- a/common/TelemetryEvents/Environments/EnvironmentRestartUserEvent.cs +++ b/common/TelemetryEvents/Environments/EnvironmentRestartUserEvent.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics.Tracing; -using DevHome.Common.TelemetryEvents.SetupFlow.Environments; using DevHome.Telemetry; using Microsoft.Diagnostics.Telemetry; using Microsoft.Diagnostics.Telemetry.Internal; diff --git a/common/TelemetryEvents/ModifyWindowsOptionalFeaturesEvent.cs b/common/TelemetryEvents/ModifyWindowsOptionalFeaturesEvent.cs new file mode 100644 index 0000000000..e5ad8033fe --- /dev/null +++ b/common/TelemetryEvents/ModifyWindowsOptionalFeaturesEvent.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using System.Diagnostics.Tracing; +using DevHome.Telemetry; +using Microsoft.Diagnostics.Telemetry; +using Microsoft.Diagnostics.Telemetry.Internal; +using static DevHome.Common.Scripts.ModifyWindowsOptionalFeatures; + +namespace DevHome.Common.TelemetryEvents; + +[EventData] +public class ModifyWindowsOptionalFeaturesEvent : EventBase +{ + public override PartA_PrivTags PartA_PrivTags => PrivTags.ProductAndServicePerformance; + + public string FeaturesString + { + get; + } + + public string ExitCode + { + get; + } + + public long DurationMs + { + get; + } + + public ModifyWindowsOptionalFeaturesEvent(string featureString, ExitCode result, long durationMs) + { + FeaturesString = featureString; + ExitCode = GetExitCodeDescription(result); + DurationMs = durationMs; + } + + public override void ReplaceSensitiveStrings(Func replaceSensitiveStrings) + { + // No sensitive strings to replace. + } + + public static void Log(string featureString, ExitCode result, long durationMs) + { + TelemetryFactory.Get().Log( + "ModifyVirtualizationFeatures_Event", + LogLevel.Measure, + new ModifyWindowsOptionalFeaturesEvent(featureString, result, durationMs)); + } +} diff --git a/common/TelemetryEvents/SeekerEvent.cs b/common/TelemetryEvents/SeekerEvent.cs index 0deb509625..4b8ebb11bb 100644 --- a/common/TelemetryEvents/SeekerEvent.cs +++ b/common/TelemetryEvents/SeekerEvent.cs @@ -9,7 +9,7 @@ namespace DevHome.Common.TelemetryEvents; -// A seeker is someone who has sought out experimental features or experiements +// A seeker is someone who has sought out experimental features or experiments [EventData] public class SeekerEvent : EventBase { diff --git a/common/TelemetryEvents/SetupFlow/SummaryPage/CloneRepoNextStepsEvent.cs b/common/TelemetryEvents/SetupFlow/SummaryPage/CloneRepoNextStepsEvent.cs index 5882d8d488..efd4bc801e 100644 --- a/common/TelemetryEvents/SetupFlow/SummaryPage/CloneRepoNextStepsEvent.cs +++ b/common/TelemetryEvents/SetupFlow/SummaryPage/CloneRepoNextStepsEvent.cs @@ -2,11 +2,7 @@ // Licensed under the MIT License. using System; -using System.Collections.Generic; using System.Diagnostics.Tracing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using DevHome.Telemetry; using Microsoft.Diagnostics.Telemetry; using Microsoft.Diagnostics.Telemetry.Internal; diff --git a/common/Views/AdaptiveCardViews/AdaptiveCardResourceTemplates.xaml b/common/Views/AdaptiveCardViews/AdaptiveCardResourceTemplates.xaml index d43ba0d760..90f6183f2c 100644 --- a/common/Views/AdaptiveCardViews/AdaptiveCardResourceTemplates.xaml +++ b/common/Views/AdaptiveCardViews/AdaptiveCardResourceTemplates.xaml @@ -4,19 +4,32 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cardModels="using:DevHome.Common.DevHomeAdaptiveCards.CardModels" - xmlns:controls="using:CommunityToolkit.WinUI.Controls"> + xmlns:controls="using:CommunityToolkit.WinUI.Controls" + xmlns:local="using:DevHome.Common.Views.AdaptiveCardViews" + xmlns:converters="using:CommunityToolkit.WinUI.Converters"> - + + - + + 40 + + - - + + - + diff --git a/src/Views/WhatsNewPage.xaml.cs b/src/Views/WhatsNewPage.xaml.cs index cc1cba1a80..6451818f7a 100644 --- a/src/Views/WhatsNewPage.xaml.cs +++ b/src/Views/WhatsNewPage.xaml.cs @@ -7,6 +7,7 @@ using DevHome.Common.Services; using DevHome.Common.TelemetryEvents; using DevHome.Common.TelemetryEvents.DeveloperId; +using DevHome.Common.Views; using DevHome.Models; using DevHome.SetupFlow.Utilities; using DevHome.Telemetry; @@ -17,17 +18,13 @@ namespace DevHome.Views; -public sealed partial class WhatsNewPage : Page +public sealed partial class WhatsNewPage : DevHomePage { private readonly Uri _devDrivePageKeyUri = new("ms-settings:disksandvolumes"); private readonly Uri _devDriveLearnMoreLinkUri = new("https://go.microsoft.com/fwlink/?linkid=2236041"); - private const string _devDriveLinkResourceKey = "WhatsNewPage_DevDriveCard/Link"; - private const string _accountsPageNavigationLink = "DevHome.Settings.ViewModels.AccountsViewModel"; + private const string DevDriveLinkResourceKey = "WhatsNewPage_DevDriveCard/Link"; - public WhatsNewViewModel ViewModel - { - get; - } + public WhatsNewViewModel ViewModel { get; } public WhatsNewPage() { @@ -56,7 +53,7 @@ private async void OnLoaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) { if (!DevDriveUtil.IsDevDriveFeatureEnabled) { - card.Button = Application.Current.GetService().GetLocalized(_devDriveLinkResourceKey); + card.ButtonText = Application.Current.GetService().GetLocalized(DevDriveLinkResourceKey); card.ShouldShowLink = false; } } @@ -88,12 +85,6 @@ private async void OnLoaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) MoveBigCardsIfNeeded(this.ActualWidth); } - private void MachineConfigButton_Click(object sender, RoutedEventArgs e) - { - var navigationService = Application.Current.GetService(); - navigationService.NavigateTo(typeof(DevHome.SetupFlow.ViewModels.SetupFlowViewModel).FullName!); - } - private async void Button_ClickAsync(object sender, RoutedEventArgs e) { var btn = sender as Button; @@ -116,12 +107,12 @@ private async void Button_ClickAsync(object sender, RoutedEventArgs e) } else { - if (pageKey.Equals(_accountsPageNavigationLink, StringComparison.OrdinalIgnoreCase)) + if (pageKey.Equals(typeof(Settings.ViewModels.AccountsViewModel).FullName, StringComparison.OrdinalIgnoreCase)) { TelemetryFactory.Get().Log( - "EntryPoint_DevId_Event", - LogLevel.Critical, - new EntryPointEvent(EntryPointEvent.EntryPoint.WhatsNewPage)); + "EntryPoint_DevId_Event", + LogLevel.Critical, + new EntryPointEvent(EntryPointEvent.EntryPoint.WhatsNewPage)); } var navigationService = Application.Current.GetService(); @@ -131,7 +122,7 @@ private async void Button_ClickAsync(object sender, RoutedEventArgs e) public void OnSizeChanged(object sender, SizeChangedEventArgs args) { - if ((Page)sender == this) + if (sender as Page == this) { MoveBigCardsIfNeeded(args.NewSize.Width); } @@ -148,12 +139,4 @@ private void MoveBigCardsIfNeeded(double newWidth) ViewModel.SwitchToLargerView(); } } - - public static class MyHelpers - { - public static Type GetType(object ele) - { - return ele.GetType(); - } - } } diff --git a/src/appsettings.json b/src/appsettings.json index 5cd6d71323..fdf37c44c6 100644 --- a/src/appsettings.json +++ b/src/appsettings.json @@ -34,7 +34,7 @@ ], "Enrich": [ "FromLogContext" ], "Properties": { - "SourceContext": "CoreWidgetExtension" + "SourceContext": "DevHome" } } } diff --git a/telemetry/DevHome.Telemetry.Native/DevHome.Telemetry.Native.vcxproj b/telemetry/DevHome.Telemetry.Native/DevHome.Telemetry.Native.vcxproj index d53e9ab336..3c1f4df143 100644 --- a/telemetry/DevHome.Telemetry.Native/DevHome.Telemetry.Native.vcxproj +++ b/telemetry/DevHome.Telemetry.Native/DevHome.Telemetry.Native.vcxproj @@ -6,6 +6,14 @@ + + Debug_FailFast + Win32 + + + Debug_FailFast + x64 + Debug Win32 @@ -45,6 +53,12 @@ v143 Unicode + + StaticLibrary + true + v143 + Unicode + StaticLibrary false @@ -58,6 +72,12 @@ v143 Unicode + + StaticLibrary + true + v143 + Unicode + StaticLibrary false @@ -73,12 +93,18 @@ + + + + + + @@ -95,6 +121,18 @@ true + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + Level3 @@ -123,6 +161,18 @@ true + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + Level3 diff --git a/telemetry/DevHome.Telemetry.Native/inc/DevHomeTelemetryProvider.h b/telemetry/DevHome.Telemetry.Native/inc/DevHomeTelemetryProvider.h index 541d6cd107..26ef921fbe 100644 --- a/telemetry/DevHome.Telemetry.Native/inc/DevHomeTelemetryProvider.h +++ b/telemetry/DevHome.Telemetry.Native/inc/DevHomeTelemetryProvider.h @@ -10,6 +10,32 @@ #define __WIL_TRACELOGGING_CONFIG_H #include +#define DEFINE_CRITICAL_DATA_EVENT_PARAM10( \ + EventId, VarType1, varName1, VarType2, varName2, VarType3, varName3, VarType4, varName4, VarType5, varName5, VarType6, varName6, VarType7, varName7, VarType8, varName8, VarType9, varName9, VarType10, varName10) \ + DEFINE_TRACELOGGING_EVENT_PARAM10( \ + EventId, \ + VarType1, \ + varName1, \ + VarType2, \ + varName2, \ + VarType3, \ + varName3, \ + VarType4, \ + varName4, \ + VarType5, \ + varName5, \ + VarType6, \ + varName6, \ + VarType7, \ + varName7, \ + VarType8, \ + varName8, \ + VarType9, \ + varName9, \ + VarType10, \ + varName10, \ + TraceLoggingKeyword(MICROSOFT_KEYWORD_CRITICAL_DATA)) + // [uuid(2e74ff65-bbda-5e80-4c0a-bd8320d4223b)] class DevHomeTelemetryProvider : public wil::TraceLoggingProvider { @@ -55,15 +81,15 @@ class DevHomeTelemetryProvider : public wil::TraceLoggingProvider ); } - DEFINE_TRACELOGGING_EVENT_PARAM4( - ComputerInfo, + DEFINE_CRITICAL_DATA_EVENT_PARAM4( + QuietBackgroundProcesses_ComputerInfo, DWORD, processorCount, PCWSTR, processor, PCWSTR, motherboard, DWORD, ram); - DEFINE_TRACELOGGING_EVENT_PARAM10( - SessionCategoryMetrics, + DEFINE_CRITICAL_DATA_EVENT_PARAM10( + QuietBackgroundProcesses_SessionCategoryMetrics, int, numProcesses_unknown, int, numProcesses_user, int, numProcesses_system, @@ -75,8 +101,8 @@ class DevHomeTelemetryProvider : public wil::TraceLoggingProvider int, totalCpuTimesByCategory_developer, int, totalCpuTimesByCategory_background); - DEFINE_TRACELOGGING_EVENT_PARAM10( - ProcessInfo, + DEFINE_CRITICAL_DATA_EVENT_PARAM10( + QuietBackgroundProcesses_ProcessInfo, int, reason, bool, isInSystem32, PCWSTR, processName, diff --git a/telemetry/DevHome.Telemetry/DevHome.Telemetry.csproj b/telemetry/DevHome.Telemetry/DevHome.Telemetry.csproj index bd827b8dcd..79f8844c9b 100644 --- a/telemetry/DevHome.Telemetry/DevHome.Telemetry.csproj +++ b/telemetry/DevHome.Telemetry/DevHome.Telemetry.csproj @@ -7,6 +7,7 @@ true TELEMETRYEVENTSOURCE_PUBLIC + Debug;Release;Debug_FailFast diff --git a/telemetry/DevHome.Telemetry/EmptyEvent.cs b/telemetry/DevHome.Telemetry/EmptyEvent.cs index a5f78cb5f7..373c42d800 100644 --- a/telemetry/DevHome.Telemetry/EmptyEvent.cs +++ b/telemetry/DevHome.Telemetry/EmptyEvent.cs @@ -3,7 +3,6 @@ using System; using System.Diagnostics.Tracing; -using Microsoft.Diagnostics.Telemetry; using Microsoft.Diagnostics.Telemetry.Internal; namespace DevHome.Telemetry; diff --git a/test/DevHome.Test.csproj b/test/DevHome.Test.csproj index cd32b9cfa3..6ab5a4a683 100644 --- a/test/DevHome.Test.csproj +++ b/test/DevHome.Test.csproj @@ -10,6 +10,7 @@ true true resources.pri + Debug;Release;Debug_FailFast diff --git a/test/TestClass.cs b/test/TestClass.cs index a67af0e1fb..14ddf9a67c 100644 --- a/test/TestClass.cs +++ b/test/TestClass.cs @@ -54,9 +54,9 @@ public void TestHelpersIngestion() } [TestMethod] - public void TestExperimentHelpers() + public void TestExperimentHelpers_UnrecognizedKey_ReturnFalse() { Microsoft.Internal.Windows.DevHome.Helpers.Experimentation.Experiment experiment = new(); - Assert.IsTrue(experiment.IsEnabled("Sample_FeatureStaging")); + Assert.IsFalse(experiment.IsEnabled("unknown_key")); } } diff --git a/tools/Customization/DevHome.Customization/DevHome.Customization.csproj b/tools/Customization/DevHome.Customization/DevHome.Customization.csproj index 993ba640cd..2e1d8e6bea 100644 --- a/tools/Customization/DevHome.Customization/DevHome.Customization.csproj +++ b/tools/Customization/DevHome.Customization/DevHome.Customization.csproj @@ -6,11 +6,12 @@ win-x86;win-x64;win-arm64 enable true + Debug;Release;Debug_FailFast - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -32,6 +33,8 @@ + + @@ -45,6 +48,10 @@ MSBuild:Compile $(DefaultXamlRuntime) + + MSBuild:Compile + $(DefaultXamlRuntime) + MSBuild:Compile $(DefaultXamlRuntime) @@ -53,9 +60,17 @@ MSBuild:Compile $(DefaultXamlRuntime) + + MSBuild:Compile + $(DefaultXamlRuntime) + $(DefineConstants);DEBUG + + + $(DefineConstants);DEBUG;DEBUG_FAILFAST + diff --git a/tools/Customization/DevHome.Customization/Extensions/PageExtensions.cs b/tools/Customization/DevHome.Customization/Extensions/PageExtensions.cs index 0973a53f63..579f16cdf2 100644 --- a/tools/Customization/DevHome.Customization/Extensions/PageExtensions.cs +++ b/tools/Customization/DevHome.Customization/Extensions/PageExtensions.cs @@ -13,5 +13,7 @@ public static void ConfigureCustomizationPages(this IPageService pageService) { pageService.Configure(); pageService.Configure(); + pageService.Configure(); + pageService.Configure(); } } diff --git a/tools/Customization/DevHome.Customization/Extensions/ServiceExtensions.cs b/tools/Customization/DevHome.Customization/Extensions/ServiceExtensions.cs index 1372f2b018..598cbbeaf7 100644 --- a/tools/Customization/DevHome.Customization/Extensions/ServiceExtensions.cs +++ b/tools/Customization/DevHome.Customization/Extensions/ServiceExtensions.cs @@ -28,6 +28,12 @@ public static IServiceCollection AddWindowsCustomization(this IServiceCollection services.AddTransient(); + services.AddSingleton(); + services.AddTransient(); + + services.AddSingleton(); + services.AddTransient(); + return services; } } diff --git a/tools/Customization/DevHome.Customization/Helpers/DevDriveCacheData.cs b/tools/Customization/DevHome.Customization/Helpers/DevDriveCacheData.cs index 8b9223c3cc..13654f754f 100644 --- a/tools/Customization/DevHome.Customization/Helpers/DevDriveCacheData.cs +++ b/tools/Customization/DevHome.Customization/Helpers/DevDriveCacheData.cs @@ -1,11 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace DevHome.Customization.Helpers; diff --git a/tools/Customization/DevHome.Customization/Models/DevDriveOptimizedData.cs b/tools/Customization/DevHome.Customization/Models/DevDriveOptimizedData.cs index bee3296c4b..6c9a56929f 100644 --- a/tools/Customization/DevHome.Customization/Models/DevDriveOptimizedData.cs +++ b/tools/Customization/DevHome.Customization/Models/DevDriveOptimizedData.cs @@ -1,12 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - namespace DevHome.Customization.Models; public class DevDriveOptimizedData diff --git a/tools/Customization/DevHome.Customization/Models/DevDriveTrustedData.cs b/tools/Customization/DevHome.Customization/Models/DevDriveTrustedData.cs index b3b147dc60..9c24438dc1 100644 --- a/tools/Customization/DevHome.Customization/Models/DevDriveTrustedData.cs +++ b/tools/Customization/DevHome.Customization/Models/DevDriveTrustedData.cs @@ -1,12 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - namespace DevHome.Customization.Models; public class DevDriveTrustedData diff --git a/tools/Customization/DevHome.Customization/Strings/en-us/Resources.resw b/tools/Customization/DevHome.Customization/Strings/en-us/Resources.resw index 7485d5d508..53354d6cc6 100644 --- a/tools/Customization/DevHome.Customization/Strings/en-us/Resources.resw +++ b/tools/Customization/DevHome.Customization/Strings/en-us/Resources.resw @@ -1,4 +1,4 @@ - + - @@ -22,4 +22,4 @@ - + diff --git a/tools/Customization/DevHome.Customization/Views/MainPage.xaml.cs b/tools/Customization/DevHome.Customization/Views/MainPage.xaml.cs index f598e173ec..9900d419c3 100644 --- a/tools/Customization/DevHome.Customization/Views/MainPage.xaml.cs +++ b/tools/Customization/DevHome.Customization/Views/MainPage.xaml.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using DevHome.Common; using DevHome.Common.Extensions; +using DevHome.Common.Views; using DevHome.Customization.ViewModels; using Microsoft.UI.Xaml; @@ -10,8 +10,6 @@ namespace DevHome.Customization.Views; public sealed partial class MainPage : ToolPage { - public override string ShortName => "Windows customization"; - public MainPageViewModel ViewModel { get; diff --git a/tools/Customization/DevHome.Customization/Views/MainPageView.xaml b/tools/Customization/DevHome.Customization/Views/MainPageView.xaml index 9e957a96f2..1b8e3a7097 100644 --- a/tools/Customization/DevHome.Customization/Views/MainPageView.xaml +++ b/tools/Customization/DevHome.Customization/Views/MainPageView.xaml @@ -5,12 +5,15 @@ xmlns:controls="using:CommunityToolkit.WinUI.Controls" xmlns:converters="using:CommunityToolkit.WinUI.Converters" xmlns:ui="using:CommunityToolkit.WinUI" + xmlns:i="using:Microsoft.Xaml.Interactivity" + xmlns:ic="using:Microsoft.Xaml.Interactions.Core" xmlns:views="using:DevHome.Customization.Views" - xmlns:quietviews="using:DevHome.QuietBackgroundProcesses.UI.Views" - Loaded="UserControl_Loaded"> - - - + xmlns:quietviews="using:DevHome.QuietBackgroundProcesses.UI.Views"> + + + + + @@ -25,19 +28,39 @@ IsClickEnabled="True" Margin="{ThemeResource SettingsCardMargin}"/> - - - - - - + + + + + + + + + + + + @@ -54,7 +77,7 @@ AutomationProperties.AutomationId="LaunchWindowsDeveloperSettingsButton" Command="{x:Bind ViewModel.LaunchWindowsDeveloperSettingsCommand}" HeaderIcon="{ui:FontIcon Glyph=}" - IsClickEnabled="True" + IsClickEnabled="True" Margin="{ThemeResource SettingsCardMargin}"/> diff --git a/tools/Customization/DevHome.Customization/Views/MainPageView.xaml.cs b/tools/Customization/DevHome.Customization/Views/MainPageView.xaml.cs index 953dd3aaa8..515674315d 100644 --- a/tools/Customization/DevHome.Customization/Views/MainPageView.xaml.cs +++ b/tools/Customization/DevHome.Customization/Views/MainPageView.xaml.cs @@ -22,9 +22,4 @@ public MainPageView() ViewModel = Application.Current.GetService(); this.DataContext = ViewModel; } - - private async void UserControl_Loaded(object sender, RoutedEventArgs e) - { - await ViewModel.LoadViewModelContentAsync(); - } } diff --git a/tools/Customization/DevHome.Customization/Views/ModifyFeaturesDialog.xaml b/tools/Customization/DevHome.Customization/Views/ModifyFeaturesDialog.xaml new file mode 100644 index 0000000000..780a05af9e --- /dev/null +++ b/tools/Customization/DevHome.Customization/Views/ModifyFeaturesDialog.xaml @@ -0,0 +1,30 @@ + + + + + + + diff --git a/tools/Customization/DevHome.Customization/Views/ModifyFeaturesDialog.xaml.cs b/tools/Customization/DevHome.Customization/Views/ModifyFeaturesDialog.xaml.cs new file mode 100644 index 0000000000..a66770dd27 --- /dev/null +++ b/tools/Customization/DevHome.Customization/Views/ModifyFeaturesDialog.xaml.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using CommunityToolkit.Mvvm.Input; +using DevHome.Customization.ViewModels; +using Microsoft.UI.Xaml.Controls; + +namespace DevHome.Customization.Views; + +public sealed partial class ModifyFeaturesDialog : ContentDialog +{ + public ModifyFeaturesDialogViewModel ViewModel { get; } + + public ModifyFeaturesDialog(IAsyncRelayCommand applyChangedCommand) + { + ViewModel = new ModifyFeaturesDialogViewModel(applyChangedCommand); + this.InitializeComponent(); + this.DataContext = ViewModel; + } + + private void OnPrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) + { + ViewModel.HandlePrimaryButton(); + } + + private void OnSecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) + { + ViewModel.HandleSecondaryButton(); + } +} diff --git a/tools/Customization/DevHome.Customization/Views/VirtualizationFeatureManagementPage.xaml b/tools/Customization/DevHome.Customization/Views/VirtualizationFeatureManagementPage.xaml new file mode 100644 index 0000000000..5f704ae0c2 --- /dev/null +++ b/tools/Customization/DevHome.Customization/Views/VirtualizationFeatureManagementPage.xaml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -350,4 +363,4 @@ - + diff --git a/tools/Environments/DevHome.Environments/Views/LandingPage.xaml.cs b/tools/Environments/DevHome.Environments/Views/LandingPage.xaml.cs index cc3ffb86b0..538087f93d 100644 --- a/tools/Environments/DevHome.Environments/Views/LandingPage.xaml.cs +++ b/tools/Environments/DevHome.Environments/Views/LandingPage.xaml.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using CommunityToolkit.Mvvm.Input; -using DevHome.Common; using DevHome.Common.Extensions; using DevHome.Common.Views; using DevHome.Environments.ViewModels; @@ -14,8 +13,6 @@ namespace DevHome.Environments.Views; public sealed partial class LandingPage : ToolPage { - public override string ShortName => "Environments"; - public LandingPageViewModel ViewModel { get; } public LandingPage() diff --git a/tools/Experiments/src/DevHome.Experiments.csproj b/tools/Experiments/src/DevHome.Experiments.csproj index 282fc72016..e136086506 100644 --- a/tools/Experiments/src/DevHome.Experiments.csproj +++ b/tools/Experiments/src/DevHome.Experiments.csproj @@ -5,6 +5,7 @@ x86;x64;arm64 win-x86;win-x64;win-arm64 true + Debug;Release;Debug_FailFast diff --git a/tools/Experiments/src/Views/TestExperimentPage.xaml b/tools/Experiments/src/Views/TestExperimentPage.xaml index f486b1bd64..0ff0f699f3 100644 --- a/tools/Experiments/src/Views/TestExperimentPage.xaml +++ b/tools/Experiments/src/Views/TestExperimentPage.xaml @@ -1,15 +1,15 @@ - - + diff --git a/tools/Experiments/src/Views/TestExperimentPage.xaml.cs b/tools/Experiments/src/Views/TestExperimentPage.xaml.cs index 7957848107..2f336fa0f4 100644 --- a/tools/Experiments/src/Views/TestExperimentPage.xaml.cs +++ b/tools/Experiments/src/Views/TestExperimentPage.xaml.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using DevHome.Common; +using DevHome.Common.Views; using DevHome.Experiments.ViewModels; namespace DevHome.Experiments.Views; @@ -11,8 +11,6 @@ namespace DevHome.Experiments.Views; /// public sealed partial class TestExperimentPage : ToolPage { - public override string ShortName => "TestExperiment1"; - public TestExperimentViewModel ViewModel { get; diff --git a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/DevHome.ExtensionLibrary.csproj b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/DevHome.ExtensionLibrary.csproj index c830fb85fa..365ec7f5cc 100644 --- a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/DevHome.ExtensionLibrary.csproj +++ b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/DevHome.ExtensionLibrary.csproj @@ -6,6 +6,7 @@ win-x86;win-x64;win-arm64 enable true + Debug;Release;Debug_FailFast @@ -45,4 +46,8 @@ $(DefineConstants);DEBUG + + + $(DefineConstants);DEBUG;DEBUG_FAILFAST + diff --git a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/ViewModels/ExtensionLibraryViewModel.cs b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/ViewModels/ExtensionLibraryViewModel.cs index 02e22967ad..5efa729773 100644 --- a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/ViewModels/ExtensionLibraryViewModel.cs +++ b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/ViewModels/ExtensionLibraryViewModel.cs @@ -19,6 +19,7 @@ using Windows.ApplicationModel; using Windows.Data.Json; using Windows.Storage; +using static DevHome.Common.Helpers.CommonConstants; namespace DevHome.ExtensionLibrary.ViewModels; @@ -35,7 +36,8 @@ public partial class ExtensionLibraryViewModel : ObservableObject // their class Ids to this set. private readonly HashSet _internalClassIdsToBeShownInExtensionsPage = new() { - CommonConstants.HyperVExtensionClassId, + HyperVExtensionClassId, + WSLExtensionClassId, }; public ObservableCollection StorePackagesList { get; set; } diff --git a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionLibraryView.xaml b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionLibraryView.xaml index e5fb69179e..347f7089b3 100644 --- a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionLibraryView.xaml +++ b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionLibraryView.xaml @@ -1,11 +1,10 @@ - - + diff --git a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionLibraryView.xaml.cs b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionLibraryView.xaml.cs index 8340f56877..1310e400a4 100644 --- a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionLibraryView.xaml.cs +++ b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionLibraryView.xaml.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using DevHome.Common; using DevHome.Common.Extensions; +using DevHome.Common.Views; using DevHome.ExtensionLibrary.ViewModels; using Microsoft.UI.Xaml; @@ -10,8 +10,6 @@ namespace DevHome.ExtensionLibrary.Views; public partial class ExtensionLibraryView : ToolPage { - public override string ShortName => "Extensions"; - public ExtensionLibraryViewModel ViewModel { get; } internal ExtensionLibraryBannerViewModel BannerViewModel { get; } diff --git a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionSettingsPage.xaml b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionSettingsPage.xaml index 21ad5e887d..cdffafd7a7 100644 --- a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionSettingsPage.xaml +++ b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionSettingsPage.xaml @@ -1,11 +1,11 @@ - - + - + - + diff --git a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionSettingsPage.xaml.cs b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionSettingsPage.xaml.cs index 416c81e33e..d165703230 100644 --- a/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionSettingsPage.xaml.cs +++ b/tools/ExtensionLibrary/DevHome.ExtensionLibrary/Views/ExtensionSettingsPage.xaml.cs @@ -2,13 +2,13 @@ // Licensed under the MIT License. using DevHome.Common.Extensions; +using DevHome.Common.Views; using DevHome.ExtensionLibrary.ViewModels; using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; namespace DevHome.ExtensionLibrary.Views; -public sealed partial class ExtensionSettingsPage : Page +public sealed partial class ExtensionSettingsPage : DevHomePage { public ExtensionSettingsViewModel ViewModel { get; } diff --git a/tools/PI/DevHome.PI.UnitTest/TestingScenarios/ProjectIronSides.md b/tools/PI/DevHome.PI.UnitTest/TestingScenarios/ProjectIronSides.md new file mode 100644 index 0000000000..d3333413e3 --- /dev/null +++ b/tools/PI/DevHome.PI.UnitTest/TestingScenarios/ProjectIronSides.md @@ -0,0 +1,28 @@ +# Project Ironsides Tests +If your code affects Project Ironsides, please manually verify these scenarios. + +## Scenarios +Please make sure to verify all of these scenarios. These apply to both Windows 10 and Windows 11. + +### First Run and First Setup Experience +1. PI: On Dev/Canary/Preview toggle Dev Home PI experimental feature on/off/on again to enable startup task +1. PI: Reboot and invoking PI with Win-F12 should launch it immediately. + +### Core Feature (Feature is Enabled and Configured) +1. PI: Attach to foreground app - Launch any app and Hit Win-F12, Validate app that is in foreground was selected in PI +1. PI: Close Bar Window, Hit Win-F12. Validate app that is in foreground was selected in PI. +1. PI Dock - Undock: Dock button should make PI vertical and dock to right side of the window +1. PI Dock - Undock: Hitting Dock button again should undock PI +1. PI Dock - Undock: Dragging PI window in vertival mode to right hand side of attached app should make PI dock to right side. +1. PI WinLogs: Remove yourself from Performance Log Users from lsusrmgr.ms, Log out and log back in to Windows +1. PI WinLogs: Validate that ETW logs are unchecked by default and checking them triggers a UAC prompt +1. PI WinLogs: Accept UAC prompt, Log Out and log back in, ETW logs should be checked by default. +1. PI WinLogs: Attach to an application and validate logs are working +1. PI WinLogs: Crash the app/end task from taskmanager and validate logs +1. PI WinLogs: ETW logs check box works. Example scenario - attach to notepad and close it. +1. PI WinLogs: Debug output check-box works. Example scenario - Attach to DevHome, go to Widgets page and add widgets like CPU and GPU +1. PI ProcessList Page: Filter text box works both for PIDs and process name +1. PI ProcessList Page: Click on any process and confirm PI attaches to that process. +1. PI ProcessList Page: After attaching to new process, verify that other pages have relevant info related to newly attached process. +1. PI System Process/Admin Process: Attach PI to Task Manager or other system process, verify that AppDetails and Modules page show "Run As Admin" button +1. PI System Process/Admin Process: Clicking on "Run As Admin" button should work. \ No newline at end of file diff --git a/tools/PI/DevHome.PI/Contracts/ViewModels/INavigationAware.cs b/tools/PI/DevHome.PI/Contracts/ViewModels/INavigationAware.cs index ee1eb1c7ec..e031f4957b 100644 --- a/tools/PI/DevHome.PI/Contracts/ViewModels/INavigationAware.cs +++ b/tools/PI/DevHome.PI/Contracts/ViewModels/INavigationAware.cs @@ -1,12 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - namespace DevHome.PI.Contracts.ViewModels; // Similar to DevHome.Contracts.ViewModels.INavigationAware diff --git a/tools/PI/DevHome.PI/Controls/AddToolControl.xaml b/tools/PI/DevHome.PI/Controls/AddToolControl.xaml index 672b6c1083..4d59b92304 100644 --- a/tools/PI/DevHome.PI/Controls/AddToolControl.xaml +++ b/tools/PI/DevHome.PI/Controls/AddToolControl.xaml @@ -5,6 +5,9 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls" + xmlns:models="using:DevHome.PI.Models" + xmlns:local="using:DevHome.PI.Controls" mc:Ignorable="d"> @@ -17,21 +20,64 @@ - + + + + + + + + + + + + + + + + + - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + diff --git a/tools/PI/DevHome.PI/Controls/ProgressTextRing.xaml b/tools/PI/DevHome.PI/Controls/ProgressTextRing.xaml new file mode 100644 index 0000000000..20b3df7c18 --- /dev/null +++ b/tools/PI/DevHome.PI/Controls/ProgressTextRing.xaml @@ -0,0 +1,32 @@ + + + + + + + + + + + diff --git a/tools/PI/DevHome.PI/Controls/ProgressTextRing.xaml.cs b/tools/PI/DevHome.PI/Controls/ProgressTextRing.xaml.cs new file mode 100644 index 0000000000..f9c3f6e7de --- /dev/null +++ b/tools/PI/DevHome.PI/Controls/ProgressTextRing.xaml.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System.ComponentModel; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; + +namespace DevHome.PI.Controls; + +public sealed partial class ProgressTextRing : UserControl, INotifyPropertyChanged +{ + public ProgressTextRing() + { + InitializeComponent(); + } + + public static readonly DependencyProperty IsActiveProperty = + DependencyProperty.Register(nameof(IsActive), typeof(bool), typeof(ProgressTextRing), new PropertyMetadata(false, OnIsActivePropertyChanged)); + + public bool IsActive + { + get => (bool)GetValue(IsActiveProperty); + set => SetValue(IsActiveProperty, value); + } + + private static void OnIsActivePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var control = (ProgressTextRing)d; + control.OnPropertyChanged(nameof(TextBlockVisibility)); + } + + public static readonly DependencyProperty DiameterProperty = + DependencyProperty.Register(nameof(Diameter), typeof(double), typeof(ProgressTextRing), new PropertyMetadata(0.0, OnDiameterPropertyChanged)); + + public double Diameter + { + get => (double)GetValue(DiameterProperty); + set => SetValue(DiameterProperty, value); + } + + private static void OnDiameterPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var control = (ProgressTextRing)d; + control.OnPropertyChanged(nameof(TextBlockFontSize)); + } + + public static readonly DependencyProperty ValueProperty = + DependencyProperty.Register(nameof(Value), typeof(double), typeof(ProgressTextRing), new PropertyMetadata(0.0, OnValuePropertyChanged)); + + public double Value + { + get => (double)GetValue(ValueProperty); + set => SetValue(ValueProperty, value); + } + + private static void OnValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var control = (ProgressTextRing)d; + control.OnPropertyChanged(nameof(PercentageText)); + } + + private Visibility TextBlockVisibility => IsActive ? Visibility.Visible : Visibility.Collapsed; + + private double TextBlockFontSize => FontSize > 0 ? FontSize : Diameter / 3.6; + + public string PercentageText => $"{Value}%"; + + public event PropertyChangedEventHandler? PropertyChanged; + + private void OnPropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } +} diff --git a/tools/PI/DevHome.PI/DevHome.PI.csproj b/tools/PI/DevHome.PI/DevHome.PI.csproj index d14a91b700..71c261c81a 100644 --- a/tools/PI/DevHome.PI/DevHome.PI.csproj +++ b/tools/PI/DevHome.PI/DevHome.PI.csproj @@ -16,6 +16,7 @@ true false $(DefineConstants);DISABLE_XAML_GENERATED_MAIN + Debug;Release;Debug_FailFast @@ -28,6 +29,7 @@ + @@ -80,7 +82,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -98,6 +100,18 @@ + + + tlbimp + 0 + 1 + f935dc20-1cf0-11d0-adb9-00c04fd58a0b + 0 + false + true + + + - + - - + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + - + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - + - - - - - - - - + + + - - - - + + + + + + + x:Name="LargeContentPanel" Visibility="Collapsed" Grid.Row="2" + BorderThickness="0" + VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> diff --git a/tools/PI/DevHome.PI/Views/BarWindowHorizontal.xaml.cs b/tools/PI/DevHome.PI/Views/BarWindowHorizontal.xaml.cs index 3b2b4946ab..7994d7d28d 100644 --- a/tools/PI/DevHome.PI/Views/BarWindowHorizontal.xaml.cs +++ b/tools/PI/DevHome.PI/Views/BarWindowHorizontal.xaml.cs @@ -2,9 +2,10 @@ // Licensed under the MIT License. using System; +using System.Collections.Specialized; using System.ComponentModel; +using System.Diagnostics; using System.Linq; -using System.Runtime.InteropServices; using DevHome.Common.Extensions; using DevHome.PI.Controls; using DevHome.PI.Helpers; @@ -16,6 +17,7 @@ using Microsoft.UI.Windowing; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; using Windows.Foundation; using Windows.UI.ViewManagement; using Windows.UI.WindowManagement; @@ -25,52 +27,65 @@ using Windows.Win32.UI.Shell.Common; using WinRT.Interop; using WinUIEx; +using static DevHome.PI.Helpers.CommonHelper; using static DevHome.PI.Helpers.WindowHelper; namespace DevHome.PI; public partial class BarWindowHorizontal : WindowEx { + private const string ExpandButtonText = "\ue70d"; // ChevronDown + private const string CollapseButtonText = "\ue70e"; // ChevronUp + private const string ManageToolsButtonText = "\uec7a"; // ChevronUp + + private readonly string _pinMenuItemText = CommonHelper.GetLocalizedString("PinMenuItemText"); + private readonly string _unpinMenuItemText = CommonHelper.GetLocalizedString("UnpinMenuItemRawText"); + private readonly string _unregisterMenuItemText = CommonHelper.GetLocalizedString("UnregisterMenuItemRawText"); + private readonly string _manageToolsMenuItemText = CommonHelper.GetLocalizedString("ManageExternalToolsMenuText"); + private readonly Settings _settings = Settings.Default; private readonly BarWindowViewModel _viewModel; private readonly UISettings _uiSettings = new(); - private bool isClosing; + private readonly SolidColorBrush _darkModeActiveCaptionBrush; + private readonly SolidColorBrush _darkModeDeactiveCaptionBrush; + private readonly SolidColorBrush _nonDarkModeActiveCaptionBrush; + private readonly SolidColorBrush _nonDarkModeDeactiveCaptionBrush; + + private bool _isClosing; + private WindowActivationState _currentActivationState = WindowActivationState.Deactivated; // Constants that control window sizes - private const int _WindowPositionOffsetY = 30; - private const int _FloatingHorizontalBarHeight = 70; - private const int _DefaultExpandedViewTop = 30; - private const int _DefaultExpandedViewLeft = 100; - private const int _RightSideGap = 10; + private const int WindowPositionOffsetY = 30; + private const int FloatingHorizontalBarHeight = 90; + private const int FloatingHorizontalBarHeightWithExpandedCommandBar = 130; + private const int DefaultExpandedViewTop = 30; + private const int DefaultExpandedViewLeft = 100; + private const int RightSideGap = 10; private RECT _monitorRect; private RestoreState _restoreState = new() { - Top = _DefaultExpandedViewTop, - Left = _DefaultExpandedViewLeft, + Top = DefaultExpandedViewTop, + Left = DefaultExpandedViewLeft, BarOrientation = Orientation.Horizontal, IsLargePanelVisible = true, }; - private const int _UnsnapGap = 9; private double _dpiScale = 1.0; internal HWND ThisHwnd { get; private set; } internal ClipboardMonitor? ClipboardMonitor { get; private set; } - public Microsoft.UI.Dispatching.DispatcherQueue TheDispatcher - { - get; set; - } + private readonly Microsoft.UI.Dispatching.DispatcherQueue _dispatcher; public BarWindowHorizontal(BarWindowViewModel model) { _viewModel = model; - TheDispatcher = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); + _dispatcher = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); InitializeComponent(); _viewModel.PropertyChanged += ViewModel_PropertyChanged; @@ -84,10 +99,24 @@ public BarWindowHorizontal(BarWindowViewModel model) var settingSize = Settings.Default.ExpandedLargeSize; _restoreState.Height = settingSize.Height; _restoreState.Width = settingSize.Width; + ExpandCollapseLayoutButtonText.Text = _viewModel.ShowingExpandedContent ? CollapseButtonText : ExpandButtonText; + + // Precreate the brushes for the caption buttons + // In Dark Mode, the active state is white, and the deactive state is translucent white + // In Light Mode, the active state is black, and the deactive state is translucent black + Windows.UI.Color color = Colors.White; + _darkModeActiveCaptionBrush = new SolidColorBrush(color); + color.A = 0x66; + _darkModeDeactiveCaptionBrush = new SolidColorBrush(color); + + color = Colors.Black; + _nonDarkModeActiveCaptionBrush = new SolidColorBrush(color); + color.A = 0x66; + _nonDarkModeDeactiveCaptionBrush = new SolidColorBrush(color); _uiSettings.ColorValuesChanged += (sender, args) => { - TheDispatcher.TryEnqueue(() => + _dispatcher.TryEnqueue(() => { ApplySystemThemeToCaptionButtons(); }); @@ -101,10 +130,12 @@ private void ViewModel_PropertyChanged(object? sender, PropertyChangedEventArgs if (_viewModel.ShowingExpandedContent) { ExpandLargeContentPanel(); + ExpandCollapseLayoutButtonText.Text = CollapseButtonText; } else { CollapseLargeContentPanel(); + ExpandCollapseLayoutButtonText.Text = ExpandButtonText; } } } @@ -125,13 +156,220 @@ private void MainPanel_Loaded(object sender, RoutedEventArgs e) SetRequestedTheme(t.Theme); // Calculate the DPI scale. - var monitor = PInvoke.MonitorFromWindow(ThisHwnd, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST); - PInvoke.GetScaleFactorForMonitor(monitor, out DEVICE_SCALE_FACTOR scaleFactor).ThrowOnFailure(); - _dpiScale = (double)scaleFactor / 100; + _dpiScale = GetDpiScaleForWindow(ThisHwnd); SetDefaultPosition(); SetRegionsForTitleBar(); + + PopulateCommandBar(); + ((INotifyCollectionChanged)ExternalToolsHelper.Instance.AllExternalTools).CollectionChanged += AllExternalTools_CollectionChanged; + + // Now that the position is set correctly show the window + this.Show(); + } + + public void PopulateCommandBar() + { + AddManageToolsOptionToCommandBar(); + + foreach (ExternalTool tool in ExternalToolsHelper.Instance.AllExternalTools) + { + AddToolToCommandBar(tool); + } + } + + private void AddToolToCommandBar(ExternalTool tool) + { + AppBarButton button = new AppBarButton + { + Label = tool.Name, + Tag = tool, + }; + + button.Icon = tool.MenuIcon; + + button.Click += _viewModel.ExternalToolButton_Click; + + MenuFlyout menu = new MenuFlyout(); + menu.Items.Add(tool.IsPinned ? CreateUnPinMenuItem(tool) : CreatePinMenuItem(tool)); + menu.Items.Add(CreateUnregisterMenuItem(tool)); + button.ContextFlyout = menu; + + // If a tool is pinned, we'll add it to the primary commands list, otherwise the secondary commands list + if (tool.IsPinned) + { + MyCommandBar.PrimaryCommands.Add(button); + } + else + { + MyCommandBar.SecondaryCommands.Add(button); + } + + tool.PropertyChanged += (sender, args) => + { + if (args.PropertyName == nameof(ExternalTool.MenuIcon)) + { + button.Icon = tool.MenuIcon; + } + else if (args.PropertyName == nameof(ExternalTool.IsPinned)) + { + // The command bar does not like to be updated when the overflow menu is open, so be sure to close it before manipulating elements. + MyCommandBar.IsOpen = false; + + // Flip the menu item from pin to unpin (or vice versa) + MenuFlyout menu = new MenuFlyout(); + menu.Items.Add(tool.IsPinned ? CreateUnPinMenuItem(tool) : CreatePinMenuItem(tool)); + menu.Items.Add(CreateUnregisterMenuItem(tool)); + button.ContextFlyout = menu; + + // If a tool is pinned, we'll add it to the primary commands list, otherwise the secondary commands list + if (tool.IsPinned) + { + MyCommandBar.SecondaryCommands.Remove(button); + MyCommandBar.PrimaryCommands.Add(button); + } + else + { + MyCommandBar.PrimaryCommands.Remove(button); + MyCommandBar.SecondaryCommands.Add(button); + } + + EvaluateLocationOfManageToolsButton(); + } + }; + } + + private void EvaluateLocationOfManageToolsButton() + { + // If there are pinned tools (registered as primary commands), then move the Manage Tools button to the secondary command list + if (MyCommandBar.PrimaryCommands.Count > 1 && + MyCommandBar.PrimaryCommands[0] is AppBarButton button && + button.Command == _viewModel.ManageExternalToolsButtonCommand) + { + MyCommandBar.PrimaryCommands.Remove(button); + AddManageToolsOptionToCommandBar(); + } + + // If we don't have any more primary commands, move the Manage Tools Option from the secondary commands to the primary commands + else if (MyCommandBar.PrimaryCommands.Count == 0) + { + // The first two items in the secondary commands list should be the tool management button and a separator + Debug.Assert(MyCommandBar.SecondaryCommands.Count >= 2 && MyCommandBar.SecondaryCommands[0] is AppBarButton toolsBtn && toolsBtn.Command == _viewModel.ManageExternalToolsButtonCommand, "Where did tools button go?"); + Debug.Assert(MyCommandBar.SecondaryCommands.Count >= 2 && MyCommandBar.SecondaryCommands[1] is AppBarSeparator, "Where did the separator go?"); + + MyCommandBar.SecondaryCommands.RemoveAt(1); + MyCommandBar.SecondaryCommands.RemoveAt(0); + AddManageToolsOptionToCommandBar(); + } + } + + private void AddManageToolsOptionToCommandBar() + { + // Put in the "manage tools" button + AppBarButton manageToolsButton = new AppBarButton + { + Label = _manageToolsMenuItemText, + Icon = new FontIcon() { Glyph = ManageToolsButtonText }, + Command = _viewModel.ManageExternalToolsButtonCommand, + }; + + // If there aren't any pinned tools, then put this in as a primary command + if (ExternalToolsHelper.Instance.FilteredExternalTools.Count == 0) + { + MyCommandBar.PrimaryCommands.Add(manageToolsButton); + } + else + { + // Otherwise, put this at the at the top of the secondary command list + MyCommandBar.SecondaryCommands.Insert(0, manageToolsButton); + MyCommandBar.SecondaryCommands.Insert(1, new AppBarSeparator()); + } + } + + private MenuFlyoutItem CreatePinMenuItem(ExternalTool tool) + { + MenuFlyoutItem pin = new MenuFlyoutItem + { + Text = _pinMenuItemText, + Command = tool.TogglePinnedStateCommand, + Icon = new FontIcon() { Glyph = tool.PinGlyph }, + }; + + return pin; + } + + private MenuFlyoutItem CreateUnPinMenuItem(ExternalTool tool) + { + MenuFlyoutItem unpin = new MenuFlyoutItem + { + Text = _unpinMenuItemText, + Command = tool.TogglePinnedStateCommand, + Icon = new FontIcon() { Glyph = tool.PinGlyph }, + }; + + return unpin; + } + + private MenuFlyoutItem CreateUnregisterMenuItem(ExternalTool tool) + { + MenuFlyoutItem unRegister = new MenuFlyoutItem + { + Text = _unregisterMenuItemText, + Command = tool.UnregisterToolCommand, + Icon = new FontIcon() { Glyph = "\uECC9" }, + }; + + return unRegister; + } + + private void AllExternalTools_CollectionChanged(object? sender, NotifyCollectionChangedEventArgs e) + { + switch (e.Action) + { + case NotifyCollectionChangedAction.Add: + { + if (e.NewItems is not null) + { + foreach (ExternalTool newItem in e.NewItems) + { + AddToolToCommandBar(newItem); + } + } + + break; + } + + case NotifyCollectionChangedAction.Remove: + { + Debug.Assert(e.OldItems is not null, "Why is old items null"); + foreach (ExternalTool oldItem in e.OldItems) + { + // Find this item in the command bar + AppBarButton? button = MyCommandBar.PrimaryCommands.OfType().FirstOrDefault(b => b.Tag == oldItem); + if (button is not null) + { + MyCommandBar.PrimaryCommands.Remove(button); + } + else + { + button = MyCommandBar.SecondaryCommands.OfType().FirstOrDefault(b => b.Tag == oldItem); + if (button is not null) + { + MyCommandBar.SecondaryCommands.Remove(button); + } + else + { + Debug.Assert(false, "Could not find button for tool"); + } + } + } + + break; + } + } + + EvaluateLocationOfManageToolsButton(); } public void SetRegionsForTitleBar() @@ -155,11 +393,11 @@ public void SetRegionsForTitleBar() private void SetDefaultPosition() { // If attached to an app it should show up on the monitor that the app is on - _monitorRect = GetMonitorRectForWindow(_viewModel.ApplicationHwnd ?? ThisHwnd); + _monitorRect = GetMonitorRectForWindow(_viewModel.ApplicationHwnd ?? TryGetParentProcessHWND() ?? ThisHwnd); var screenWidth = _monitorRect.right - _monitorRect.left; this.Move( (int)((screenWidth - (Width * _dpiScale)) / 2) + _monitorRect.left, - (int)_WindowPositionOffsetY); + (int)WindowPositionOffsetY + _monitorRect.top); // Get the saved settings for the ExpandedView size. On first run, this will be // the default 0,0, so we'll set the size proportional to the monitor size. @@ -183,6 +421,13 @@ private void SetDefaultPosition() _restoreState.Width = settingSize.Width; } + internal void UpdatePositionFromHwnd(HWND hwnd) + { + RECT rect; + PInvoke.GetWindowRect(hwnd, out rect); + this.Move(rect.left, rect.top); + } + private void WindowEx_Closed(object sender, WindowEventArgs args) { ClipboardMonitor.Instance.Stop(); @@ -194,13 +439,16 @@ private void WindowEx_Closed(object sender, WindowEventArgs args) CacheRestoreState(); } - if (!isClosing) + if (!_isClosing) { - isClosing = true; + _isClosing = true; var barWindow = Application.Current.GetService().DBarWindow; barWindow?.Close(); - isClosing = false; + _isClosing = false; } + + // Unsubscribe from the activation handler + Activated -= Window_Activated; } private void Settings_PropertyChanged(object? sender, PropertyChangedEventArgs e) @@ -261,33 +509,22 @@ private void ExpandLargeContentPanel() LargeContentPanel.Visibility = Visibility.Visible; MaxHeight = double.NaN; - // If they expand to ExpandedView and they're not snapped, we can use the - // RestoreState size & position. - if (!_viewModel.IsSnapped) - { - this.MoveAndResize( - _restoreState.Left, _restoreState.Top, _restoreState.Width, _restoreState.Height); - } - else - { - // Conversely if they're snapped, the position is determined by the snap, - // and we potentially adjust the size to ensure it doesn't extend beyond the screen. - var availableWidth = _monitorRect.Width - Math.Abs(AppWindow.Position.X) - _RightSideGap; - if (availableWidth < _restoreState.Width) - { - _restoreState.Width = availableWidth; - } + var monitorRect = GetMonitorRectForWindow(ThisHwnd); + var dpiScale = GetDpiScaleForWindow(ThisHwnd); - Width = _restoreState.Width; + // Expand the window but keep the x,y coordinates of top-left most corner of the window the same so it doesn't + // jump around the screen. + var availableWidth = monitorRect.Width - Math.Abs(AppWindow.Position.X - monitorRect.left) - RightSideGap; + _restoreState.Width = (int)((double)availableWidth / dpiScale); - var availableHeight = _monitorRect.Height - Math.Abs(AppWindow.Position.Y); - if (availableHeight < _restoreState.Height) - { - _restoreState.Height = availableHeight; - } + Width = _restoreState.Width; - Height = _restoreState.Height; - } + var availableHeight = monitorRect.Height - Math.Abs(AppWindow.Position.Y - monitorRect.top); + + _restoreState.Height = (int)((double)availableHeight / dpiScale); + + this.MoveAndResize( + AppWindow.Position.X, AppWindow.Position.Y, _restoreState.Width, _restoreState.Height); } private void CollapseLargeContentPanel() @@ -295,7 +532,7 @@ private void CollapseLargeContentPanel() // Make sure we cache the state before switching to collapsed bar. CacheRestoreState(); LargeContentPanel.Visibility = Visibility.Collapsed; - MaxHeight = _FloatingHorizontalBarHeight; + SetBarToDefaultHeight(); } internal void NavigateTo(Type viewModelType) @@ -320,7 +557,7 @@ private void MainPanel_SizeChanged(object sender, SizeChangedEventArgs e) SetRegionsForTitleBar(); } - // workaround as Appwindow titlebar doesn't update caption button colors correctly when changed while app is running + // workaround as AppWindow TitleBar doesn't update caption button colors correctly when changed while app is running // https://task.ms/44172495 public void ApplySystemThemeToCaptionButtons() { @@ -344,8 +581,68 @@ public void ApplySystemThemeToCaptionButtons() public void SetCaptionButtonColors(Windows.UI.Color color) { - var res = Application.Current.Resources; - res["WindowCaptionForeground"] = color; AppWindow.TitleBar.ButtonForegroundColor = color; + UpdateCustomTitleBarButtonsTextColor(); + } + + private void Window_Activated(object sender, WindowActivatedEventArgs args) + { + // This follows the design guidance of dimming our title bar elements when the window isn't activated + // https://learn.microsoft.com/en-us/windows/apps/develop/title-bar#dim-the-title-bar-when-the-window-is-inactive + _currentActivationState = args.WindowActivationState; + UpdateCustomTitleBarButtonsTextColor(); + } + + private void UpdateCustomTitleBarButtonsTextColor() + { + FrameworkElement? rootElement = Content as FrameworkElement; + Debug.Assert(rootElement != null, "Expected Content to be a FrameworkElement"); + + if (_currentActivationState == WindowActivationState.Deactivated) + { + SolidColorBrush brush = (rootElement.ActualTheme == ElementTheme.Dark) ? _darkModeDeactiveCaptionBrush : _nonDarkModeDeactiveCaptionBrush; + + SnapButtonText.Foreground = brush; + ExpandCollapseLayoutButtonText.Foreground = brush; + RotateLayoutButtonText.Foreground = brush; + } + else + { + SolidColorBrush brush = (rootElement.ActualTheme == ElementTheme.Dark) ? _darkModeActiveCaptionBrush : _nonDarkModeActiveCaptionBrush; + + SnapButtonText.Foreground = brush; + ExpandCollapseLayoutButtonText.Foreground = brush; + RotateLayoutButtonText.Foreground = brush; + } + } + + private void SetBarToDefaultHeight() + { + if (!_viewModel.ShowingExpandedContent) + { + this.Height = FloatingHorizontalBarHeight; + this.MaxHeight = FloatingHorizontalBarHeight; + this.MinHeight = FloatingHorizontalBarHeight; + this.AppWindow.Resize(new Windows.Graphics.SizeInt32(this.AppWindow.Size.Width, FloatingHorizontalBarHeight)); + } + } + + // CommandBar has an issue where, if the overflow menu opens and the app's window size is too small, + // the overflow menu will always appear above the app window and will go off screen. Bug has been filed, + // but in the meantime, we'll adjust our window's size to when the overflow menu opens, and set it back + // to default after it is closed in order to work around this issue. + private void MyCommandBar_Opening(object sender, object e) + { + if (!_viewModel.ShowingExpandedContent) + { + this.Height = FloatingHorizontalBarHeightWithExpandedCommandBar; + this.MaxHeight = FloatingHorizontalBarHeightWithExpandedCommandBar; + this.MinHeight = FloatingHorizontalBarHeightWithExpandedCommandBar; + } + } + + private void MyCommandBar_Closing(object sender, object e) + { + SetBarToDefaultHeight(); } } diff --git a/tools/PI/DevHome.PI/Views/BarWindowVertical.xaml b/tools/PI/DevHome.PI/Views/BarWindowVertical.xaml index 4ae1cfb67e..84dac185a8 100644 --- a/tools/PI/DevHome.PI/Views/BarWindowVertical.xaml +++ b/tools/PI/DevHome.PI/Views/BarWindowVertical.xaml @@ -9,52 +9,25 @@ xmlns:controls="using:DevHome.PI.Controls" xmlns:helpers="using:DevHome.PI.Helpers" mc:Ignorable="d" - Title="" MinHeight="700" MinWidth="70" MaxWidth="70" Width="70" Height="700" + Title="" MinHeight="500" MinWidth="72" MaxWidth="72" Width="72" Height="700" TaskBarIcon="Images/pi.ico" IsTitleBarVisible="False" IsAlwaysOnTop="{x:Bind _viewModel.IsAlwaysOnTop, Mode=OneWay}" Closed="WindowEx_Closed"> - - - - - - - - - - - - + - - - - + + + + + + + + + + + + @@ -88,19 +96,13 @@ - - - + + - - - - + + + - - - - - + + + + diff --git a/tools/PI/DevHome.PI/Views/BarWindowVertical.xaml.cs b/tools/PI/DevHome.PI/Views/BarWindowVertical.xaml.cs index f7f12219ba..f867cf0ea8 100644 --- a/tools/PI/DevHome.PI/Views/BarWindowVertical.xaml.cs +++ b/tools/PI/DevHome.PI/Views/BarWindowVertical.xaml.cs @@ -3,9 +3,8 @@ using System; using System.ComponentModel; -using System.Diagnostics; using System.Linq; -using DevHome.Common.Extensions; +using DevHome.Common.Extensions; using DevHome.PI.Helpers; using DevHome.PI.Models; using DevHome.PI.Properties; @@ -15,10 +14,14 @@ using Microsoft.UI.Xaml.Input; using Windows.UI.WindowManagement; using Windows.Win32; -using Windows.Win32.Foundation; +using Windows.Win32.Foundation; +using Windows.Win32.Graphics.Gdi; +using Windows.Win32.UI.Shell.Common; using Windows.Win32.UI.WindowsAndMessaging; using WinRT.Interop; -using WinUIEx; +using WinUIEx; + +using static DevHome.PI.Helpers.CommonHelper; using static DevHome.PI.Helpers.WindowHelper; namespace DevHome.PI; @@ -26,30 +29,27 @@ namespace DevHome.PI; public partial class BarWindowVertical : WindowEx { private readonly Settings _settings = Settings.Default; - private readonly string _errorTitleText = CommonHelper.GetLocalizedString("ToolLaunchErrorTitle"); - private readonly string _errorMessageText = CommonHelper.GetLocalizedString("ToolLaunchErrorMessage"); private readonly BarWindowViewModel _viewModel; private int _cursorPosX; // = 0; private int _cursorPosY; // = 0; private int _appWindowPosX; // = 0; private int _appWindowPosY; // = 0; - private bool isWindowMoving; // = false; - private bool isClosing; + private bool _isWindowMoving; // = false; + private bool _isClosing; + + private double _dpiScale = 1.0; internal HWND ThisHwnd { get; private set; } - public Microsoft.UI.Dispatching.DispatcherQueue TheDispatcher - { - get; set; - } + private readonly Microsoft.UI.Dispatching.DispatcherQueue _dispatcher; public BarWindowVertical(BarWindowViewModel model) { _viewModel = model; // The main constructor is used in all cases, including when there's no target window. - TheDispatcher = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); + _dispatcher = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); InitializeComponent(); _viewModel.PropertyChanged += ViewModel_PropertyChanged; @@ -66,11 +66,25 @@ private void MainPanel_Loaded(object sender, RoutedEventArgs e) RemoveThickFrameAttribute(); // Regardless of what is set in the XAML, our initial window width is too big. Setting this to 70 (same as the XAML file) - Width = 70; - } - + Width = 70; + + // Calculate the DPI scale. + _dpiScale = GetDpiScaleForWindow(ThisHwnd); + + SetDefaultPosition(); + } + + private void SetDefaultPosition() + { + // If attached to an app it should show up on the monitor that the app is on + var monitorRect = GetMonitorRectForWindow(_viewModel.ApplicationHwnd ?? TryGetParentProcessHWND() ?? ThisHwnd); + this.Move( + monitorRect.left + (int)(70 * _dpiScale), + monitorRect.top + (int)(70 * _dpiScale)); + } + private void RemoveThickFrameAttribute() - { + { // This is a workaround for this issue // https://github.com/microsoft/microsoft-ui-xaml/issues/8947 // @@ -78,7 +92,7 @@ private void RemoveThickFrameAttribute() var style = PInvoke.GetWindowLong(ThisHwnd, WINDOW_LONG_PTR_INDEX.GWL_STYLE); style &= ~(int)WINDOW_STYLE.WS_THICKFRAME; _ = PInvoke.SetWindowLong(ThisHwnd, WINDOW_LONG_PTR_INDEX.GWL_STYLE, style); - PInvoke.SetWindowPos(ThisHwnd, HWND.Null, 0, 0, 0, 0, Windows.Win32.UI.WindowsAndMessaging.SET_WINDOW_POS_FLAGS.SWP_FRAMECHANGED | SET_WINDOW_POS_FLAGS.SWP_NOSIZE | SET_WINDOW_POS_FLAGS.SWP_NOMOVE | SET_WINDOW_POS_FLAGS.SWP_NOZORDER | SET_WINDOW_POS_FLAGS.SWP_NOOWNERZORDER); + PInvoke.SetWindowPos(ThisHwnd, HWND.Null, 0, 0, 0, 0, SET_WINDOW_POS_FLAGS.SWP_FRAMECHANGED | SET_WINDOW_POS_FLAGS.SWP_NOSIZE | SET_WINDOW_POS_FLAGS.SWP_NOMOVE | SET_WINDOW_POS_FLAGS.SWP_NOZORDER | SET_WINDOW_POS_FLAGS.SWP_NOOWNERZORDER); } private void ViewModel_PropertyChanged(object? sender, PropertyChangedEventArgs e) @@ -87,17 +101,28 @@ private void ViewModel_PropertyChanged(object? sender, PropertyChangedEventArgs { this.Move(_viewModel.WindowPosition.X, _viewModel.WindowPosition.Y); } + else if (string.Equals(e.PropertyName, nameof(BarWindowViewModel.RequestedWindowSize), StringComparison.OrdinalIgnoreCase)) + { + Height = _viewModel.RequestedWindowSize.Height - 6; // 6 is a magic number that we lose due to removing the Thick Frame attribute + } } private void WindowEx_Closed(object sender, WindowEventArgs args) { - if (!isClosing) + if (!_isClosing) { - isClosing = true; + _isClosing = true; var barWindow = Application.Current.GetService().DBarWindow; barWindow?.Close(); - isClosing = false; + _isClosing = false; } + } + + internal void UpdatePositionFromHwnd(HWND hwnd) + { + RECT rect; + PInvoke.GetWindowRect(hwnd, out rect); + this.Move(rect.left, rect.top); } internal void SetRequestedTheme(ElementTheme theme) @@ -118,7 +143,7 @@ private void CloseButton_Click(object sender, RoutedEventArgs e) private void Window_PointerReleased(object sender, PointerRoutedEventArgs e) { ((UIElement)sender).ReleasePointerCaptures(); - isWindowMoving = false; + _isWindowMoving = false; // If we're occupying the same space as the target window, and we're not in medium/large mode, snap to the app if (!_viewModel.IsSnapped && TargetAppData.Instance.HWnd != HWND.Null) @@ -141,7 +166,7 @@ private void Window_PointerPressed(object sender, PointerRoutedEventArgs e) _viewModel.UnsnapBarWindow(); } - isWindowMoving = true; + _isWindowMoving = true; ((UIElement)sender).CapturePointer(e.Pointer); _appWindowPosX = AppWindow.Position.X; _appWindowPosY = AppWindow.Position.Y; @@ -153,7 +178,7 @@ private void Window_PointerPressed(object sender, PointerRoutedEventArgs e) private void Window_PointerMoved(object sender, PointerRoutedEventArgs e) { - if (isWindowMoving) + if (_isWindowMoving) { var properties = e.GetCurrentPoint((UIElement)sender).Properties; if (properties.IsLeftButtonPressed) diff --git a/tools/PI/DevHome.PI/Views/PrimaryWindow.xaml.cs b/tools/PI/DevHome.PI/Views/PrimaryWindow.xaml.cs index d314669466..88d57f65f0 100644 --- a/tools/PI/DevHome.PI/Views/PrimaryWindow.xaml.cs +++ b/tools/PI/DevHome.PI/Views/PrimaryWindow.xaml.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.ComponentModel; using System.Diagnostics; using DevHome.PI.Helpers; using DevHome.PI.Models; @@ -12,7 +11,6 @@ using Microsoft.UI.Xaml; using Windows.System; using Windows.Win32; -using Windows.Win32.Foundation; using Windows.Win32.UI.Input.KeyboardAndMouse; using WinUIEx; using static DevHome.PI.Helpers.WindowHelper; @@ -24,7 +22,7 @@ public sealed partial class PrimaryWindow : WindowEx private const VirtualKey HotKey = VirtualKey.F12; private const HOT_KEY_MODIFIERS KeyModifier = HOT_KEY_MODIFIERS.MOD_WIN; - private HotKeyHelper? hotKeyHelper; + private HotKeyHelper? _hotKeyHelper; public BarWindow? DBarWindow { get; private set; } @@ -54,16 +52,15 @@ public void ClearBarWindow() private void Window_Loaded(object sender, RoutedEventArgs e) { - hotKeyHelper = new(this, HandleHotKey); - hotKeyHelper.RegisterHotKey(HotKey, KeyModifier); - App.Log("DevHome.PI_MainWindows_Loaded", LogLevel.Measure); + _hotKeyHelper = new(this, HandleHotKey); + _hotKeyHelper.RegisterHotKey(HotKey, KeyModifier); } private void WindowEx_Closed(object sender, WindowEventArgs args) { DBarWindow?.Close(); - hotKeyHelper?.UnregisterHotKey(); + _hotKeyHelper?.UnregisterHotKey(); } public void HandleHotKey(int keyId) diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Common/DevHome.QuietBackgroundProcesses.Common.vcxproj b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Common/DevHome.QuietBackgroundProcesses.Common.vcxproj index 1ee96ed452..bbdd8af811 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Common/DevHome.QuietBackgroundProcesses.Common.vcxproj +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Common/DevHome.QuietBackgroundProcesses.Common.vcxproj @@ -7,7 +7,6 @@ Utlity - true true true @@ -27,6 +26,22 @@ + + Debug_FailFast + ARM + + + Debug_FailFast + ARM64 + + + Debug_FailFast + Win32 + + + Debug_FailFast + x64 + Debug ARM @@ -73,6 +88,10 @@ true true + + true + true + false true @@ -133,6 +152,12 @@ Disabled + + + _DEBUG;%(PreprocessorDefinitions) + Disabled + + NDEBUG;%(PreprocessorDefinitions) diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer.Projection/DevHome.QuietBackgroundProcesses.ElevatedServer.Projection.csproj b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer.Projection/DevHome.QuietBackgroundProcesses.ElevatedServer.Projection.csproj index b792576ee9..7293c0f8af 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer.Projection/DevHome.QuietBackgroundProcesses.ElevatedServer.Projection.csproj +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer.Projection/DevHome.QuietBackgroundProcesses.ElevatedServer.Projection.csproj @@ -9,6 +9,7 @@ x86;x64;arm64 win-x86;win-x64;win-arm64 $(CppBaseOutDir)\DevHome.QuietBackgroundProcesses.Common\ + Debug;Release;Debug_FailFast diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/DevHome.QuietBackgroundProcesses.ElevatedServer.vcxproj b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/DevHome.QuietBackgroundProcesses.ElevatedServer.vcxproj index 388c55fdb7..d92583dca3 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/DevHome.QuietBackgroundProcesses.ElevatedServer.vcxproj +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/DevHome.QuietBackgroundProcesses.ElevatedServer.vcxproj @@ -5,7 +5,7 @@ - + true true @@ -27,6 +27,22 @@ + + Debug_FailFast + ARM + + + Debug_FailFast + ARM64 + + + Debug_FailFast + Win32 + + + Debug_FailFast + x64 + Debug ARM @@ -76,6 +92,10 @@ true true + + true + true + false true @@ -125,6 +145,12 @@ Disabled + + + _DEBUG;%(PreprocessorDefinitions) + Disabled + + NDEBUG;%(PreprocessorDefinitions) @@ -178,6 +204,6 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/Helpers.cpp b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/Helpers.cpp index dcd89805df..0af73613af 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/Helpers.cpp +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/Helpers.cpp @@ -131,7 +131,7 @@ void UploadPerformanceDataTelemetry(std::chrono::milliseconds samplingPeriod, co // Upload computer information auto computerInformation = GetComputerInformation(); - activity.ComputerInfo( + activity.QuietBackgroundProcesses_ComputerInfo( computerInformation.processorCount, computerInformation.processor.c_str(), computerInformation.motherboard.c_str(), @@ -147,7 +147,7 @@ void UploadPerformanceDataTelemetry(std::chrono::milliseconds samplingPeriod, co } // Upload category metrics - activity.SessionCategoryMetrics( + activity.QuietBackgroundProcesses_SessionCategoryMetrics( numProcesses[0], numProcesses[1], numProcesses[2], @@ -198,10 +198,17 @@ void UploadPerformanceDataTelemetry(std::chrono::milliseconds samplingPeriod, co continue; } - activity.ProcessInfo( + // Report process name with service name in telemetry + auto processNameTelemetry = std::wstring(item.name); + if (item.serviceName) + { + processNameTelemetry += std::wstring{} + L" (" + item.serviceName + L")"; + } + + activity.QuietBackgroundProcesses_ProcessInfo( reason, wil::compare_string_ordinal(item.path, system32Path, true) == 0, - item.name, + processNameTelemetry.c_str(), item.category, item.packageFullName, diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/packages.config b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/packages.config index b8f17060fc..4d87f2a61e 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/packages.config +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.ElevatedServer/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.PerformanceRecorderEngine/DevHome.QuietBackgroundProcesses.PerformanceRecorderEngine.vcxproj b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.PerformanceRecorderEngine/DevHome.QuietBackgroundProcesses.PerformanceRecorderEngine.vcxproj index d9807465b4..e34d2dd142 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.PerformanceRecorderEngine/DevHome.QuietBackgroundProcesses.PerformanceRecorderEngine.vcxproj +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.PerformanceRecorderEngine/DevHome.QuietBackgroundProcesses.PerformanceRecorderEngine.vcxproj @@ -6,6 +6,18 @@ + + Debug_FailFast + ARM64 + + + Debug_FailFast + Win32 + + + Debug_FailFast + x64 + Debug ARM64 @@ -50,16 +62,31 @@ true v143 + + DynamicLibrary + true + v143 + DynamicLibrary true v143 + + DynamicLibrary + true + v143 + DynamicLibrary true v143 + + DynamicLibrary + true + v143 + DynamicLibrary false @@ -87,18 +114,27 @@ + + + + + + + + + @@ -108,6 +144,10 @@ false false + + false + false + false false @@ -116,6 +156,10 @@ false false + + false + false + false false @@ -124,6 +168,10 @@ false false + + false + false + false false @@ -147,6 +195,12 @@ Disabled + + + _DEBUG;%(PreprocessorDefinitions) + Disabled + + NDEBUG;%(PreprocessorDefinitions) @@ -165,10 +219,13 @@ Create + Create Create Create + Create Create Create + Create Create diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Server/DevHome.QuietBackgroundProcesses.Server.vcxproj b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Server/DevHome.QuietBackgroundProcesses.Server.vcxproj index 18921b5ff6..6089f01bd0 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Server/DevHome.QuietBackgroundProcesses.Server.vcxproj +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Server/DevHome.QuietBackgroundProcesses.Server.vcxproj @@ -3,7 +3,7 @@ C++ - + @@ -26,6 +26,22 @@ + + Debug_FailFast + ARM + + + Debug_FailFast + ARM64 + + + Debug_FailFast + Win32 + + + Debug_FailFast + x64 + Debug ARM @@ -72,6 +88,10 @@ true true + + true + true + false true @@ -131,6 +151,12 @@ Disabled + + + _DEBUG;%(PreprocessorDefinitions) + Disabled + + NDEBUG;%(PreprocessorDefinitions) @@ -170,6 +196,6 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Server/packages.config b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Server/packages.config index 3541db9593..41b2cb59a0 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Server/packages.config +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.Server/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.UI/DevHome.QuietBackgroundProcesses.UI.csproj b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.UI/DevHome.QuietBackgroundProcesses.UI.csproj index 74f170c199..de04195dc4 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.UI/DevHome.QuietBackgroundProcesses.UI.csproj +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.UI/DevHome.QuietBackgroundProcesses.UI.csproj @@ -7,6 +7,7 @@ win-x86;win-x64;win-arm64 true enable + Debug;Release;Debug_FailFast diff --git a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.UI/ProcessData.cs b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.UI/ProcessData.cs index 188d506072..01e898712e 100644 --- a/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.UI/ProcessData.cs +++ b/tools/QuietBackgroundProcesses/DevHome.QuietBackgroundProcesses.UI/ProcessData.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using Microsoft.UI.Xaml.Automation; namespace DevHome.QuietBackgroundProcesses.UI; diff --git a/tools/SampleTool/src/SampleTool.csproj b/tools/SampleTool/src/SampleTool.csproj index 76f91517f6..5f40d28d61 100644 --- a/tools/SampleTool/src/SampleTool.csproj +++ b/tools/SampleTool/src/SampleTool.csproj @@ -5,6 +5,7 @@ x86;x64;arm64 win-x86;win-x64;win-arm64 true + Debug;Release;Debug_FailFast diff --git a/tools/SampleTool/src/Views/SampleToolPage.xaml b/tools/SampleTool/src/Views/SampleToolPage.xaml index c2e0ccbba8..09d974d603 100644 --- a/tools/SampleTool/src/Views/SampleToolPage.xaml +++ b/tools/SampleTool/src/Views/SampleToolPage.xaml @@ -1,11 +1,11 @@ - - + diff --git a/tools/SampleTool/src/Views/SampleToolPage.xaml.cs b/tools/SampleTool/src/Views/SampleToolPage.xaml.cs index e1de9e3b45..7b8dbefa66 100644 --- a/tools/SampleTool/src/Views/SampleToolPage.xaml.cs +++ b/tools/SampleTool/src/Views/SampleToolPage.xaml.cs @@ -1,15 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using DevHome.Common; +using DevHome.Common.Views; using Tools.SampleTool.ViewModels; namespace Tools.SampleTool.Views; public partial class SampleToolPage : ToolPage { - public override string ShortName => "SampleTool"; - public SampleToolViewModel ViewModel { get; diff --git a/tools/SampleTool/unittest/SampleTool.UnitTest.csproj b/tools/SampleTool/unittest/SampleTool.UnitTest.csproj index 49961984f3..390eb3df07 100644 --- a/tools/SampleTool/unittest/SampleTool.UnitTest.csproj +++ b/tools/SampleTool/unittest/SampleTool.UnitTest.csproj @@ -10,6 +10,7 @@ true true resources.pri + Debug;Release;Debug_FailFast diff --git a/tools/SetupFlow/DevHome.SetupFlow.Common/Configuration/ConfigurationFileHelper.cs b/tools/SetupFlow/DevHome.SetupFlow.Common/Configuration/ConfigurationFileHelper.cs deleted file mode 100644 index 4c50229b2a..0000000000 --- a/tools/SetupFlow/DevHome.SetupFlow.Common/Configuration/ConfigurationFileHelper.cs +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using DevHome.SetupFlow.Common.Exceptions; -using DevHome.SetupFlow.Common.Helpers; -using DevHome.SetupFlow.Common.TelemetryEvents; -using DevHome.Telemetry; -using Microsoft.Management.Configuration; -using Serilog; -using Windows.Storage; -using Windows.Storage.Streams; - -namespace DevHome.SetupFlow.Common.Configuration; - -/// -/// Helper for applying a configuration file. This exists so that we can -/// use it in an elevated or non-elevated context. -/// -public class ConfigurationFileHelper -{ - public class ApplicationResult - { - public ApplyConfigurationSetResult Result - { - get; - } - - public bool Succeeded => Result.ResultCode == null; - - public bool RequiresReboot => Result.UnitResults.Any(result => result.RebootRequired); - - public Exception ResultException => Result.ResultCode; - - public ApplicationResult(ApplyConfigurationSetResult result) - { - Result = result; - } - } - - private readonly ILogger _log = Log.ForContext("SourceContext", nameof(ConfigurationFileHelper)); - private const string PowerShellHandlerIdentifier = "pwsh"; - private readonly Guid _activityId; - private ConfigurationProcessor _processor; - private ConfigurationSet _configSet; - - public ConfigurationFileHelper(Guid activityId) - { - _activityId = activityId; - } - - public IList Units => _configSet?.Units; - - /// - /// Open configuration set from the provided . - /// - /// DSC configuration file path - /// DSC configuration file content - public async Task OpenConfigurationSetAsync(string filePath, string content) - { - try - { - _processor = await CreateConfigurationProcessorAsync(); - _configSet = await OpenConfigurationSetInternalAsync(_processor, filePath, content); - } - catch - { - _processor = null; - _configSet = null; - throw; - } - } - - public async Task ResolveConfigurationUnitDetails() - { - if (_processor == null || _configSet == null) - { - throw new InvalidOperationException(); - } - - await _processor.GetSetDetailsAsync(_configSet, ConfigurationUnitDetailFlags.ReadOnly); - } - - private async Task OpenConfigurationSetInternalAsync(ConfigurationProcessor processor, string filePath, string content) - { - var file = await StorageFile.GetFileFromPathAsync(filePath); - var parentDir = await file.GetParentAsync(); - var inputStream = StringToStream(content); - - var openConfigResult = processor.OpenConfigurationSet(inputStream); - var configSet = openConfigResult.Set ?? throw new OpenConfigurationSetException(openConfigResult.ResultCode, openConfigResult.Field, openConfigResult.Value); - - // Set input file path in the configuration set to inform the - // processor about the working directory when applying the - // configuration - configSet.Name = file.Name; - configSet.Origin = parentDir.Path; - configSet.Path = file.Path; - return configSet; - } - - public async Task ApplyConfigurationAsync() - { - if (_processor == null || _configSet == null) - { - throw new InvalidOperationException(); - } - - _log.Information("Starting to apply configuration set"); - var result = await _processor.ApplySetAsync(_configSet, ApplyConfigurationSetFlags.None); - - foreach (var unitResult in result.UnitResults) - { - TelemetryFactory.Get().Log("ConfigurationFile_UnitResult", LogLevel.Critical, new ConfigurationUnitResultEvent(unitResult), _activityId); - } - - TelemetryFactory.Get().Log("ConfigurationFile_Result", LogLevel.Critical, new ConfigurationSetResultEvent(_configSet, result), _activityId); - - _log.Information($"Apply configuration finished. HResult: {result.ResultCode?.HResult}"); - return new ApplicationResult(result); - } - - /// - /// Create and configure the configuration processor. - /// - /// Configuration processor - private async Task CreateConfigurationProcessorAsync() - { - ConfigurationStaticFunctions config = new(); - var factory = await config.CreateConfigurationSetProcessorFactoryAsync(PowerShellHandlerIdentifier).AsTask(); - - // Create and configure the configuration processor. - var processor = config.CreateConfigurationProcessor(factory); - processor.Caller = nameof(DevHome); - processor.Diagnostics += LogConfigurationDiagnostics; - processor.MinimumLevel = DiagnosticLevel.Verbose; - return processor; - } - - /// - /// Log configuration diagnostics event handler - /// - /// Event sender - /// Diagnostic information - private void LogConfigurationDiagnostics(object sender, IDiagnosticInformation diagnosticInformation) - { - var log = _log.ForContext("SourceContext", nameof(ConfigurationProcessor)); - switch (diagnosticInformation.Level) - { - case DiagnosticLevel.Warning: - log.Warning(diagnosticInformation.Message); - return; - case DiagnosticLevel.Error: - log.Error(diagnosticInformation.Message); - return; - case DiagnosticLevel.Critical: - log.Fatal(diagnosticInformation.Message); - return; - case DiagnosticLevel.Verbose: - case DiagnosticLevel.Informational: - default: - log.Information(diagnosticInformation.Message); - return; - } - } - - /// - /// Convert a string to an input stream - /// - /// Target string - /// Input stream - private InMemoryRandomAccessStream StringToStream(string str) - { - InMemoryRandomAccessStream result = new(); - using (DataWriter writer = new(result)) - { - writer.UnicodeEncoding = UnicodeEncoding.Utf8; - writer.WriteString(str); - writer.StoreAsync().AsTask().Wait(); - writer.DetachStream(); - } - - result.Seek(0); - return result; - } -} diff --git a/tools/SetupFlow/DevHome.SetupFlow.Common/DevHome.SetupFlow.Common.csproj b/tools/SetupFlow/DevHome.SetupFlow.Common/DevHome.SetupFlow.Common.csproj index 33ab51ab0b..3b83b5168c 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.Common/DevHome.SetupFlow.Common.csproj +++ b/tools/SetupFlow/DevHome.SetupFlow.Common/DevHome.SetupFlow.Common.csproj @@ -6,54 +6,16 @@ win-x86;win-x64;win-arm64 disable false - - - - - 10.0.19041.0 - Microsoft.Management.Deployment + Debug;Release;Debug_FailFast - - - - - - - - - - - + all runtime; build; native; contentfiles; analyzers - - - - NU1701 - true - none - - - True - @@ -65,11 +27,4 @@ - - - - - - - diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent.Projection/DevHome.SetupFlow.ElevatedComponent.Projection.csproj b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent.Projection/DevHome.SetupFlow.ElevatedComponent.Projection.csproj index 609b9dc59d..cd1159b441 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent.Projection/DevHome.SetupFlow.ElevatedComponent.Projection.csproj +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent.Projection/DevHome.SetupFlow.ElevatedComponent.Projection.csproj @@ -9,6 +9,7 @@ enable x86;x64;arm64 win-x86;win-x64;win-arm64 + Debug;Release;Debug_FailFast @@ -20,7 +21,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/DevHome.SetupFlow.ElevatedComponent.csproj b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/DevHome.SetupFlow.ElevatedComponent.csproj index e7723fa286..cc0662551c 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/DevHome.SetupFlow.ElevatedComponent.csproj +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/DevHome.SetupFlow.ElevatedComponent.csproj @@ -8,6 +8,7 @@ enable x86;x64;arm64 win-x86;win-x64;win-arm64 + Debug;Release;Debug_FailFast @@ -20,7 +21,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -28,6 +29,8 @@ + + diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Directory.build.targets b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Directory.build.targets new file mode 100644 index 0000000000..e709f3f981 --- /dev/null +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Directory.build.targets @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/ElevatedComponentOperation.cs b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/ElevatedComponentOperation.cs index 9e848df2dd..97bb5486c6 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/ElevatedComponentOperation.cs +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/ElevatedComponentOperation.cs @@ -1,9 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using DevHome.Services.Core.Extensions; +using DevHome.Services.DesiredStateConfiguration.Extensions; +using DevHome.Services.WindowsPackageManager.Extensions; using DevHome.SetupFlow.Common.Contracts; using DevHome.SetupFlow.ElevatedComponent.Helpers; using DevHome.SetupFlow.ElevatedComponent.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; using Serilog; using Windows.Foundation; @@ -13,8 +19,10 @@ namespace DevHome.SetupFlow.ElevatedComponent; /// Class for executing operations in the elevated background process. /// public sealed class ElevatedComponentOperation : IElevatedComponentOperation -{ - private readonly ILogger _log = Log.ForContext("SourceContext", nameof(ElevatedComponentOperation)); +{ + private readonly Microsoft.Extensions.Logging.ILogger _logger; + + internal static IHost Host { get; } = BuildHost(); /// /// Tasks arguments are passed to the elevated process as input at launch-time. @@ -37,13 +45,15 @@ public sealed class ElevatedComponentOperation : IElevatedComponentOperation public ElevatedComponentOperation(IList tasksArgumentList) { + _logger = LoggerFactory.Create(lb => lb.AddSerilog(dispose: false)).CreateLogger(); + try { _tasksArguments = TasksArguments.FromArgumentList(tasksArgumentList); } catch (Exception e) { - _log.Error(e, $"Failed to parse tasks arguments"); + _logger.LogError(e, $"Failed to parse tasks arguments"); throw; } } @@ -53,16 +63,16 @@ public void WriteToStdOut(string value) Console.WriteLine(value); } - public IAsyncOperation InstallPackageAsync(string packageId, string catalogName, string version) + public IAsyncOperation InstallPackageAsync(string packageId, string catalogName, string version, Guid activityId) { var taskArguments = GetInstallPackageTaskArguments(packageId, catalogName, version); return ValidateAndExecuteAsync( taskArguments, async () => { - _log.Information($"Installing package elevated: '{packageId}' from '{catalogName}'"); + _logger.LogInformation($"Installing package elevated: '{packageId}' from '{catalogName}'"); var task = new ElevatedInstallTask(); - return await task.InstallPackage(taskArguments.PackageId, taskArguments.CatalogName, version); + return await task.InstallPackage(taskArguments.PackageId, taskArguments.CatalogName, version, activityId); }, result => result.TaskSucceeded).AsAsyncOperation(); } @@ -77,7 +87,7 @@ public IAsyncOperation CreateDevDriveAsync() taskArguments, async () => { - _log.Information("Creating elevated Dev Drive storage operator"); + _logger.LogInformation("Creating elevated Dev Drive storage operator"); var task = new DevDriveStorageOperator(); var result = task.CreateDevDrive(taskArguments.VirtDiskPath, taskArguments.SizeInBytes, taskArguments.NewDriveLetter, taskArguments.DriveLabel); return await Task.FromResult(result); @@ -92,7 +102,7 @@ public IAsyncOperation ApplyConfigurationAsync(Guid taskArguments, async () => { - _log.Information("Applying DSC configuration elevated"); + _logger.LogInformation("Applying DSC configuration elevated"); var task = new ElevatedConfigurationTask(); return await task.ApplyConfiguration(taskArguments.FilePath, taskArguments.Content, activityId); }, @@ -107,7 +117,7 @@ public void Terminate() var allTasksArguments = _tasksArguments.GetAllTasksArguments(); if (allTasksArguments.Count == _operationsState.Count) { - _log.Information($"All operations for the tasks arguments provided to the elevated process were executed."); + _logger.LogInformation($"All operations for the tasks arguments provided to the elevated process were executed."); } else { @@ -116,7 +126,7 @@ public void Terminate() { if (!_operationsState.ContainsKey(taskArguments)) { - _log.Warning($"Operation for task arguments {string.Join(' ', taskArguments.ToArgumentList())} was provided to the elevated process but was never executed."); + _logger.LogWarning($"Operation for task arguments {string.Join(' ', taskArguments.ToArgumentList())} was provided to the elevated process but was never executed."); } } } @@ -128,7 +138,7 @@ private InstallPackageTaskArguments GetInstallPackageTaskArguments(string packag var taskArguments = _tasksArguments.InstallPackages?.FirstOrDefault(def => def.PackageId == packageId && def.CatalogName == catalogName && def.Version == version); if (taskArguments == null) { - _log.Error($"No match found for PackageId={packageId}, CatalogId={catalogName} and Version={version} in the process tasks arguments."); + _logger.LogError($"No match found for PackageId={packageId}, CatalogId={catalogName} and Version={version} in the process tasks arguments."); throw new ArgumentException($"Failed to install '{packageId}' ({version}) from '{catalogName}' because it was not in the pre-approved tasks arguments"); } @@ -140,7 +150,7 @@ private ConfigureTaskArguments GetConfigureTaskArguments() var taskArguments = _tasksArguments.Configure; if (taskArguments == null) { - _log.Error($"No configuration task was found in the process tasks arguments "); + _logger.LogError($"No configuration task was found in the process tasks arguments "); throw new ArgumentException($"Failed to apply configuration because it was not in the pre-approved tasks arguments"); } @@ -152,7 +162,7 @@ private CreateDevDriveTaskArguments GetDevDriveTaskArguments() var taskArguments = _tasksArguments.CreateDevDrive; if (taskArguments == null) { - _log.Error($"No 'create dev drive' task was found in the process tasks arguments "); + _logger.LogError($"No 'create dev drive' task was found in the process tasks arguments "); throw new ArgumentException($"Failed to create a dev drive because it was not in the pre-approved tasks arguments"); } @@ -182,7 +192,7 @@ private async Task ValidateAndExecuteAsync( } catch (Exception e) { - _log.Error(e, $"Failed to validate or execute operation"); + _logger.LogError(e, $"Failed to validate or execute operation"); EndOperation(taskArguments, false); throw; } @@ -266,4 +276,26 @@ private sealed class OperationState /// public bool InProgress { get; set; } } + + private static IHost BuildHost() + { + return Microsoft.Extensions.Hosting.Host + .CreateDefaultBuilder() + .UseContentRoot(AppContext.BaseDirectory) + .UseDefaultServiceProvider((context, options) => + { + options.ValidateOnBuild = true; + }) + .ConfigureServices((context, services) => + { + // Add Serilog logging for ILogger. + services.AddLogging(lb => lb.AddSerilog(dispose: true)); + + // Service projects + services.AddCore(); + services.AddWinGetElevated(); + services.AddDSC(); + }) + .Build(); + } } diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Helpers/ElevatedConfigureUnitTaskResult.cs b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Helpers/ElevatedConfigureUnitTaskResult.cs index cf56009d34..2d7cbf8cb8 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Helpers/ElevatedConfigureUnitTaskResult.cs +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Helpers/ElevatedConfigureUnitTaskResult.cs @@ -1,28 +1,44 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using DevHome.Services.DesiredStateConfiguration.Contracts; +using Microsoft.Management.Configuration; +using Windows.Win32.Foundation; + namespace DevHome.SetupFlow.ElevatedComponent.Helpers; /// /// Class for the result of an individual unit/resource inside /// public sealed class ElevatedConfigureUnitTaskResult -{ - public string? Type { get; set; } +{ + private readonly IDSCApplicationUnitResult? _unitResult; + + public ElevatedConfigureUnitTaskResult() + { + // This constructor is required for CsWinRT projection. + } + + internal ElevatedConfigureUnitTaskResult(IDSCApplicationUnitResult unitResult) + { + _unitResult = unitResult; + } + + public string? Type => _unitResult?.AppliedUnit.Type; - public string? Id { get; set; } + public string? Id => _unitResult?.AppliedUnit.Id; - public string? UnitDescription { get; set; } + public string? UnitDescription => _unitResult?.AppliedUnit.Description; - public string? Intent { get; set; } + public string? Intent => _unitResult?.AppliedUnit.Intent; - public bool IsSkipped { get; set; } + public bool IsSkipped => _unitResult?.IsSkipped ?? false; - public int HResult { get; set; } + public int HResult => _unitResult?.HResult ?? HRESULT.S_OK; - public int ResultSource { get; set; } + public int ResultSource => (int)(_unitResult?.ResultSource ?? ConfigurationUnitResultSource.None); - public string? Details { get; set; } + public string? Details => _unitResult?.Details; - public string? ErrorDescription { get; set; } + public string? ErrorDescription => _unitResult?.ErrorDescription; } diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/IElevatedComponentOperation.cs b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/IElevatedComponentOperation.cs index 8bcd7cbba8..2661988866 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/IElevatedComponentOperation.cs +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/IElevatedComponentOperation.cs @@ -36,7 +36,7 @@ public interface IElevatedComponentOperation /// Package catalog name /// Package version /// Install package operation result - public IAsyncOperation InstallPackageAsync(string packageId, string catalogName, string version); + public IAsyncOperation InstallPackageAsync(string packageId, string catalogName, string version, Guid activityId); /// /// Create a dev drive diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/DevDriveStorageOperator.cs b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/DevDriveStorageOperator.cs index d284ab138a..f3b806fbe2 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/DevDriveStorageOperator.cs +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/DevDriveStorageOperator.cs @@ -284,7 +284,7 @@ private HRESULT CreatePartition(string virtDiskPhysicalPath, out uint diskNumber unsafe { partitionLayout.Info.PartitionCount = 1; - var partitionInfo = &partitionLayout.Info.PartitionEntry._0; + var partitionInfo = &partitionLayout.Info.PartitionEntry.e0; partitionInfo->PartitionStyle = PARTITION_STYLE.PARTITION_STYLE_GPT; // There are currently no partitions on the disk. Start off the diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/ElevatedConfigurationTask.cs b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/ElevatedConfigurationTask.cs index bad73c3373..e67df5ed5e 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/ElevatedConfigurationTask.cs +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/ElevatedConfigurationTask.cs @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using DevHome.SetupFlow.Common.Configuration; +using DevHome.Services.DesiredStateConfiguration.Contracts; +using DevHome.Services.DesiredStateConfiguration.Models; using DevHome.SetupFlow.ElevatedComponent.Helpers; -using Microsoft.Management.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using Serilog; using Windows.Foundation; -using Windows.Win32.Foundation; namespace DevHome.SetupFlow.ElevatedComponent.Tasks; @@ -14,40 +15,21 @@ public sealed class ElevatedConfigurationTask { public IAsyncOperation ApplyConfiguration(string filePath, string content, Guid activityId) { + var logger = LoggerFactory.Create(lb => lb.AddSerilog(dispose: false)).CreateLogger(); return Task.Run(async () => { var taskResult = new ElevatedConfigureTaskResult(); - var log = Log.ForContext("SourceContext", nameof(ElevatedConfigurationTask)); try { - var configurationFileHelper = new ConfigurationFileHelper(activityId); - - log.Information($"Opening configuration set from file: {filePath}"); - await configurationFileHelper.OpenConfigurationSetAsync(filePath, content); - - log.Information("Starting configuration set application"); - var result = await configurationFileHelper.ApplyConfigurationAsync(); - log.Information("Configuration application finished"); + var dsc = ElevatedComponentOperation.Host.Services.GetRequiredService(); + var file = DSCFile.CreateVirtual(filePath, content); + var result = await dsc.ApplyConfigurationAsync(file, activityId); taskResult.TaskAttempted = true; taskResult.TaskSucceeded = result.Succeeded; taskResult.RebootRequired = result.RequiresReboot; - taskResult.UnitResults = result.Result.UnitResults.Select(unitResult => - { - unitResult.Unit.Settings.TryGetValue("description", out var descriptionObj); - return new ElevatedConfigureUnitTaskResult - { - Type = unitResult.Unit.Type, - Id = unitResult.Unit.Identifier, - UnitDescription = descriptionObj?.ToString() ?? string.Empty, - Intent = unitResult.Unit.Intent.ToString(), - IsSkipped = unitResult.State == ConfigurationUnitState.Skipped, - HResult = unitResult.ResultInformation?.ResultCode?.HResult ?? HRESULT.S_OK, - ResultSource = (int)(unitResult.ResultInformation?.ResultSource ?? ConfigurationUnitResultSource.None), - ErrorDescription = unitResult.ResultInformation?.Description, - }; - }).ToList(); + taskResult.UnitResults = result.UnitResults.Select(unitResult => new ElevatedConfigureUnitTaskResult(unitResult)).ToList(); if (result.ResultException != null) { @@ -56,7 +38,7 @@ public IAsyncOperation ApplyConfiguration(string fi } catch (Exception e) { - log.Error(e, $"Failed to apply configuration."); + logger.LogError(e, $"Failed to apply configuration."); taskResult.TaskSucceeded = false; } diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/ElevatedInstallTask.cs b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/ElevatedInstallTask.cs index a90e148f7e..8b97a3a9d0 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/ElevatedInstallTask.cs +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedComponent/Tasks/ElevatedInstallTask.cs @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using DevHome.SetupFlow.Common.Extensions; -using DevHome.SetupFlow.Common.WindowsPackageManager; +using DevHome.Services.WindowsPackageManager.Contracts; +using DevHome.Services.WindowsPackageManager.Exceptions; +using DevHome.Services.WindowsPackageManager.Models; using DevHome.SetupFlow.ElevatedComponent.Helpers; -using Microsoft.Management.Deployment; +using Microsoft.Extensions.DependencyInjection; using Serilog; using Windows.Foundation; -using Windows.Win32.Foundation; namespace DevHome.SetupFlow.ElevatedComponent.Tasks; @@ -30,125 +30,41 @@ namespace DevHome.SetupFlow.ElevatedComponent.Tasks; public sealed class ElevatedInstallTask { private readonly ILogger _log = Log.ForContext("SourceContext", nameof(ElevatedInstallTask)); - private readonly WindowsPackageManagerFactory _wingetFactory = new WindowsPackageManagerManualActivationFactory(); /// /// Installs a package given its ID and the ID of the catalog it comes from. /// - public IAsyncOperation InstallPackage(string packageId, string catalogName, string version) + public IAsyncOperation InstallPackage(string packageId, string catalogName, string version, Guid activityId) { return Task.Run(async () => { var result = new ElevatedInstallTaskResult(); try { - _log.Information($"Elevated install requested for package [{packageId}] from catalog [{catalogName}]"); - - var packageManager = _wingetFactory.CreatePackageManager(); - - _log.Information($"Connecting to catalog [{catalogName}]"); - var catalogReference = packageManager.GetPackageCatalogByName(catalogName); - var connectResult = await catalogReference.ConnectAsync(); - if (connectResult.Status != ConnectResultStatus.Ok) - { - _log.Error($"Failed to connect to the catalog [{catalogName}] with status {connectResult.Status}"); - result.TaskAttempted = false; - return result; - } - - _log.Information($"Finding package [{packageId}] in catalog"); - var findOptions = CreateFindOptionsForPackageId(packageId); - var findResult = connectResult.PackageCatalog.FindPackages(findOptions); - if (findResult.Status != FindPackagesResultStatus.Ok - || findResult.Matches.Count < 1 - || findResult.WasLimitExceeded) - { - _log.Error($"Failed to find package. Status={findResult.Status}, Matches Count={findResult.Matches.Count}, LimitReached={findResult.WasLimitExceeded}"); - result.TaskAttempted = false; - return result; - } - - var packageToInstall = findResult.Matches[0].CatalogPackage; - - var installOptions = _wingetFactory.CreateInstallOptions(); - installOptions.PackageInstallMode = PackageInstallMode.Silent; - if (!string.IsNullOrWhiteSpace(version)) - { - installOptions.PackageVersionId = FindVersionOrThrow(result, packageToInstall, version); - } - else - { - _log.Information($"Install version not specified. Falling back to default install version {packageToInstall.DefaultInstallVersion.Version}"); - } - - _log.Information($"Initiating install of package {packageId}"); - var installResult = await packageManager.InstallPackageAsync(packageToInstall, installOptions); - var extendedErrorCode = installResult.ExtendedErrorCode?.HResult ?? HRESULT.S_OK; - - // Contract version 4 - var installErrorCode = installResult.GetValueOrDefault(res => res.InstallerErrorCode, HRESULT.S_OK); - - _log.Information($"Install finished. Status={installResult.Status}, InstallerErrorCode={installErrorCode}, ExtendedErrorCode={extendedErrorCode}, RebootRequired={installResult.RebootRequired}"); + var winget = ElevatedComponentOperation.Host.Services.GetRequiredService(); + var installResult = await winget.InstallPackageAsync(new WinGetPackageUri(catalogName, packageId, new(version)), activityId); result.TaskAttempted = true; - result.TaskSucceeded = installResult.Status == InstallResultStatus.Ok; result.RebootRequired = installResult.RebootRequired; - result.Status = (int)installResult.Status; - result.ExtendedErrorCode = extendedErrorCode; - result.InstallerErrorCode = installErrorCode; - return result; + // Set the extended error code in case a reboot is required + result.ExtendedErrorCode = installResult.ExtendedErrorCode; + result.TaskSucceeded = true; + } + catch (InstallPackageException e) + { + result.Status = (int)e.Status; + result.ExtendedErrorCode = e.ExtendedErrorCode; + result.InstallerErrorCode = e.InstallerErrorCode; + result.TaskSucceeded = false; + _log.Error($"Failed to install package with status {e.Status} and installer error code {e.InstallerErrorCode}"); } catch (Exception e) { - _log.Error(e, "Elevated app install failed."); result.TaskSucceeded = false; + _log.Error(e, $"Exception thrown while installing package."); } return result; }).AsAsyncOperation(); } - - /// - /// Creates a that can be used to find - /// the package with the given ID. - /// - private FindPackagesOptions CreateFindOptionsForPackageId(string packageId) - { - var matchFilter = _wingetFactory.CreatePackageMatchFilter(); - matchFilter.Field = PackageMatchField.Id; - matchFilter.Option = PackageFieldMatchOption.Equals; - matchFilter.Value = packageId; - - var findOptions = _wingetFactory.CreateFindPackagesOptions(); - findOptions.Selectors.Add(matchFilter); - findOptions.ResultLimit = 1; - - return findOptions; - } - - /// - /// Find a specific version in the list of available versions for a package. - /// - /// Target package - /// Version to find - /// Specified version - /// Exception thrown if the specified version was not found - private PackageVersionId FindVersionOrThrow(ElevatedInstallTaskResult result, CatalogPackage package, string version) - { - // Find the version in the list of available versions - for (var i = 0; i < package.AvailableVersions.Count; i++) - { - if (package.AvailableVersions[i].Version == version) - { - return package.AvailableVersions[i]; - } - } - - var installErrorInvalidParameter = unchecked((int)0x8A150112); - result.Status = (int)InstallResultStatus.InvalidOptions; - result.ExtendedErrorCode = installErrorInvalidParameter; - var message = $"Specified install version was not found {version}."; - _log.Error(message); - throw new ArgumentException(message); - } } diff --git a/tools/SetupFlow/DevHome.SetupFlow.ElevatedServer/DevHome.SetupFlow.ElevatedServer.csproj b/tools/SetupFlow/DevHome.SetupFlow.ElevatedServer/DevHome.SetupFlow.ElevatedServer.csproj index 0102280101..5d6f4903f2 100644 --- a/tools/SetupFlow/DevHome.SetupFlow.ElevatedServer/DevHome.SetupFlow.ElevatedServer.csproj +++ b/tools/SetupFlow/DevHome.SetupFlow.ElevatedServer/DevHome.SetupFlow.ElevatedServer.csproj @@ -15,11 +15,12 @@ enable enable DevHome.SetupFlow.ElevatedServer.Program + Debug;Release;Debug_FailFast - + - + + - + - + - - - - + + + + - - - + + + - - + - + - - + + - - + + - + - + - - - + + + - + - + - - + + - - - - - + + + - - + + - - - + + + - - + + - + - - + + - - + + - + - - + + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - - - + + + + + + - - + + - + - + - - + + - - + + - + - + - + - - - - - - - - - - + + + + + + + + + + - - + + - - + + - - - + + + + Text="{x:Bind AddRepoViewModel.FolderPickerViewModel.CloneLocationAlias, Mode=TwoWay}" + Visibility="{x:Bind AddRepoViewModel.FolderPickerViewModel.InDevDriveScenario, Mode=OneWay}"> - + - + - + - + - - - + + + - - + + Grid.Row="2" + Margin="0,10,0,10" + ColumnSpacing="10" + Visibility="{x:Bind AddRepoViewModel.EditDevDriveViewModel.ShowDevDriveInformation, Mode=OneWay}"> - - + + - - + + + x:Name="NewDevDriveComboBox" + x:Uid="NewDevDriveComboBox" + Grid.Row="0" + Grid.Column="0" + IsChecked="{x:Bind AddRepoViewModel.EditDevDriveViewModel.IsDevDriveCheckboxChecked, Mode=TwoWay}" + IsEnabled="{x:Bind AddRepoViewModel.EditDevDriveViewModel.IsDevDriveCheckboxEnabled}"> - + - + + x:Uid="DevDriveDefaultDriveCheckBoxError" + Grid.Row="1" + Grid.Column="0" + Grid.ColumnSpan="2" + Margin="0,5,0,0" + HorizontalAlignment="Stretch" + IsClosable="False" + IsOpen="True" + Severity="Error" + Visibility="{x:Bind AddRepoViewModel.EditDevDriveViewModel.DevDriveValidationError, Mode=OneWay}" /> diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/AddRepoDialog.xaml.cs b/tools/SetupFlow/DevHome.SetupFlow/Views/AddRepoDialog.xaml.cs index df3aa6379c..3cee29eaa7 100644 --- a/tools/SetupFlow/DevHome.SetupFlow/Views/AddRepoDialog.xaml.cs +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/AddRepoDialog.xaml.cs @@ -195,8 +195,10 @@ private void FilterTextBox_TextChanged(object sender, TextChangedEventArgs e) private void FilterSuggestions(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) { - sender.ItemsSource = _searchFieldsAndValues[sender.Header.ToString()].Where(x => x.Contains(sender.Text)); - return; + if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput) + { + sender.ItemsSource = _searchFieldsAndValues[sender.Header.ToString()].Where(x => x.Contains(sender.Text)); + } } private async void SwitchToSearchPage(object sender, RoutedEventArgs e) diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/CloneRepoSummaryInformationView.xaml.cs b/tools/SetupFlow/DevHome.SetupFlow/Views/CloneRepoSummaryInformationView.xaml.cs index 03a69cd717..82a9ed8539 100644 --- a/tools/SetupFlow/DevHome.SetupFlow/Views/CloneRepoSummaryInformationView.xaml.cs +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/CloneRepoSummaryInformationView.xaml.cs @@ -1,21 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; using DevHome.SetupFlow.ViewModels; -using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Controls.Primitives; -using Microsoft.UI.Xaml.Data; -using Microsoft.UI.Xaml.Input; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Navigation; -using Windows.Foundation; -using Windows.Foundation.Collections; namespace DevHome.SetupFlow.Views; diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/ConfigurationFileView.xaml b/tools/SetupFlow/DevHome.SetupFlow/Views/ConfigurationFileView.xaml index 471a3e987f..a63ddfd4b1 100644 --- a/tools/SetupFlow/DevHome.SetupFlow/Views/ConfigurationFileView.xaml +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/ConfigurationFileView.xaml @@ -50,7 +50,6 @@ + 10 0,0,0,5 @@ -146,7 +148,7 @@ - + @@ -155,7 +157,7 @@ - + @@ -176,19 +178,19 @@ - + - + - + diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/CreateEnvironmentReviewView.xaml.cs b/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/CreateEnvironmentReviewView.xaml.cs index 523c65be4a..9adcf6d6e2 100644 --- a/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/CreateEnvironmentReviewView.xaml.cs +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/CreateEnvironmentReviewView.xaml.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using AdaptiveCards.Rendering.WinUI3; using CommunityToolkit.Mvvm.Messaging; using DevHome.SetupFlow.Models.Environments; diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml.cs b/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml.cs index 7a24c5c1d2..1370e3fc68 100644 --- a/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml.cs +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/EnvironmentCreationOptionsView.xaml.cs @@ -3,10 +3,8 @@ using System; using System.Collections.Generic; -using System.Threading.Tasks; using AdaptiveCards.Rendering.WinUI3; using CommunityToolkit.Mvvm.Messaging; -using CommunityToolkit.WinUI; using DevHome.SetupFlow.Models.Environments; using DevHome.SetupFlow.ViewModels.Environments; using Microsoft.UI.Xaml; diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/SelectEnvironmentProviderView.xaml b/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/SelectEnvironmentProviderView.xaml index 1fb724c57c..f558c3d559 100644 --- a/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/SelectEnvironmentProviderView.xaml +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/Environments/SelectEnvironmentProviderView.xaml @@ -18,6 +18,14 @@ + + 40 + - + + @@ -19,11 +19,14 @@ - - @@ -34,184 +37,253 @@ - - + + - + - - - + + + + RowSpacing="20"> - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + + + + + + - + Margin="0,0,0,10"> + - - - + + + - + - - + + - + - - + + - - + + - + VerticalScrollBarVisibility="Auto"> - - + + - + - + - - + + - + + IsTextSelectionEnabled="True" + Text="{x:Bind MessageToShow, Mode=OneWay}" + TextWrapping="Wrap" /> - + - + - - + + - - + + - + + IsTextSelectionEnabled="True" + Text="{x:Bind MessageToShow, Mode=OneWay}" + TextWrapping="Wrap" /> - - - + + - - + + - - + + - - + Margin="0,0,0,10" + Padding="20" + Background="{ThemeResource CardBackgroundFillColorDefault}" + CornerRadius="10" + Visibility="{x:Bind PrimaryMessage, Converter={StaticResource EmptyObjectToObjectConverter}}"> + - + Content="{x:Bind ExtensionAdaptiveCardPanel}" + CornerRadius="10" + Unloaded="ContentControl_Unloaded" /> diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/QuickstartPlaygroundView.xaml.cs b/tools/SetupFlow/DevHome.SetupFlow/Views/QuickstartPlaygroundView.xaml.cs index 1d714d31e4..fce41c3142 100644 --- a/tools/SetupFlow/DevHome.SetupFlow/Views/QuickstartPlaygroundView.xaml.cs +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/QuickstartPlaygroundView.xaml.cs @@ -188,7 +188,7 @@ public async Task ShowExtensionInitializationUI() { if (ViewModel.ActiveQuickstartSelection is not null) { - var adaptiveCardSessionResult = ViewModel.ActiveQuickstartSelection.CreateAdaptiveCardSessionForExtensionInitialization(); + var adaptiveCardSessionResult = ViewModel.ActiveQuickstartSelection.CreateAdaptiveCardSessionForExtensionInitialization(ViewModel.ActivityId); await ShowAdaptiveCardOnContentDialog(adaptiveCardSessionResult); } } @@ -212,7 +212,7 @@ public async Task ShowProgressAdaptiveCard() { DispatcherQueue.TryEnqueue(() => { - ProgressOutputScrollViewer.ScrollToVerticalOffset(ProgressOutputScrollViewer.ScrollableHeight); + ProgressOutputScrollViewer.ScrollToVerticalOffset(ProgressOutputScrollViewer.ScrollableHeight); }); }; diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/SetupFlowPage.xaml b/tools/SetupFlow/DevHome.SetupFlow/Views/SetupFlowPage.xaml index 9d2d664709..e61ba5780d 100644 --- a/tools/SetupFlow/DevHome.SetupFlow/Views/SetupFlowPage.xaml +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/SetupFlowPage.xaml @@ -1,12 +1,12 @@  - - + diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/SetupFlowPage.xaml.cs b/tools/SetupFlow/DevHome.SetupFlow/Views/SetupFlowPage.xaml.cs index 18b3b778a8..ed27fdb0f5 100644 --- a/tools/SetupFlow/DevHome.SetupFlow/Views/SetupFlowPage.xaml.cs +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/SetupFlowPage.xaml.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using DevHome.Common; using DevHome.Common.Extensions; +using DevHome.Common.Views; using DevHome.SetupFlow.ViewModels; using Microsoft.Extensions.DependencyInjection; using Microsoft.UI.Xaml; @@ -12,8 +12,6 @@ namespace DevHome.SetupFlow.Views; public partial class SetupFlowPage : ToolPage { - public override string ShortName => "SetupFlow"; - public SetupFlowViewModel ViewModel { get; } public SetupFlowPage() diff --git a/tools/SetupFlow/DevHome.SetupFlow/Views/Summary/SummaryAppInstallationNotes.xaml b/tools/SetupFlow/DevHome.SetupFlow/Views/Summary/SummaryAppInstallationNotes.xaml new file mode 100644 index 0000000000..0b0cf8df65 --- /dev/null +++ b/tools/SetupFlow/DevHome.SetupFlow/Views/Summary/SummaryAppInstallationNotes.xaml @@ -0,0 +1,75 @@ + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + diff --git a/uitest/DevHome.UITest.csproj b/uitest/DevHome.UITest.csproj index 1c0fd0ffa9..af2829706c 100644 --- a/uitest/DevHome.UITest.csproj +++ b/uitest/DevHome.UITest.csproj @@ -10,6 +10,7 @@ true resources.pri $(MSBuildProjectDirectory)\Test.runsettings + Debug;Release;Debug_FailFast diff --git a/uitest/Dialogs/AddWidgetDialog.cs b/uitest/Dialogs/AddWidgetDialog.cs index eaf4a44513..47f546c849 100644 --- a/uitest/Dialogs/AddWidgetDialog.cs +++ b/uitest/Dialogs/AddWidgetDialog.cs @@ -4,7 +4,6 @@ using System.Diagnostics; using DevHome.UITest.Extensions; using DevHome.UITest.Pages; -using OpenQA.Selenium.Appium; using OpenQA.Selenium.Appium.Windows; namespace DevHome.UITest.Dialogs; diff --git a/uitest/IntroducingTest.cs b/uitest/IntroducingTest.cs index f60554a5ae..33ca2e8462 100644 --- a/uitest/IntroducingTest.cs +++ b/uitest/IntroducingTest.cs @@ -2,8 +2,6 @@ // Licensed under the MIT License. using DevHome.UITest.Common; -using DevHome.UITest.Dialogs; -using DevHome.UITest.Pages; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace DevHome.Tests.UITest; diff --git a/uitest/Pages/ExtensionsPage.cs b/uitest/Pages/ExtensionsPage.cs index 82d213df97..4cad3120a6 100644 --- a/uitest/Pages/ExtensionsPage.cs +++ b/uitest/Pages/ExtensionsPage.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.Diagnostics; using OpenQA.Selenium.Appium.Windows; namespace DevHome.UITest.Pages; diff --git a/uitest/Pages/PreferencesPage.cs b/uitest/Pages/PreferencesPage.cs index 95673b0247..793ff614f3 100644 --- a/uitest/Pages/PreferencesPage.cs +++ b/uitest/Pages/PreferencesPage.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System.Diagnostics; -using DevHome.UITest.Common; using DevHome.UITest.Extensions; using OpenQA.Selenium.Appium.Windows; diff --git a/uitest/Pages/SettingsAccountsPage.cs b/uitest/Pages/SettingsAccountsPage.cs index cb8af1be0c..642e67fcf3 100644 --- a/uitest/Pages/SettingsAccountsPage.cs +++ b/uitest/Pages/SettingsAccountsPage.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.Diagnostics; using OpenQA.Selenium.Appium.Windows; namespace DevHome.UITest.Pages; diff --git a/uitest/Pages/SettingsPage.cs b/uitest/Pages/SettingsPage.cs index bd37632617..56ccaea34e 100644 --- a/uitest/Pages/SettingsPage.cs +++ b/uitest/Pages/SettingsPage.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System.Diagnostics; -using DevHome.UITest.Common; using OpenQA.Selenium.Appium.Windows; namespace DevHome.UITest.Pages; diff --git a/uitest/Pages/UtilitiesPage.cs b/uitest/Pages/UtilitiesPage.cs index a7ae2170d4..b321d890b2 100644 --- a/uitest/Pages/UtilitiesPage.cs +++ b/uitest/Pages/UtilitiesPage.cs @@ -6,7 +6,7 @@ using System.Security.Principal; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.Win32.SafeHandles; -using OpenQA.Selenium.Appium.Windows; +using OpenQA.Selenium.Appium.Windows; using Windows.Win32; namespace DevHome.UITest.Pages; diff --git a/uitest/SettingsTest.cs b/uitest/SettingsTest.cs index b77d059fbb..3ec266c57f 100644 --- a/uitest/SettingsTest.cs +++ b/uitest/SettingsTest.cs @@ -2,10 +2,7 @@ // Licensed under the MIT License. using System.Drawing; -using System.Formats.Tar; using DevHome.UITest.Common; -using DevHome.UITest.Dialogs; -using DevHome.UITest.Pages; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace DevHome.Tests.UITest;