From 977255864158cf2fc396e1d2d6e7adf0519e1b38 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Tue, 16 May 2023 14:38:01 -0700 Subject: [PATCH 01/43] Disable warnings in external projects --- src/JsonCppLib/JsonCppLib.vcxproj | 26 +++++++-------- src/PureLib/PureLib.vcxproj | 24 +++++++------- .../UndockedRegFreeWinRT.vcxproj | 24 +++++++------- .../detours/detours.vcxproj | 24 +++++++------- src/YamlCppLib/YamlCppLib.vcxproj | 32 +++++++++---------- src/cpprestsdk/cpprestsdk.vcxproj | 24 +++++++------- 6 files changed, 77 insertions(+), 77 deletions(-) diff --git a/src/JsonCppLib/JsonCppLib.vcxproj b/src/JsonCppLib/JsonCppLib.vcxproj index b1b5bfe571..9b6bb3414a 100644 --- a/src/JsonCppLib/JsonCppLib.vcxproj +++ b/src/JsonCppLib/JsonCppLib.vcxproj @@ -240,7 +240,7 @@ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL - Level3 + TurnOffAllWarnings ProgramDatabase Disabled stdcpp17 @@ -258,7 +258,7 @@ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL - Level3 + TurnOffAllWarnings ProgramDatabase stdcpp17 json @@ -276,7 +276,7 @@ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded - Level3 + TurnOffAllWarnings ProgramDatabase stdcpp17 json @@ -294,7 +294,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings false @@ -302,7 +302,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings false MultiThreaded @@ -311,7 +311,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings /fsanitize-coverage=inline-8bit-counters /fsanitize-coverage=edge /fsanitize-coverage=trace-cmp /fsanitize-coverage=trace-div %(AdditionalOptions) MultiThreaded false @@ -321,7 +321,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings false @@ -329,7 +329,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings false MultiThreaded @@ -338,7 +338,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings false @@ -346,7 +346,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings false MultiThreaded @@ -355,7 +355,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings false false @@ -364,7 +364,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings false false @@ -373,7 +373,7 @@ stdcpp17 json - Level3 + TurnOffAllWarnings false diff --git a/src/PureLib/PureLib.vcxproj b/src/PureLib/PureLib.vcxproj index e22d853994..e85de9b119 100644 --- a/src/PureLib/PureLib.vcxproj +++ b/src/PureLib/PureLib.vcxproj @@ -140,7 +140,7 @@ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL - Level3 + TurnOffAllWarnings ProgramDatabase Disabled stdcpp17 @@ -156,7 +156,7 @@ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL - Level3 + TurnOffAllWarnings ProgramDatabase stdcpp17 pure @@ -173,7 +173,7 @@ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded - Level3 + TurnOffAllWarnings ProgramDatabase stdcpp17 pure @@ -190,14 +190,14 @@ stdcpp17 pure - Level3 + TurnOffAllWarnings stdcpp17 pure - Level3 + TurnOffAllWarnings MultiThreaded @@ -205,14 +205,14 @@ stdcpp17 pure - Level3 + TurnOffAllWarnings stdcpp17 pure - Level3 + TurnOffAllWarnings MultiThreaded @@ -220,14 +220,14 @@ stdcpp17 pure - Level3 + TurnOffAllWarnings stdcpp17 pure - Level3 + TurnOffAllWarnings MultiThreaded @@ -235,21 +235,21 @@ stdcpp17 pure - Level3 + TurnOffAllWarnings stdcpp17 pure - Level3 + TurnOffAllWarnings stdcpp17 pure;pure\zlib; - Level3 + TurnOffAllWarnings Default MultiThreadedDebugDLL diff --git a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj index e1683d355e..b71fe4d9cc 100644 --- a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj +++ b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj @@ -111,7 +111,7 @@ NotUsing - Level3 + TurnOffAllWarnings true WIN32;_DEBUG;UNDOCKEDREGFREEWINRT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true @@ -130,7 +130,7 @@ NotUsing - Level3 + TurnOffAllWarnings true _DEBUG;UNDOCKEDREGFREEWINRT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true @@ -149,7 +149,7 @@ NotUsing - Level3 + TurnOffAllWarnings true WIN32;_DEBUG;UNDOCKEDREGFREEWINRT_EXPORTS;_WINDOWS;_USRDLL;_ARM_;%(PreprocessorDefinitions) true @@ -168,7 +168,7 @@ NotUsing - Level3 + TurnOffAllWarnings true _DEBUG;UNDOCKEDREGFREEWINRT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true @@ -187,7 +187,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -211,7 +211,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -236,7 +236,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -260,7 +260,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -285,7 +285,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -309,7 +309,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -334,7 +334,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -358,7 +358,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true diff --git a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/detours/detours.vcxproj b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/detours/detours.vcxproj index 9cd51438e2..604931e871 100644 --- a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/detours/detours.vcxproj +++ b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/detours/detours.vcxproj @@ -123,7 +123,7 @@ NotUsing - Level3 + TurnOffAllWarnings true WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true @@ -138,7 +138,7 @@ NotUsing - Level3 + TurnOffAllWarnings true _DEBUG;_LIB;%(PreprocessorDefinitions) true @@ -153,7 +153,7 @@ NotUsing - Level3 + TurnOffAllWarnings true WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true @@ -168,7 +168,7 @@ NotUsing - Level3 + TurnOffAllWarnings true _DEBUG;_LIB;%(PreprocessorDefinitions) true @@ -183,7 +183,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -203,7 +203,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -224,7 +224,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -244,7 +244,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -265,7 +265,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -285,7 +285,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -306,7 +306,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true @@ -326,7 +326,7 @@ NotUsing - Level3 + TurnOffAllWarnings true true true diff --git a/src/YamlCppLib/YamlCppLib.vcxproj b/src/YamlCppLib/YamlCppLib.vcxproj index a19079203d..ea3c1b2264 100644 --- a/src/YamlCppLib/YamlCppLib.vcxproj +++ b/src/YamlCppLib/YamlCppLib.vcxproj @@ -219,7 +219,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -228,7 +228,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -237,7 +237,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false MultiThreaded @@ -247,7 +247,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -256,7 +256,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -265,7 +265,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -274,7 +274,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false MultiThreaded @@ -284,7 +284,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -293,7 +293,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -302,7 +302,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -311,7 +311,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false MultiThreaded @@ -321,7 +321,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -330,7 +330,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -339,7 +339,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -348,7 +348,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false MultiThreaded @@ -358,7 +358,7 @@ libyaml\include;$(ProjectDir) Default - Level3 + TurnOffAllWarnings /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H /fsanitize-coverage=inline-8bit-counters /fsanitize-coverage=edge /fsanitize-coverage=trace-cmp /fsanitize-coverage=trace-div %(AdditionalOptions) MultiThreaded false diff --git a/src/cpprestsdk/cpprestsdk.vcxproj b/src/cpprestsdk/cpprestsdk.vcxproj index ecd9bc3293..832ba93574 100644 --- a/src/cpprestsdk/cpprestsdk.vcxproj +++ b/src/cpprestsdk/cpprestsdk.vcxproj @@ -236,7 +236,7 @@ WIN32;_NO_ASYNCRTIMP;_DEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings ProgramDatabase stdcpp17 Disabled @@ -251,7 +251,7 @@ WIN32;_NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings ProgramDatabase stdcpp17 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -267,7 +267,7 @@ WIN32;_NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings ProgramDatabase stdcpp17 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -286,7 +286,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -298,7 +298,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) MultiThreaded @@ -311,7 +311,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -320,7 +320,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) MultiThreaded @@ -330,7 +330,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -339,7 +339,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) MultiThreaded @@ -349,7 +349,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;_DEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -358,7 +358,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;_DEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -367,7 +367,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;_DEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - Level3 + TurnOffAllWarnings $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) From c87e9b46d6c0cf73ca99c81d8774cd7303d2db9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flor=20Chac=C3=B3n?= <14323496+florelis@users.noreply.github.com> Date: Tue, 16 May 2023 18:11:57 -0700 Subject: [PATCH 02/43] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4cc5b32c88..06022a87a2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -332,25 +332,27 @@ jobs: - task: ComponentGovernanceComponentDetection@0 displayName: Component Governance inputs: - scanType: 'Register' + scanType: 'LogOnly' verbosity: 'Verbose' alertWarningLevel: 'High' + failOnAlert: true - # Run BimSkim for all the binaries - - task: BinSkim@3 - displayName: 'Run BinSkim ' - inputs: - arguments: 'analyze - "$(buildOutDir)\AppInstallerCLI\winget.exe" - "$(buildOutDir)\WinGetUtil\WinGetUtil.dll" - "$(buildOutDir)\WindowsPackageManager\WindowsPackageManager.dll" - "$(buildOutDir)\Microsoft.Management.Deployment.InProc\Microsoft.Management.Deployment.InProc.dll" - "$(Build.SourcesDirectory)\src\WinGetUtilInterop\bin\WinGetUtil*Interop.dll" - "$(buildOutDir)\UndockedRegFreeWinRT\winrtact.dll" - "$(buildOutDir)\Microsoft.WinGet.Client\Microsoft.WinGet.*Client.dll" --config default --recurse' - - - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2 - displayName: 'Publish Security Analysis Logs' + # Run static analysis for all the binaries + - task: CredScan@3 + + - task: BinSkim@4 + inputs: + InputType: 'Basic' + Function: 'analyze' + TargetPattern: 'guardianGlob' + AnalyzeTargetGlob: '$(buildOutDir)/**.dll;$(buildOutDir)/**.exe;$(Build.SourcesDirectory)\src\WinGetUtilInterop\bin\*.dll;' + + - task: PublishSecurityAnalysisLogs@3 + inputs: + ArtifactName: 'CodeAnalysisLogs' + ArtifactType: 'Container' + AllTools: true + ToolLogsNotFoundAction: 'Standard' - job: 'BuildPowerShellModule' timeoutInMinutes: 120 From 8e8b943eff90c8b3ad8ccb3eeb40bdb3a39ca21e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flor=20Chac=C3=B3n?= <14323496+florelis@users.noreply.github.com> Date: Wed, 17 May 2023 10:54:57 -0700 Subject: [PATCH 03/43] update binskim glob pattern --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 06022a87a2..b1421cd672 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -345,7 +345,7 @@ jobs: InputType: 'Basic' Function: 'analyze' TargetPattern: 'guardianGlob' - AnalyzeTargetGlob: '$(buildOutDir)/**.dll;$(buildOutDir)/**.exe;$(Build.SourcesDirectory)\src\WinGetUtilInterop\bin\*.dll;' + AnalyzeTargetGlob: 'f|$(buildOutDir)/**.dll;f|$(buildOutDir)/**.exe;f|$(Build.SourcesDirectory)\src\WinGetUtilInterop\bin\*.dll' - task: PublishSecurityAnalysisLogs@3 inputs: From 01188a1b4db3fb5f6002436a559332d0ec6d3c37 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Wed, 17 May 2023 15:18:13 -0700 Subject: [PATCH 04/43] Simplify vcxprojs with Directory.Build.props --- src/AppInstallerCLI.sln | 1 + src/AppInstallerCLI/AppInstallerCLI.vcxproj | 220 +----------- .../AppInstallerCLI.vcxproj.filters | 1 - src/AppInstallerCLI/PropertySheet.props | 16 - .../AppInstallerCLICore.vcxproj | 269 +------------- .../AppInstallerCLICore.vcxproj.filters | 1 - src/AppInstallerCLICore/PropertySheet.props | 16 - .../AppInstallerCLIE2ETests.csproj | 5 - .../AppInstallerCLIPackage.wapproj | 2 - .../AppInstallerCLITests.vcxproj | 100 +----- .../AppInstallerCLITests.vcxproj.filters | 1 - src/AppInstallerCLITests/PropertySheet.props | 16 - .../AppInstallerCommonCore.vcxproj | 299 +--------------- .../AppInstallerCommonCore.vcxproj.filters | 1 - .../PropertySheet.props | 16 - .../AppInstallerRepositoryCore.vcxproj | 277 +-------------- ...AppInstallerRepositoryCore.vcxproj.filters | 1 - .../PropertySheet.props | 16 - .../AppInstallerSharedLib.vcxproj | 320 +---------------- .../AppInstallerSharedLib.vcxproj.filters | 1 - src/AppInstallerSharedLib/PropertySheet.props | 16 - .../AppInstallerTestExeInstaller.vcxproj | 93 ----- src/Directory.Build.props | 144 ++++++++ .../IndexCreationTool.csproj | 1 - .../LocalhostWebServer.csproj | 1 - ...Microsoft.Management.Configuration.vcxproj | 99 +----- ...t.Management.Configuration.vcxproj.filters | 1 - .../PropertySheet.props | 16 - ...osoft.Management.Deployment.InProc.vcxproj | 336 +----------------- ...nagement.Deployment.InProc.vcxproj.filters | 1 - .../PropertySheet.props | 16 - .../Microsoft.Management.Deployment.vcxproj | 76 ---- ...soft.Management.Deployment.vcxproj.filters | 1 - .../PropertySheet.props | 16 - src/WinGetServer/PropertySheet.props | 16 - src/WinGetServer/WinGetServer.vcxproj | 82 ----- src/WinGetServer/WinGetServer.vcxproj.filters | 1 - src/WinGetUtil/PropertySheet.props | 16 - src/WinGetUtil/WinGetUtil.vcxproj | 231 +----------- src/WinGetUtil/WinGetUtil.vcxproj.filters | 1 - .../WinGetYamlFuzzing.vcxproj | 61 +--- src/WindowsPackageManager/PropertySheet.props | 16 - .../WindowsPackageManager.vcxproj | 333 +---------------- .../WindowsPackageManager.vcxproj.filters | 1 - 44 files changed, 185 insertions(+), 2969 deletions(-) delete mode 100644 src/AppInstallerCLI/PropertySheet.props delete mode 100644 src/AppInstallerCLICore/PropertySheet.props delete mode 100644 src/AppInstallerCLITests/PropertySheet.props delete mode 100644 src/AppInstallerCommonCore/PropertySheet.props delete mode 100644 src/AppInstallerRepositoryCore/PropertySheet.props delete mode 100644 src/AppInstallerSharedLib/PropertySheet.props create mode 100644 src/Directory.Build.props delete mode 100644 src/Microsoft.Management.Configuration/PropertySheet.props delete mode 100644 src/Microsoft.Management.Deployment.InProc/PropertySheet.props delete mode 100644 src/Microsoft.Management.Deployment/PropertySheet.props delete mode 100644 src/WinGetServer/PropertySheet.props delete mode 100644 src/WinGetUtil/PropertySheet.props delete mode 100644 src/WindowsPackageManager/PropertySheet.props diff --git a/src/AppInstallerCLI.sln b/src/AppInstallerCLI.sln index 32d26789dc..44ed8b5581 100644 --- a/src/AppInstallerCLI.sln +++ b/src/AppInstallerCLI.sln @@ -98,6 +98,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1A5D7A7D-5CB2-47D5-B40D-4E61CAEDC798}" ProjectSection(SolutionItems) = preProject CodeAnalysis.ruleset = CodeAnalysis.ruleset + Directory.Build.props = Directory.Build.props nuget.config = nuget.config stylecop.json = stylecop.json EndProjectSection diff --git a/src/AppInstallerCLI/AppInstallerCLI.vcxproj b/src/AppInstallerCLI/AppInstallerCLI.vcxproj index 9d23801443..91dd975290 100644 --- a/src/AppInstallerCLI/AppInstallerCLI.vcxproj +++ b/src/AppInstallerCLI/AppInstallerCLI.vcxproj @@ -2,17 +2,9 @@ - true - true - true 15.0 {5b6f90df-fd19-4bae-83d9-24dad128e777} - Win32Proj AppInstallerCLI - 10.0.22000.0 - 10.0.17763.0 - true - true @@ -51,225 +43,22 @@ Application - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - - - Spectre - - - Spectre - - - Spectre - - - Spectre + winget - - - - - - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - winget - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - winget - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - winget - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - winget - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - winget - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - winget - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - winget - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - winget - NotUsing - pch.h - $(IntDir)pch.pch - _CONSOLE;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /bigobj - - - - - Disabled - _DEBUG;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\WindowsPackageManager\;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\WindowsPackageManager\;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\WindowsPackageManager\;%(AdditionalIncludeDirectories) - true - true - true - false - false - false - stdcpp17 - stdcpp17 - stdcpp17 - true - true - true - true - true - true - - - Console - false - %(AdditionalDependencies) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - WIN32;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\WindowsPackageManager\;%(AdditionalIncludeDirectories) - true - false - stdcpp17 - true - true - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\WindowsPackageManager\;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\WindowsPackageManager\;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\WindowsPackageManager\;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\WindowsPackageManager\;%(AdditionalIncludeDirectories) - true - true - true - true - Guard - Guard - Guard - Guard - stdcpp17 - stdcpp17 - stdcpp17 - stdcpp17 - true - true - true - true - false - false - false - false + $(ProjectDir);$(ProjectDir)..\WindowsPackageManager\;%(AdditionalIncludeDirectories) - - Console - true - true - false - %(AdditionalDependencies) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) + $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) @@ -277,7 +66,6 @@ - @@ -295,4 +83,4 @@ - + \ No newline at end of file diff --git a/src/AppInstallerCLI/AppInstallerCLI.vcxproj.filters b/src/AppInstallerCLI/AppInstallerCLI.vcxproj.filters index 9afaafe5a0..a15ae016c4 100644 --- a/src/AppInstallerCLI/AppInstallerCLI.vcxproj.filters +++ b/src/AppInstallerCLI/AppInstallerCLI.vcxproj.filters @@ -20,7 +20,6 @@ - \ No newline at end of file diff --git a/src/AppInstallerCLI/PropertySheet.props b/src/AppInstallerCLI/PropertySheet.props deleted file mode 100644 index c6b0691ddd..0000000000 --- a/src/AppInstallerCLI/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/AppInstallerCLICore/AppInstallerCLICore.vcxproj b/src/AppInstallerCLICore/AppInstallerCLICore.vcxproj index 04ebb3e393..d32974a462 100644 --- a/src/AppInstallerCLICore/AppInstallerCLICore.vcxproj +++ b/src/AppInstallerCLICore/AppInstallerCLICore.vcxproj @@ -2,17 +2,9 @@ - true - true - true 15.0 {1c6e0108-2860-4b17-9f7e-fa5c6c1f3d3d} - Win32Proj AppInstallerCLICore - 10.0.22000.0 - 10.0.17763.0 - true - true @@ -65,55 +57,7 @@ x64 - - StaticLibrary - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - - - false - true - false - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - @@ -121,220 +65,16 @@ - - - - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - Use - pch.h - $(IntDir)pch.pch - _CONSOLE;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING - - - - - Disabled - _DEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - true + + CLICOREDLLBUILD;%(PreprocessorDefinitions); + $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - false - Windows - Windows - Windows + Windows - - - WIN32;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - true - true - - - Windows - - - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - false - false - false - false - - - true - true - false - Windows - Windows - Windows - Windows - - - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - false - false - false - false - MultiThreaded - MultiThreaded - MultiThreaded - MultiThreaded - - - true - true - false - Windows - Windows - Windows - Windows - - - - - AICLI_DISABLE_TEST_HOOKS;%(PreprocessorDefinitions) - - - - - WINGET_DISABLE_EXPERIMENTAL_FEATURES;%(PreprocessorDefinitions) - - @@ -470,7 +210,6 @@ - diff --git a/src/AppInstallerCLICore/AppInstallerCLICore.vcxproj.filters b/src/AppInstallerCLICore/AppInstallerCLICore.vcxproj.filters index dd08ae6951..e3daeb3ae3 100644 --- a/src/AppInstallerCLICore/AppInstallerCLICore.vcxproj.filters +++ b/src/AppInstallerCLICore/AppInstallerCLICore.vcxproj.filters @@ -405,7 +405,6 @@ - \ No newline at end of file diff --git a/src/AppInstallerCLICore/PropertySheet.props b/src/AppInstallerCLICore/PropertySheet.props deleted file mode 100644 index c6b0691ddd..0000000000 --- a/src/AppInstallerCLICore/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj b/src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj index e2288ba35e..c3acfd1797 100644 --- a/src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj +++ b/src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj @@ -2,7 +2,6 @@ net6.0-windows - $(SolutionDir)$(Platform)\$(Configuration)\AppInstallerCLIE2ETests\ false x64;x86 Library @@ -16,10 +15,6 @@ 1591 - - true - - diff --git a/src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj b/src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj index 54617a52fd..516deb8e1b 100644 --- a/src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj +++ b/src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj @@ -51,8 +51,6 @@ 6aa3791a-0713-4548-a357-87a323e7ac3a - 10.0.22000.0 - 10.0.17763.0 en-US false ..\AppInstallerCLI\AppInstallerCLI.vcxproj diff --git a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj index eb5f35ccb1..64d47d56b7 100644 --- a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj +++ b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj @@ -2,16 +2,10 @@ - true - true true - true 15.0 {89b1aab4-2bbc-4b65-9ed7-a01d5cf88230} - Win32Proj AppInstallerCLITests - 10.0.22000.0 - 10.0.17763.0 AppInstallerCLITests @@ -35,24 +29,8 @@ Application - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - - @@ -62,10 +40,6 @@ - - - - true $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ @@ -99,82 +73,19 @@ $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - Use - pch.h - $(IntDir)pch.pch - _CONSOLE;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING - - - Disabled - _NO_ASYNCRTIMP;_DEBUG;%(PreprocessorDefinitions) - $(MSBuildThisFileDirectory)..\AppInstallerCommonCore;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore;$(MSBuildThisFileDirectory)..\AppInstallerCommonCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerSharedLib\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - true - - - Console - false - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - - - $(ProjectDir)..\manifest\shared.manifest - - - copy "$(ProjectDir)..\AppInstallerCLIPackage\bin\$(PlatformTarget)\$(configuration)\resources.pri" "$(TargetDir)\resources.pri" - - - - - _NO_ASYNCRTIMP;WIN32;%(PreprocessorDefinitions) - $(MSBuildThisFileDirectory)..\AppInstallerCommonCore;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore;$(MSBuildThisFileDirectory)..\AppInstallerCommonCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerSharedLib\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - true - - - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - - - $(ProjectDir)..\manifest\shared.manifest - - - copy "$(ProjectDir)..\AppInstallerCLIPackage\bin\$(PlatformTarget)\$(configuration)\resources.pri" "$(TargetDir)\resources.pri" - - - - - MaxSpeed - true - true - _NO_ASYNCRTIMP;NDEBUG;%(PreprocessorDefinitions) - $(MSBuildThisFileDirectory)..\AppInstallerCommonCore;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore;$(MSBuildThisFileDirectory)..\AppInstallerCommonCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerSharedLib\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - $(MSBuildThisFileDirectory)..\AppInstallerCommonCore;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore;$(MSBuildThisFileDirectory)..\AppInstallerCommonCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerSharedLib\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - true - true + _NO_ASYNCRTIMP;%(PreprocessorDefinitions) + $(MSBuildThisFileDirectory)..\AppInstallerCommonCore;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerRepositoryCore;$(MSBuildThisFileDirectory)..\AppInstallerCommonCore\Public;$(MSBuildThisFileDirectory)..\AppInstallerSharedLib\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore\Public;$(MSBuildThisFileDirectory)..\AppInstallerCLICore;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - Console - true - true - false - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) + wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - $(ProjectDir)..\manifest\shared.manifest + $(ProjectDir)..\manifest\shared.manifest - - $(ProjectDir)..\manifest\shared.manifest - - - copy "$(ProjectDir)..\AppInstallerCLIPackage\bin\$(PlatformTarget)\$(configuration)\resources.pri" "$(TargetDir)\resources.pri" - - copy "$(ProjectDir)..\AppInstallerCLIPackage\bin\$(PlatformTarget)\$(configuration)\resources.pri" "$(TargetDir)\resources.pri" + copy "$(ProjectDir)..\AppInstallerCLIPackage\bin\$(PlatformTarget)\$(configuration)\resources.pri" "$(TargetDir)\resources.pri" @@ -376,7 +287,6 @@ true - true diff --git a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters index 6e581b1893..84e1eef030 100644 --- a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters +++ b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters @@ -295,7 +295,6 @@ - diff --git a/src/AppInstallerCLITests/PropertySheet.props b/src/AppInstallerCLITests/PropertySheet.props deleted file mode 100644 index b0c622690f..0000000000 --- a/src/AppInstallerCLITests/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj b/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj index d00dcf04bd..f92f8eede6 100644 --- a/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj +++ b/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj @@ -2,17 +2,9 @@ - true - true - true 15.0 {5890d6ed-7c3b-40f3-b436-b54f640d9e65} - Win32Proj AppInstallerLoggingCore - 10.0.22000.0 - 10.0.17763.0 - true - true @@ -69,61 +61,7 @@ x64 - - StaticLibrary - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - - - false - true - false - - - false - false - false - true - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - @@ -133,248 +71,16 @@ - - - - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - Use - pch.h - $(IntDir)pch.pch - _CONSOLE;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING - - - Disabled - _NO_ASYNCRTIMP;_DEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - true - - - false - Windows - Windows - Windows - - - - - _NO_ASYNCRTIMP;WIN32;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) - true - true - true - - - Windows - - - - - MaxSpeed - true - true - _NO_ASYNCRTIMP;NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - false - false - false - false - - - true - true - false - Windows - Windows - Windows - Windows - - - - - MaxSpeed - true - true - _NO_ASYNCRTIMP;NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - false - false - false - false - MultiThreaded - MultiThreaded - MultiThreaded - MultiThreaded - - - true - true - false - Windows - Windows - Windows - Windows - - - - - MaxSpeed - true - true - _NO_ASYNCRTIMP;NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD;WINGET_DISABLE_FOR_FUZZING - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - stdcpp17 - MultiThreaded - %(AdditionalOptions) /fsanitize-coverage=inline-8bit-counters /fsanitize-coverage=edge /fsanitize-coverage=trace-cmp /fsanitize-coverage=trace-div + _NO_ASYNCRTIMP;CLICOREDLLBUILD;%(PreprocessorDefinitions) + $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\AppInstallerSharedLib;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) - true - true - false Windows - - - AICLI_DISABLE_TEST_HOOKS;%(PreprocessorDefinitions) - - - - - WINGET_DISABLE_EXPERIMENTAL_FEATURES;%(PreprocessorDefinitions) - - - - - WINGET_ENABLE_RELEASE_BUILD;%(PreprocessorDefinitions) - - @@ -498,7 +204,6 @@ - diff --git a/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj.filters b/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj.filters index 2f69d23e33..6241c59311 100644 --- a/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj.filters +++ b/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj.filters @@ -337,7 +337,6 @@ - \ No newline at end of file diff --git a/src/AppInstallerCommonCore/PropertySheet.props b/src/AppInstallerCommonCore/PropertySheet.props deleted file mode 100644 index c6b0691ddd..0000000000 --- a/src/AppInstallerCommonCore/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj b/src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj index 937fdecafc..55f170bd7d 100644 --- a/src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj +++ b/src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj @@ -2,17 +2,9 @@ - true - true - true 15.0 {5eb88068-5fb9-4e69-89b2-72dbc5e068f9} - Win32Proj AppInstallerRepositoryCore - 10.0.22000.0 - 10.0.17763.0 - true - true @@ -65,268 +57,17 @@ x64 - - StaticLibrary - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - - - false - true - false - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - - - - - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - Use - pch.h - $(IntDir)pch.pch - _CONSOLE;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING - - - - - Disabled - _NO_ASYNCRTIMP;_DEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - true - - - false - Windows - Windows - Windows - - - - - _NO_ASYNCRTIMP;WIN32;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - true - true - true - - - Windows - - - - - MaxSpeed - true - true - _NO_ASYNCRTIMP;NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - false - false - false - false - - - true - true - false - Windows - Windows - Windows - Windows - - - - - MaxSpeed - true - true - _NO_ASYNCRTIMP;NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - false - false - false - false - MultiThreaded - MultiThreaded - MultiThreaded - MultiThreaded - - - true - true - false - Windows - Windows - Windows - Windows - - - - - AICLI_DISABLE_TEST_HOOKS;%(PreprocessorDefinitions) + _NO_ASYNCRTIMP;CLICOREDLLBUILD;%(PreprocessorDefinitions) + $(ProjectDir);$(ProjectDir)\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -429,18 +170,7 @@ - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing - NotUsing + NotUsing @@ -513,7 +243,6 @@ - diff --git a/src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj.filters b/src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj.filters index a1baf663b9..87ea3820de 100644 --- a/src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj.filters +++ b/src/AppInstallerRepositoryCore/AppInstallerRepositoryCore.vcxproj.filters @@ -571,7 +571,6 @@ - Microsoft diff --git a/src/AppInstallerRepositoryCore/PropertySheet.props b/src/AppInstallerRepositoryCore/PropertySheet.props deleted file mode 100644 index c6b0691ddd..0000000000 --- a/src/AppInstallerRepositoryCore/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/AppInstallerSharedLib/AppInstallerSharedLib.vcxproj b/src/AppInstallerSharedLib/AppInstallerSharedLib.vcxproj index 4b7646afc6..59a11df836 100644 --- a/src/AppInstallerSharedLib/AppInstallerSharedLib.vcxproj +++ b/src/AppInstallerSharedLib/AppInstallerSharedLib.vcxproj @@ -2,16 +2,8 @@ - true - true - true 15.0 {F3F6E699-BC5D-4950-8A05-E49DD9EB0D51} - Win32Proj - 10.0.22000.0 - 10.0.17763.0 - true - true @@ -68,323 +60,18 @@ x64 - - StaticLibrary - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - - - false - true - false - - - false - false - false - true - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - - - - - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - Use - pch.h - $(IntDir)pch.pch - _CONSOLE;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING - - - - - Disabled - _NO_ASYNCRTIMP;_DEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - true - false - false - false - false - false - - - false - Windows - Windows - Windows - - - - - _NO_ASYNCRTIMP;WIN32;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) - true - true - true - false - false - - - Windows - - - - - MaxSpeed - true - true - _NO_ASYNCRTIMP;NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - false - false - false - false - false - false - false - false - - - true - true - false - Windows - Windows - Windows - Windows - - - - - MaxSpeed - true - true - _NO_ASYNCRTIMP;NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\PureLib\pure;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - true - true - true - true - true - true - true - false - false - false - false - false - false - false - false - MultiThreaded - MultiThreaded - MultiThreaded - MultiThreaded - - - true - true - false - Windows - Windows - Windows - Windows - - - - - MaxSpeed - true - true - _NO_ASYNCRTIMP;NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD;WINGET_DISABLE_FOR_FUZZING - $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - stdcpp17 - MultiThreaded - %(AdditionalOptions) /fsanitize-coverage=inline-8bit-counters /fsanitize-coverage=edge /fsanitize-coverage=trace-cmp /fsanitize-coverage=trace-div - false - - - true - true - false - Windows - - - - - AICLI_DISABLE_TEST_HOOKS;%(PreprocessorDefinitions) - - - - - WINGET_DISABLE_EXPERIMENTAL_FEATURES;%(PreprocessorDefinitions) - - - - - WINGET_ENABLE_RELEASE_BUILD;%(PreprocessorDefinitions) + _NO_ASYNCRTIMP;CLICOREDLLBUILD;%(PreprocessorDefinitions) + $(ProjectDir);$(ProjectDir)Public;$(ProjectDir)Telemetry;$(ProjectDir)..\binver;$(ProjectDir)..\YamlCppLib\libyaml\include;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\PureLib\pure;%(AdditionalIncludeDirectories) + false @@ -425,7 +112,6 @@ - diff --git a/src/AppInstallerSharedLib/AppInstallerSharedLib.vcxproj.filters b/src/AppInstallerSharedLib/AppInstallerSharedLib.vcxproj.filters index cd25369702..251f630496 100644 --- a/src/AppInstallerSharedLib/AppInstallerSharedLib.vcxproj.filters +++ b/src/AppInstallerSharedLib/AppInstallerSharedLib.vcxproj.filters @@ -114,7 +114,6 @@ - \ No newline at end of file diff --git a/src/AppInstallerSharedLib/PropertySheet.props b/src/AppInstallerSharedLib/PropertySheet.props deleted file mode 100644 index c6b0691ddd..0000000000 --- a/src/AppInstallerSharedLib/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj b/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj index 8c55233101..682dce0ffc 100644 --- a/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj +++ b/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj @@ -3,12 +3,7 @@ 15.0 {6CB84692-5994-407D-B9BD-9216AF77FE83} - Win32Proj AppInstallerTestExeInstaller - 10.0.22000.0 - 10.0.17763.0 - true - true @@ -47,108 +42,20 @@ Application - v140 - v141 - v142 - v143 - Unicode - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - - - NotUsing - pch.h - $(IntDir)pch.pch - _CONSOLE;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /bigobj /Zi - Disabled - _DEBUG;%(PreprocessorDefinitions) - true - true - true - stdcpp17 - stdcpp17 - stdcpp17 MultiThreadedDebugDLL - - Console - false - - - - - WIN32;%(PreprocessorDefinitions) - true - stdcpp17 - - - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions) - true - true - true - true - stdcpp17 - stdcpp17 - stdcpp17 - stdcpp17 - - - Console - true - true - false - diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 0000000000..ae6359e597 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,144 @@ + + + + + + true + true + true + true + true + true + + + + + + + false + + + + TurnOffAllWarnings + false + + + + + + + + true + + + + + + true + true + true + Win32Proj + 10.0.22000.0 + 10.0.17763.0 + true + true + + + + StaticLibrary + v140 + v141 + v142 + v143 + Unicode + + + false + true + false + Spectre + false + + + true + true + true + $(SolutionDir)CodeAnalysis.ruleset + true + + + false + false + false + true + + + + $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + Use + pch.h + $(IntDir)pch.pch + AICLI_DISABLE_TEST_HOOKS;%(PreprocessorDefinitions) + WINGET_DISABLE_EXPERIMENTAL_FEATURES;%(PreprocessorDefinitions) + WINGET_ENABLE_RELEASE_BUILD;%(PreprocessorDefinitions) + USE_PROD_CLSIDS;%(PreprocessorDefinitions) + USE_PROD_WINGET_SERVER;%(PreprocessorDefinitions) + Level4 + %(AdditionalOptions) /permissive- /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING + true + stdcpp17 + true + true + MultiThreaded + + + Console + false + true + + + + + WIN32;%(PreprocessorDefinitions) + + + + + MaxSpeed + true + true + NDEBUG;%(PreprocessorDefinitions) + Guard + + + true + true + /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) + + + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + false + + + + + MultiThreaded + %(AdditionalOptions) /fsanitize-coverage=inline-8bit-counters /fsanitize-coverage=edge /fsanitize-coverage=trace-cmp /fsanitize-coverage=trace-div + + + + + \ No newline at end of file diff --git a/src/IndexCreationTool/IndexCreationTool.csproj b/src/IndexCreationTool/IndexCreationTool.csproj index 05b04b2b03..a5964604c7 100644 --- a/src/IndexCreationTool/IndexCreationTool.csproj +++ b/src/IndexCreationTool/IndexCreationTool.csproj @@ -3,7 +3,6 @@ Exe net6.0 - $(SolutionDir)$(Platform)\$(Configuration)\IndexCreationTool\ x64;x86 diff --git a/src/LocalhostWebServer/LocalhostWebServer.csproj b/src/LocalhostWebServer/LocalhostWebServer.csproj index 90f2342421..7f31460151 100644 --- a/src/LocalhostWebServer/LocalhostWebServer.csproj +++ b/src/LocalhostWebServer/LocalhostWebServer.csproj @@ -2,7 +2,6 @@ net6.0 - $(SolutionDir)$(Platform)\$(Configuration)\LocalhostWebServer\ x64;x86 diff --git a/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj b/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj index 87f4d54396..43559b7a51 100644 --- a/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj +++ b/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj @@ -2,10 +2,7 @@ - true - true true - true {CA460806-5E41-4E97-9A3D-1D74B433B663} Microsoft.Management.Configuration Microsoft.Management.Configuration @@ -13,9 +10,6 @@ 14.0 10.0 10.0.19041.0 - 10.0.17763.0 - true - true @@ -70,65 +64,27 @@ DynamicLibrary - v140 - v141 - v142 - v143 - Unicode false true - - true - true - - - false - true - false - Spectre - - - false - true - false - Spectre - - - - - - - $(VC_IncludePath);$(WindowsSDK_IncludePath); - $(SolutionDir)$(PlatformTarget)\$(Configuration)\$(ProjectName)\ $(PlatformTarget)\$(Configuration)\ $(RootNamespace) - true - true - ..\CodeAnalysis.ruleset - Use - pch.h - $(IntDir)pch.pch - Level4 %(AdditionalOptions) /bigobj - true - true _WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) $(ProjectDir);$(ProjectDir)..\AppInstallerSharedLib\Public;%(AdditionalIncludeDirectories) + false - Console - false Microsoft_Management_Configuration.def $(OutDir)$(ProjectName).winmd Advapi32.lib;%(AdditionalDependencies) @@ -136,59 +92,7 @@ - _DEBUG;%(PreprocessorDefinitions) $(OutDir)$(TargetName)Debug.pdb - false - false - false - false - false - false - false - false - - - - - NDEBUG;%(PreprocessorDefinitions) - false - false - false - false - Guard - Guard - Guard - Guard - - - true - true - - - - - NDEBUG;%(PreprocessorDefinitions) - false - false - false - false - MultiThreaded - MultiThreaded - MultiThreaded - MultiThreaded - Guard - Guard - Guard - Guard - - - true - true - - - - - AICLI_DISABLE_TEST_HOOKS;%(PreprocessorDefinitions) @@ -263,7 +167,6 @@ - diff --git a/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj.filters b/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj.filters index d7016d4397..97e18e526b 100644 --- a/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj.filters +++ b/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj.filters @@ -187,7 +187,6 @@ - diff --git a/src/Microsoft.Management.Configuration/PropertySheet.props b/src/Microsoft.Management.Configuration/PropertySheet.props deleted file mode 100644 index e34141b019..0000000000 --- a/src/Microsoft.Management.Configuration/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.Management.Deployment.InProc/Microsoft.Management.Deployment.InProc.vcxproj b/src/Microsoft.Management.Deployment.InProc/Microsoft.Management.Deployment.InProc.vcxproj index cb70c82ae9..b81582b740 100644 --- a/src/Microsoft.Management.Deployment.InProc/Microsoft.Management.Deployment.InProc.vcxproj +++ b/src/Microsoft.Management.Deployment.InProc/Microsoft.Management.Deployment.InProc.vcxproj @@ -2,17 +2,9 @@ - true - true - true 15.0 - Win32Proj {9ac3c6a4-1875-4d3e-bf9c-c31e81eff6b4} MicrosoftManagementDeploymentInProc - 10.0.22000.0 - 10.0.17763.0 - true - true false @@ -68,341 +60,22 @@ DynamicLibrary - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - - - false - true - false - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - - - - - - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - Use - pch.h - $(IntDir)pch.pch - _CONSOLE;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING - - - - - Disabled - _DEBUG;%(PreprocessorDefinitions) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - true - true - true - false - false - false - stdcpp17 - stdcpp17 - stdcpp17 - true - true - true - true - true - true + $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) false - Windows - Windows - Windows - Windows - Source.def - Source.def - Source.def - Source.def - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) + Source.def + wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - WIN32;%(PreprocessorDefinitions) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - true - false - stdcpp17 - true - true - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - true - true - true - true - Guard - Guard - Guard - Guard - stdcpp17 - stdcpp17 - stdcpp17 - stdcpp17 - true - true - true - true - false - false - false - false - - - true - true - false - Windows - Windows - Windows - Windows - Source.def - Source.def - Source.def - Source.def - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) - true - true - true - true - Guard - Guard - Guard - Guard - stdcpp17 - stdcpp17 - stdcpp17 - stdcpp17 - true - true - true - true - false - false - false - false - MultiThreaded - MultiThreaded - MultiThreaded - MultiThreaded - - - true - true - false - Windows - Windows - Windows - Windows - Source.def - Source.def - Source.def - Source.def - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) + $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) @@ -421,7 +94,6 @@ - diff --git a/src/Microsoft.Management.Deployment.InProc/Microsoft.Management.Deployment.InProc.vcxproj.filters b/src/Microsoft.Management.Deployment.InProc/Microsoft.Management.Deployment.InProc.vcxproj.filters index 3b66a402ed..ac74adfc2c 100644 --- a/src/Microsoft.Management.Deployment.InProc/Microsoft.Management.Deployment.InProc.vcxproj.filters +++ b/src/Microsoft.Management.Deployment.InProc/Microsoft.Management.Deployment.InProc.vcxproj.filters @@ -29,7 +29,6 @@ - Source Files diff --git a/src/Microsoft.Management.Deployment.InProc/PropertySheet.props b/src/Microsoft.Management.Deployment.InProc/PropertySheet.props deleted file mode 100644 index c6b0691ddd..0000000000 --- a/src/Microsoft.Management.Deployment.InProc/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj b/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj index bf837ad368..1e37e973bb 100644 --- a/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj +++ b/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj @@ -2,20 +2,13 @@ - true - true true - true {1cc41a9a-ae66-459d-9210-1e572dd7be69} Microsoft.Management.Deployment Microsoft.Management.Deployment en-US 14.0 10.0 - 10.0.22000.0 - 10.0.17763.0 - true - true -library Microsoft_Management_Deployment @@ -70,68 +63,28 @@ - StaticLibrary - v140 - v141 - v142 - v143 - Unicode false - - true - true - - - false - true - false - Spectre - - - false - true - false - Spectre - - - - - - - $(VC_IncludePath);$(WindowsSDK_IncludePath); - $(SolutionDir)$(PlatformTarget)\$(Configuration)\$(ProjectName)\ $(PlatformTarget)\$(Configuration)\ $(RootNamespace).Server - true - false - ..\CodeAnalysis.ruleset - Use - pch.h - $(IntDir)pch.pch - Level4 %(AdditionalOptions) /bigobj - true - true _WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) $(ProjectDir)..\AppInstallerCLICore;$(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - Console - false Microsoft_Management_Deployment.def $(OutDir)$(ProjectName).winmd AppInstallerCLICore.lib;AppInstallerCommonCore.lib;AppInstallerRepositoryCore.lib;JsonCppLib.lib;YamlCppLib.lib;cpprestsdk.lib;wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;pure.lib%(AdditionalDependencies) @@ -139,37 +92,9 @@ - _DEBUG;%(PreprocessorDefinitions) $(OutDir)$(TargetName)Debug.pdb - - - NDEBUG;%(PreprocessorDefinitions) - - - true - true - - - - - NDEBUG;%(PreprocessorDefinitions) - MultiThreaded - MultiThreaded - MultiThreaded - MultiThreaded - - - true - true - - - - - USE_PROD_CLSIDS;%(PreprocessorDefinitions) - - @@ -242,7 +167,6 @@ - diff --git a/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj.filters b/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj.filters index f524c0c6b7..25a4033500 100644 --- a/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj.filters +++ b/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj.filters @@ -73,7 +73,6 @@ - diff --git a/src/Microsoft.Management.Deployment/PropertySheet.props b/src/Microsoft.Management.Deployment/PropertySheet.props deleted file mode 100644 index e34141b019..0000000000 --- a/src/Microsoft.Management.Deployment/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/WinGetServer/PropertySheet.props b/src/WinGetServer/PropertySheet.props deleted file mode 100644 index 273b9fbfed..0000000000 --- a/src/WinGetServer/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/WinGetServer/WinGetServer.vcxproj b/src/WinGetServer/WinGetServer.vcxproj index dde774aa01..6cdfb75138 100644 --- a/src/WinGetServer/WinGetServer.vcxproj +++ b/src/WinGetServer/WinGetServer.vcxproj @@ -1,18 +1,10 @@ - true - true true - true 15.0 {2b00d362-ac92-41f3-a8d2-5b1599bdca01} - Win32Proj WinGetServer - 10.0.22000.0 - 10.0.17763.0 - true - true WinGetServer WindowsPackageManagerServer @@ -53,53 +45,20 @@ Application - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - Spectre - - - - - - - - - $(SolutionDir)$(PlatformTarget)\$(Configuration)\$(ProjectName)\ $(PlatformTarget)\$(Configuration)\ $(OutDir)..\Microsoft.Management.Deployment;$(OutDir)..\AppInstallerCLICore;$(OutDir)..\JsonCppLib;$(OutDir)..\AppInstallerRepositoryCore;$(OutDir)..\YamlCppLib;$(OutDir)..\AppInstallerCommonCore;$(OutDir)..\cpprestsdk;$(LibraryPath) - true - false - ..\CodeAnalysis.ruleset NotUsing - pch.h - $(IntDir)pch.pch _CONSOLE;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) - Level4 %(AdditionalOptions) /permissive- /bigobj - true - true - true $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) @@ -109,51 +68,11 @@ Rpcrt4.lib;Advapi32.lib;Shell32.lib;Ole32.lib;%(AdditionalDependencies) - - - Disabled - _DEBUG;%(PreprocessorDefinitions) - stdcpp17 - stdcpp17 - stdcpp17 - - - - - WIN32;%(PreprocessorDefinitions) - stdcpp17 - - WIN32;_ARM_;%(PreprocessorDefinitions) - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions) - stdcpp17 - stdcpp17 - stdcpp17 - stdcpp17 - - - true - true - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - - - - - USE_PROD_WINGET_SERVER;%(PreprocessorDefinitions) - - @@ -164,7 +83,6 @@ - diff --git a/src/WinGetServer/WinGetServer.vcxproj.filters b/src/WinGetServer/WinGetServer.vcxproj.filters index 71519a4d9d..fd1082cdd8 100644 --- a/src/WinGetServer/WinGetServer.vcxproj.filters +++ b/src/WinGetServer/WinGetServer.vcxproj.filters @@ -37,7 +37,6 @@ - diff --git a/src/WinGetUtil/PropertySheet.props b/src/WinGetUtil/PropertySheet.props deleted file mode 100644 index c6b0691ddd..0000000000 --- a/src/WinGetUtil/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/WinGetUtil/WinGetUtil.vcxproj b/src/WinGetUtil/WinGetUtil.vcxproj index d98d822a7c..424ea3843f 100644 --- a/src/WinGetUtil/WinGetUtil.vcxproj +++ b/src/WinGetUtil/WinGetUtil.vcxproj @@ -2,17 +2,9 @@ - true - true - true 15.0 {FB313532-38B0-4676-9303-AB200AA13576} - Win32Proj WinGetUtil - 10.0.22000.0 - 10.0.17763.0 - true - true @@ -51,32 +43,6 @@ DynamicLibrary - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - - - Spectre - - - Spectre - - - Spectre - - - Spectre @@ -88,203 +54,17 @@ - - - - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - Use - pch.h - $(IntDir)pch.pch - _CONSOLE;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING - - - - - Disabled - _DEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)..\AppInstallerCommonCore;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\JsonCppLib\json;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCommonCore;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\JsonCppLib\json;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCommonCore;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\JsonCppLib\json;%(AdditionalIncludeDirectories) - true - true - true - false - false - false - true - true - true - true - true - true + $(ProjectDir);$(ProjectDir)..\AppInstallerCommonCore;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\JsonCppLib\json;%(AdditionalIncludeDirectories) - false - Windows - Windows - Windows - Source.def - Source.def - Source.def - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;%(AdditionalDependencies) - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;%(AdditionalDependencies) - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;%(AdditionalDependencies) - winsqlite3.dll;icuuc.dll;icuin.dll;%(DelayLoadDLLs) - winsqlite3.dll;icuuc.dll;icuin.dll;%(DelayLoadDLLs) - winsqlite3.dll;icuuc.dll;icuin.dll;%(DelayLoadDLLs) + Source.def + wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;%(AdditionalDependencies) + winsqlite3.dll;icuuc.dll;icuin.dll;%(DelayLoadDLLs) - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - WIN32;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)..\AppInstallerCommonCore;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;$(ProjectDir)..\JsonCppLib\json;%(AdditionalIncludeDirectories) - true - false - true - true - - - Windows - Source.def - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;%(AdditionalDependencies) - winsqlite3.dll;icuuc.dll;icuin.dll;%(DelayLoadDLLs) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions);CLICOREDLLBUILD - $(ProjectDir);$(ProjectDir)..\AppInstallerCommonCore;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCommonCore;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCommonCore;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCommonCore;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\cpprestsdk\cpprestsdk\Release\include;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) - true - true - true - true - Guard - Guard - Guard - Guard - true - true - true - true - false - false - false - false - - - true - true - false - Windows - Windows - Windows - Windows - Source.def - Source.def - Source.def - Source.def - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;%(AdditionalDependencies) - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;%(AdditionalDependencies) - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;%(AdditionalDependencies) - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;%(AdditionalDependencies) - winsqlite3.dll;icuuc.dll;icuin.dll;%(DelayLoadDLLs) - winsqlite3.dll;icuuc.dll;icuin.dll;%(DelayLoadDLLs) - winsqlite3.dll;icuuc.dll;icuin.dll;%(DelayLoadDLLs) - winsqlite3.dll;icuuc.dll;icuin.dll;%(DelayLoadDLLs) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) + $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) @@ -299,7 +79,6 @@ - diff --git a/src/WinGetUtil/WinGetUtil.vcxproj.filters b/src/WinGetUtil/WinGetUtil.vcxproj.filters index 529885e975..b908318335 100644 --- a/src/WinGetUtil/WinGetUtil.vcxproj.filters +++ b/src/WinGetUtil/WinGetUtil.vcxproj.filters @@ -31,7 +31,6 @@ - Source Files diff --git a/src/WinGetYamlFuzzing/WinGetYamlFuzzing.vcxproj b/src/WinGetYamlFuzzing/WinGetYamlFuzzing.vcxproj index bf2a6ca306..33f01c6b01 100644 --- a/src/WinGetYamlFuzzing/WinGetYamlFuzzing.vcxproj +++ b/src/WinGetYamlFuzzing/WinGetYamlFuzzing.vcxproj @@ -12,31 +12,16 @@ 16.0 - Win32Proj {1622da16-914f-4f57-a259-d5169003cc8c} WinGetYamlFuzzing 10.0 - + Application - false - v142 - false - Unicode - true - - - Application - false - v142 - v143 - false - Unicode + false - - @@ -46,55 +31,17 @@ - - - false - - - false - - + - Level3 - true - true - true - NDEBUG;_CONSOLE;WINGET_DISABLE_FOR_FUZZING;%(PreprocessorDefinitions) + WINGET_DISABLE_FOR_FUZZING;%(PreprocessorDefinitions) true - stdcpp17 $(ProjectDir)..\AppInstallerCommonCore\Public;%(AdditionalIncludeDirectories) - MultiThreaded - /fsanitize-coverage=inline-8bit-counters /fsanitize-coverage=edge /fsanitize-coverage=trace-cmp /fsanitize-coverage=trace-div %(AdditionalOptions) - Console - true - true true YOUR_LLVM_BUILT_LIBFUZZER.lib;legacy_stdio_definitions.lib;libsancov.lib;icuuc.lib;icuin.lib;urlmon.lib;Bcrypt.lib;%(AdditionalDependencies) - - - Level3 - true - true - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - stdcpp17 - $(ProjectDir)..\AppInstallerCommonCore\Public;%(AdditionalIncludeDirectories) - MultiThreadedDebugDLL - Disabled - - - Console - true - true - true - icuuc.lib;icuin.lib;urlmon.lib;Bcrypt.lib;%(AdditionalDependencies) - - diff --git a/src/WindowsPackageManager/PropertySheet.props b/src/WindowsPackageManager/PropertySheet.props deleted file mode 100644 index c6b0691ddd..0000000000 --- a/src/WindowsPackageManager/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/WindowsPackageManager/WindowsPackageManager.vcxproj b/src/WindowsPackageManager/WindowsPackageManager.vcxproj index 33bd425ef1..e7ca8f4745 100644 --- a/src/WindowsPackageManager/WindowsPackageManager.vcxproj +++ b/src/WindowsPackageManager/WindowsPackageManager.vcxproj @@ -2,17 +2,9 @@ - true - true - true 15.0 {2046B5AF-666D-4CE8-8D3E-C32C57908A56} - Win32Proj WindowsPackageManager - 10.0.22000.0 - 10.0.17763.0 - true - true false . @@ -70,53 +62,8 @@ DynamicLibrary - v140 - v141 - v142 - v143 - Unicode - - - true - true - - - false - true - false - - - false - true - false - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - - Spectre - - @@ -127,287 +74,18 @@ - - - - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - true - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - true - false - ..\CodeAnalysis.ruleset - NotUsing - _CONSOLE;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /permissive- /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING - - - - - Disabled - _DEBUG;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - true - true - true - false - false - false - stdcpp17 - stdcpp17 - stdcpp17 - true - true - true - true - true - true - - - false - Windows - Windows - Windows - Windows - Source.def - Source.def - Source.def - Source.def - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - WIN32;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - true - false - stdcpp17 - true - true - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - true - true - true - true - Guard - Guard - Guard - Guard - stdcpp17 - stdcpp17 - stdcpp17 - stdcpp17 - true - true - true - true - false - false - false - false - - - true - true - false - Windows - Windows - Windows - Windows - Source.def - Source.def - Source.def - Source.def - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - - - MaxSpeed - true - true - NDEBUG;%(PreprocessorDefinitions) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - true - true - true - true - Guard - Guard - Guard - Guard - stdcpp17 - stdcpp17 - stdcpp17 - stdcpp17 - true - true - true - true - false - false - false - false - MultiThreaded - MultiThreaded - MultiThreaded - MultiThreaded + $(ProjectDir);$(ProjectDir)..\AppInstallerCLICore\Public\;$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\Microsoft.Management.Deployment\Public;%(AdditionalIncludeDirectories) - true - true - false - Windows - Windows - Windows - Windows - Source.def - Source.def - Source.def - Source.def - wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) + Windows + Source.def + wininet.lib;shell32.lib;winsqlite3.lib;shlwapi.lib;icuuc.lib;icuin.lib;urlmon.lib;Advapi32.lib;winhttp.lib;onecoreuap.lib;msi.lib;%(AdditionalDependencies) - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) - - - $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) + $(ProjectDir)..\manifest\shared.manifest %(AdditionalManifestFiles) @@ -419,7 +97,6 @@ - diff --git a/src/WindowsPackageManager/WindowsPackageManager.vcxproj.filters b/src/WindowsPackageManager/WindowsPackageManager.vcxproj.filters index 03f4182bba..62f3afb7d6 100644 --- a/src/WindowsPackageManager/WindowsPackageManager.vcxproj.filters +++ b/src/WindowsPackageManager/WindowsPackageManager.vcxproj.filters @@ -28,7 +28,6 @@ - Source Files From bb6e5105905a5d69d672aa55f79dbc161c320b6c Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Wed, 17 May 2023 16:56:21 -0700 Subject: [PATCH 05/43] Fix build errors --- .../AppInstallerTestExeInstaller.vcxproj | 3 +++ src/AppInstallerTestExeInstaller/main.cpp | 10 +++++----- src/Directory.Build.props | 17 +++++++++++++---- .../Helpers/Errors.cs | 2 +- .../Helpers/TelemetryEvent.cs | 3 +++ ...ft.Management.Configuration.UnitTests.csproj | 1 + .../Tests/DscModuleV2Tests.cs | 2 -- .../ExceptionResultHelpers.h | 1 + .../Microsoft.Management.Configuration.vcxproj | 1 - src/Microsoft.Management.Configuration/pch.h | 3 ++- .../Converters.cpp | 6 +++--- .../Microsoft.Management.Deployment.vcxproj | 5 ++++- src/WinGetServer/WinGetServer.vcxproj | 1 - src/WindowsPackageManager/main.cpp | 2 +- 14 files changed, 37 insertions(+), 20 deletions(-) diff --git a/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj b/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj index 682dce0ffc..c7ba9ccad5 100644 --- a/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj +++ b/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj @@ -56,6 +56,9 @@ MultiThreadedDebugDLL + + Advapi32.lib;%(AdditionalDependencies) + diff --git a/src/AppInstallerTestExeInstaller/main.cpp b/src/AppInstallerTestExeInstaller/main.cpp index a7c7535135..36b35fc36b 100644 --- a/src/AppInstallerTestExeInstaller/main.cpp +++ b/src/AppInstallerTestExeInstaller/main.cpp @@ -93,25 +93,25 @@ void WriteToUninstallRegistry( out << "Successfully opened registry key" << std::endl; // Set Display Name Property Value - if (LONG res = RegSetValueEx(hkey, L"DisplayName", NULL, REG_SZ, (LPBYTE)displayName.c_str(), (DWORD)(displayName.length() + 1) * sizeof(wchar_t)) != ERROR_SUCCESS) + if (LONG res = RegSetValueEx(hkey, L"DisplayName", NULL, REG_SZ, (LPBYTE)displayName.c_str(), (DWORD)((displayName.length() + 1) * sizeof(wchar_t))) != ERROR_SUCCESS) { out << "Failed to write DisplayName value. Error Code: " << res << std::endl; } // Set Display Version Property Value - if (LONG res = RegSetValueEx(hkey, L"DisplayVersion", NULL, REG_SZ, (LPBYTE)displayVersion.c_str(), (DWORD)(displayVersion.length() + 1) * sizeof(wchar_t)) != ERROR_SUCCESS) + if (LONG res = RegSetValueEx(hkey, L"DisplayVersion", NULL, REG_SZ, (LPBYTE)displayVersion.c_str(), (DWORD)((displayVersion.length() + 1) * sizeof(wchar_t))) != ERROR_SUCCESS) { out << "Failed to write DisplayVersion value. Error Code: " << res << std::endl; } // Set Publisher Property Value - if (LONG res = RegSetValueEx(hkey, L"Publisher", NULL, REG_SZ, (LPBYTE)publisher, (DWORD)(wcslen(publisher) + 1) * sizeof(wchar_t)) != ERROR_SUCCESS) + if (LONG res = RegSetValueEx(hkey, L"Publisher", NULL, REG_SZ, (LPBYTE)publisher, (DWORD)((wcslen(publisher) + 1) * sizeof(wchar_t))) != ERROR_SUCCESS) { out << "Failed to write Publisher value. Error Code: " << res << std::endl; } // Set UninstallString Property Value - if (LONG res = RegSetValueEx(hkey, L"UninstallString", NULL, REG_EXPAND_SZ, (LPBYTE)uninstallString.c_str(), (DWORD)(uninstallString.length() + 1) * sizeof(wchar_t)) != ERROR_SUCCESS) + if (LONG res = RegSetValueEx(hkey, L"UninstallString", NULL, REG_EXPAND_SZ, (LPBYTE)uninstallString.c_str(), (DWORD)((uninstallString.length() + 1) * sizeof(wchar_t))) != ERROR_SUCCESS) { out << "Failed to write UninstallString value. Error Code: " << res << std::endl; } @@ -123,7 +123,7 @@ void WriteToUninstallRegistry( } // Set InstallLocation Property Value - if (LONG res = RegSetValueEx(hkey, L"InstallLocation", NULL, REG_SZ, (LPBYTE)installLocation.c_str(), (DWORD)(installLocation.length() + 1) * sizeof(wchar_t)) != ERROR_SUCCESS) + if (LONG res = RegSetValueEx(hkey, L"InstallLocation", NULL, REG_SZ, (LPBYTE)installLocation.c_str(), (DWORD)((installLocation.length() + 1) * sizeof(wchar_t))) != ERROR_SUCCESS) { out << "Failed to write InstallLocation value. Error Code: " << res << std::endl; } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index ae6359e597..358b37a47c 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -59,8 +59,9 @@ false true false - Spectre false + + Spectre true @@ -73,6 +74,7 @@ false false false + true @@ -88,22 +90,27 @@ Use pch.h $(IntDir)pch.pch + AICLI_DISABLE_TEST_HOOKS;%(PreprocessorDefinitions) WINGET_DISABLE_EXPERIMENTAL_FEATURES;%(PreprocessorDefinitions) WINGET_ENABLE_RELEASE_BUILD;%(PreprocessorDefinitions) USE_PROD_CLSIDS;%(PreprocessorDefinitions) USE_PROD_WINGET_SERVER;%(PreprocessorDefinitions) Level4 - %(AdditionalOptions) /permissive- /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING + %(AdditionalOptions) /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING true stdcpp17 - true + true - MultiThreaded + + true + + true Console false + true @@ -118,6 +125,8 @@ true true NDEBUG;%(PreprocessorDefinitions) + MultiThreaded + Guard diff --git a/src/Microsoft.Management.Configuration.UnitTests/Helpers/Errors.cs b/src/Microsoft.Management.Configuration.UnitTests/Helpers/Errors.cs index 553db9fa0d..a293d11df3 100644 --- a/src/Microsoft.Management.Configuration.UnitTests/Helpers/Errors.cs +++ b/src/Microsoft.Management.Configuration.UnitTests/Helpers/Errors.cs @@ -7,7 +7,7 @@ namespace Microsoft.Management.Configuration.UnitTests.Helpers { /// - /// Contains the error codes used by Microsoft.Management.Configuration + /// Contains the error codes used by Microsoft.Management.Configuration. /// internal static class Errors { diff --git a/src/Microsoft.Management.Configuration.UnitTests/Helpers/TelemetryEvent.cs b/src/Microsoft.Management.Configuration.UnitTests/Helpers/TelemetryEvent.cs index f4163e3489..25afdbc6be 100644 --- a/src/Microsoft.Management.Configuration.UnitTests/Helpers/TelemetryEvent.cs +++ b/src/Microsoft.Management.Configuration.UnitTests/Helpers/TelemetryEvent.cs @@ -29,7 +29,9 @@ public class TelemetryEvent /// public const string ConfigProcessingSummaryName = "ConfigProcessingSummary"; +// Two different analyzers complain about this #pragma warning disable SA1600 // Elements should be documented +#pragma warning disable CS1591 // Elements should be documented // Shared fields public const string SetID = "SetID"; @@ -57,6 +59,7 @@ public class TelemetryEvent public const string AppliesRun = "AppliesRun"; public const string AppliesFailed = "AppliesFailed"; #pragma warning restore SA1600 // Elements should be documented +#pragma warning restore CS1591 // Elements should be documented /// /// Initializes a new instance of the class. diff --git a/src/Microsoft.Management.Configuration.UnitTests/Microsoft.Management.Configuration.UnitTests.csproj b/src/Microsoft.Management.Configuration.UnitTests/Microsoft.Management.Configuration.UnitTests.csproj index 679ba79949..c1fd8e96c1 100644 --- a/src/Microsoft.Management.Configuration.UnitTests/Microsoft.Management.Configuration.UnitTests.csproj +++ b/src/Microsoft.Management.Configuration.UnitTests/Microsoft.Management.Configuration.UnitTests.csproj @@ -7,6 +7,7 @@ x64;x86;arm64 $(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ win10-x64;win10-x86;win10-arm;win10-arm64 + true diff --git a/src/Microsoft.Management.Configuration.UnitTests/Tests/DscModuleV2Tests.cs b/src/Microsoft.Management.Configuration.UnitTests/Tests/DscModuleV2Tests.cs index 2f472074db..16eb0f983c 100644 --- a/src/Microsoft.Management.Configuration.UnitTests/Tests/DscModuleV2Tests.cs +++ b/src/Microsoft.Management.Configuration.UnitTests/Tests/DscModuleV2Tests.cs @@ -425,8 +425,6 @@ public void InvokeTestResource_ResourceDoesntExist() /// /// Calls Invoke-DscResource Set. /// - /// Setting value. - /// Expected reboot required. [Fact] public void InvokeSetResource_Test() { diff --git a/src/Microsoft.Management.Configuration/ExceptionResultHelpers.h b/src/Microsoft.Management.Configuration/ExceptionResultHelpers.h index 51720f11b1..b3cf1dd398 100644 --- a/src/Microsoft.Management.Configuration/ExceptionResultHelpers.h +++ b/src/Microsoft.Management.Configuration/ExceptionResultHelpers.h @@ -3,6 +3,7 @@ #pragma once #include #include +#include namespace winrt::Microsoft::Management::Configuration::implementation { diff --git a/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj b/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj index 43559b7a51..a8321ef68a 100644 --- a/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj +++ b/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj @@ -78,7 +78,6 @@ - %(AdditionalOptions) /bigobj _WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) $(ProjectDir);$(ProjectDir)..\AppInstallerSharedLib\Public;%(AdditionalIncludeDirectories) diff --git a/src/Microsoft.Management.Configuration/pch.h b/src/Microsoft.Management.Configuration/pch.h index 6ad465fc7a..7d06129698 100644 --- a/src/Microsoft.Management.Configuration/pch.h +++ b/src/Microsoft.Management.Configuration/pch.h @@ -7,7 +7,8 @@ #include #pragma warning( push ) -#pragma warning ( disable : 4467 6388) +#pragma warning( disable : 4324 4467 6388) +// 4324 Allow use of alignment specifiers // 4467 Allow use of uuid attribute for com object creation. // 6388 Allow CreateInstance. #include diff --git a/src/Microsoft.Management.Deployment/Converters.cpp b/src/Microsoft.Management.Deployment/Converters.cpp index e35f43bdfc..134afd55e6 100644 --- a/src/Microsoft.Management.Deployment/Converters.cpp +++ b/src/Microsoft.Management.Deployment/Converters.cpp @@ -312,11 +312,11 @@ namespace winrt::Microsoft::Management::Deployment::implementation { switch (scope) { - case winrt::Microsoft::Management::Deployment::PackageInstallScope::Any: + case winrt::Microsoft::Management::Deployment::PackageUninstallScope::Any: return ::AppInstaller::Manifest::ScopeEnum::Unknown; - case winrt::Microsoft::Management::Deployment::PackageInstallScope::User: + case winrt::Microsoft::Management::Deployment::PackageUninstallScope::User: return ::AppInstaller::Manifest::ScopeEnum::User; - case winrt::Microsoft::Management::Deployment::PackageInstallScope::System: + case winrt::Microsoft::Management::Deployment::PackageUninstallScope::System: return ::AppInstaller::Manifest::ScopeEnum::Machine; } diff --git a/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj b/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj index 1e37e973bb..b42e9da40e 100644 --- a/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj +++ b/src/Microsoft.Management.Deployment/Microsoft.Management.Deployment.vcxproj @@ -79,10 +79,13 @@ - %(AdditionalOptions) /bigobj _WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) $(ProjectDir)..\AppInstallerCLICore;$(ProjectDir);$(ProjectDir)..\AppInstallerRepositoryCore;$(ProjectDir)..\AppInstallerRepositoryCore\Public;$(ProjectDir)..\AppInstallerCommonCore\Public;$(ProjectDir)..\AppInstallerSharedLib\Public;$(ProjectDir)..\JsonCppLib\json;$(ProjectDir)..\JsonCppLib;%(AdditionalIncludeDirectories) + + false Microsoft_Management_Deployment.def diff --git a/src/WinGetServer/WinGetServer.vcxproj b/src/WinGetServer/WinGetServer.vcxproj index 6cdfb75138..b76d363625 100644 --- a/src/WinGetServer/WinGetServer.vcxproj +++ b/src/WinGetServer/WinGetServer.vcxproj @@ -58,7 +58,6 @@ NotUsing _CONSOLE;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) - %(AdditionalOptions) /permissive- /bigobj $(ProjectDir)..\WindowsPackageManager;%(AdditionalIncludeDirectories) diff --git a/src/WindowsPackageManager/main.cpp b/src/WindowsPackageManager/main.cpp index 8ee8a3bc52..b4a63f44f1 100644 --- a/src/WindowsPackageManager/main.cpp +++ b/src/WindowsPackageManager/main.cpp @@ -2,7 +2,7 @@ // Licensed under the MIT License. #include #pragma warning( push ) -#pragma warning ( disable : 4324 ) +#pragma warning( disable : 4324 ) #include #pragma warning( pop ) #include From 9a25bf4b0fbcc16e856ceecb0e6d10d2ac02e60b Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 11:56:30 -0700 Subject: [PATCH 06/43] Fix build errors --- .../AppInstallerCLIE2ETests.csproj | 1 + .../AppInstallerCLITests.vcxproj | 32 ------------------- src/Directory.Build.props | 4 +-- .../.editorconfig | 4 +++ ...Management.Configuration.Projection.csproj | 8 +++++ .../.editorconfig | 4 +++ ...ft.Management.Deployment.Projection.csproj | 8 +++++ 7 files changed, 27 insertions(+), 34 deletions(-) create mode 100644 src/Microsoft.Management.Configuration.Projection/.editorconfig create mode 100644 src/Microsoft.Management.Deployment.Projection/.editorconfig diff --git a/src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj b/src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj index c3acfd1797..19ca7b9115 100644 --- a/src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj +++ b/src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj @@ -2,6 +2,7 @@ net6.0-windows + $(SolutionDir)$(Platform)\$(Configuration)\AppInstallerCLIE2ETests\ false x64;x86 Library diff --git a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj index 64d47d56b7..892bf81b4f 100644 --- a/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj +++ b/src/AppInstallerCLITests/AppInstallerCLITests.vcxproj @@ -40,38 +40,6 @@ - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - true - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - true - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - Disabled diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 358b37a47c..c818e74cad 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -79,10 +79,10 @@ - $(SolutionDir)x86\$(Configuration)\$(ProjectName)\ + $(SolutionDir)x86\$(Configuration)\$(MSBuildProjectName)\ - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ + $(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ diff --git a/src/Microsoft.Management.Configuration.Projection/.editorconfig b/src/Microsoft.Management.Configuration.Projection/.editorconfig new file mode 100644 index 0000000000..0ff1f73305 --- /dev/null +++ b/src/Microsoft.Management.Configuration.Projection/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] +# CsWinRT produces files violating this rule +# CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static' +dotnet_diagnostic.CA2257.severity = none \ No newline at end of file diff --git a/src/Microsoft.Management.Configuration.Projection/Microsoft.Management.Configuration.Projection.csproj b/src/Microsoft.Management.Configuration.Projection/Microsoft.Management.Configuration.Projection.csproj index e0bbc21b16..18e72a8554 100644 --- a/src/Microsoft.Management.Configuration.Projection/Microsoft.Management.Configuration.Projection.csproj +++ b/src/Microsoft.Management.Configuration.Projection/Microsoft.Management.Configuration.Projection.csproj @@ -21,6 +21,14 @@ None + + + + + + + + diff --git a/src/Microsoft.Management.Deployment.Projection/.editorconfig b/src/Microsoft.Management.Deployment.Projection/.editorconfig new file mode 100644 index 0000000000..0ff1f73305 --- /dev/null +++ b/src/Microsoft.Management.Deployment.Projection/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] +# CsWinRT produces files violating this rule +# CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static' +dotnet_diagnostic.CA2257.severity = none \ No newline at end of file diff --git a/src/Microsoft.Management.Deployment.Projection/Microsoft.Management.Deployment.Projection.csproj b/src/Microsoft.Management.Deployment.Projection/Microsoft.Management.Deployment.Projection.csproj index 45fdc0d74a..f6ea2fd574 100644 --- a/src/Microsoft.Management.Deployment.Projection/Microsoft.Management.Deployment.Projection.csproj +++ b/src/Microsoft.Management.Deployment.Projection/Microsoft.Management.Deployment.Projection.csproj @@ -27,4 +27,12 @@ True + + + + + + + + From 97d1d02d1acabfcaa2b8bce93bf0321696df423e Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 11:57:36 -0700 Subject: [PATCH 07/43] Always publish analysis logs --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b1421cd672..074dcbfe4b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -353,6 +353,7 @@ jobs: ArtifactType: 'Container' AllTools: true ToolLogsNotFoundAction: 'Standard' + condition: succeededOrFailed() - job: 'BuildPowerShellModule' timeoutInMinutes: 120 From 82848c0270d3809d1253927d74aab62a70a9af37 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 13:12:45 -0700 Subject: [PATCH 08/43] Enable codeql --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 074dcbfe4b..f045cc8395 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,6 +19,8 @@ pool: variables: solution: 'src\AppInstallerCLI.sln' appxPackageDir: '$(Build.ArtifactStagingDirectory)/AppxPackages/' + # Enable CodeQL/Semmle static analysis for default branch + Codeql.Enabled: true # Do not set the build version for a PR build. From 59b85830dcf5b6c88d129c89fc29d484c59060f9 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 13:13:16 -0700 Subject: [PATCH 09/43] standardize pragma warnings --- src/AppInstallerCommonCore/Archive.cpp | 2 +- src/AppInstallerCommonCore/Downloader.cpp | 6 +++--- src/Microsoft.Management.Deployment/Helpers.cpp | 5 +++++ .../include/valijson/constraints/concrete_constraints.hpp | 2 +- .../valijson/include/valijson/internal/json_pointer.hpp | 2 +- .../valijson/include/valijson/validation_visitor.hpp | 2 +- src/WindowsPackageManager/main.cpp | 2 +- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/AppInstallerCommonCore/Archive.cpp b/src/AppInstallerCommonCore/Archive.cpp index 9d5f9c5896..590d666a36 100644 --- a/src/AppInstallerCommonCore/Archive.cpp +++ b/src/AppInstallerCommonCore/Archive.cpp @@ -7,7 +7,7 @@ #pragma warning( push ) #pragma warning ( disable : 4189 4244 26451 ) #include -#pragma warning ( pop ) +#pragma warning( pop ) namespace AppInstaller::Archive { diff --git a/src/AppInstallerCommonCore/Downloader.cpp b/src/AppInstallerCommonCore/Downloader.cpp index be43976703..91da2bd739 100644 --- a/src/AppInstallerCommonCore/Downloader.cpp +++ b/src/AppInstallerCommonCore/Downloader.cpp @@ -27,8 +27,8 @@ namespace AppInstaller::Utility bool computeHash) { // For AICLI_LOG usages with string literals. - #pragma warning(push) - #pragma warning(disable:26449) + #pragma warning( push ) + #pragma warning ( disable : 26449 ) AICLI_LOG(Core, Info, << "WinINet downloading from url: " << url); @@ -136,7 +136,7 @@ namespace AppInstaller::Utility AICLI_LOG(Core, Info, << "Download completed."); - #pragma warning(pop) + #pragma warning( pop ) return result; } diff --git a/src/Microsoft.Management.Deployment/Helpers.cpp b/src/Microsoft.Management.Deployment/Helpers.cpp index 8adfb3fc36..83acf508ee 100644 --- a/src/Microsoft.Management.Deployment/Helpers.cpp +++ b/src/Microsoft.Management.Deployment/Helpers.cpp @@ -2,8 +2,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include "pch.h" + +#pragma warning ( push ) +#pragma warning ( disable : 6001 ) // use of uninitialized memory in wil/result.h #include #include +#pragma warning ( pop ) + #include #include #include diff --git a/src/Valijson/valijson/include/valijson/constraints/concrete_constraints.hpp b/src/Valijson/valijson/include/valijson/constraints/concrete_constraints.hpp index 55cc1248a3..2bacda1dbf 100644 --- a/src/Valijson/valijson/include/valijson/constraints/concrete_constraints.hpp +++ b/src/Valijson/valijson/include/valijson/constraints/concrete_constraints.hpp @@ -28,7 +28,7 @@ #ifdef _MSC_VER #pragma warning( push ) -#pragma warning( disable : 4702 ) +#pragma warning (disable : 4702 ) #endif namespace valijson { diff --git a/src/Valijson/valijson/include/valijson/internal/json_pointer.hpp b/src/Valijson/valijson/include/valijson/internal/json_pointer.hpp index b290c02a2c..75b788ee34 100644 --- a/src/Valijson/valijson/include/valijson/internal/json_pointer.hpp +++ b/src/Valijson/valijson/include/valijson/internal/json_pointer.hpp @@ -13,7 +13,7 @@ #ifdef _MSC_VER #pragma warning( push ) -#pragma warning( disable : 4702 ) +#pragma warning (disable : 4702 ) #endif namespace valijson { diff --git a/src/Valijson/valijson/include/valijson/validation_visitor.hpp b/src/Valijson/valijson/include/valijson/validation_visitor.hpp index cd4442d7c7..1b7ed0462c 100644 --- a/src/Valijson/valijson/include/valijson/validation_visitor.hpp +++ b/src/Valijson/valijson/include/valijson/validation_visitor.hpp @@ -15,7 +15,7 @@ #ifdef _MSC_VER #pragma warning( push ) -#pragma warning( disable : 4702 ) +#pragma warning ( disable : 4702 ) #endif namespace valijson { diff --git a/src/WindowsPackageManager/main.cpp b/src/WindowsPackageManager/main.cpp index b4a63f44f1..8ee8a3bc52 100644 --- a/src/WindowsPackageManager/main.cpp +++ b/src/WindowsPackageManager/main.cpp @@ -2,7 +2,7 @@ // Licensed under the MIT License. #include #pragma warning( push ) -#pragma warning( disable : 4324 ) +#pragma warning ( disable : 4324 ) #include #pragma warning( pop ) #include From 224c358d588eead3b367feaa037436809eb1b57e Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 13:13:34 -0700 Subject: [PATCH 10/43] Fix build errors --- src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj | 8 ++------ src/Directory.Build.props | 4 +++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj b/src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj index 516deb8e1b..0489ebf4f5 100644 --- a/src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj +++ b/src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj @@ -94,6 +94,8 @@ copy "$(TargetDir)\resources.pri" "$(ProjectDir)\..\$(Platform)\$(Configuration)\AppInstallerCLI\resources.pri" copy "$(TargetDir)\resources.pri" "$(TargetDir)\AppInstallerCLI\resources.pri" + 10.0.17763.0 + 10.0.22000.0 win10-arm @@ -112,7 +114,6 @@ $(SolutionDir) $(OutputPath)\..\..\..\.. - @@ -142,21 +143,16 @@ true - - - %(WinGetAdditionalPackageFile.PackagePath) - - %(WinGetAdditionalPackageFile.PackagePath)\%(WinGetAdditionalPackageFile.RecursiveDir)%(WinGetAdditionalPackageFile.Filename)%(WinGetAdditionalPackageFile.Extension) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index c818e74cad..33434775b1 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -28,7 +28,9 @@ - + + + true From a73f542765c2bc8adf032b46f4749c186b6e2ed9 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 13:18:01 -0700 Subject: [PATCH 11/43] Restore external project changes --- src/JsonCppLib/JsonCppLib.vcxproj | 26 +++++++-------- src/PureLib/PureLib.vcxproj | 24 +++++++------- .../UndockedRegFreeWinRT.vcxproj | 24 +++++++------- .../detours/detours.vcxproj | 24 +++++++------- src/YamlCppLib/YamlCppLib.vcxproj | 32 +++++++++---------- src/cpprestsdk/cpprestsdk.vcxproj | 24 +++++++------- 6 files changed, 77 insertions(+), 77 deletions(-) diff --git a/src/JsonCppLib/JsonCppLib.vcxproj b/src/JsonCppLib/JsonCppLib.vcxproj index 9b6bb3414a..b1b5bfe571 100644 --- a/src/JsonCppLib/JsonCppLib.vcxproj +++ b/src/JsonCppLib/JsonCppLib.vcxproj @@ -240,7 +240,7 @@ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL - TurnOffAllWarnings + Level3 ProgramDatabase Disabled stdcpp17 @@ -258,7 +258,7 @@ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL - TurnOffAllWarnings + Level3 ProgramDatabase stdcpp17 json @@ -276,7 +276,7 @@ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded - TurnOffAllWarnings + Level3 ProgramDatabase stdcpp17 json @@ -294,7 +294,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 false @@ -302,7 +302,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 false MultiThreaded @@ -311,7 +311,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 /fsanitize-coverage=inline-8bit-counters /fsanitize-coverage=edge /fsanitize-coverage=trace-cmp /fsanitize-coverage=trace-div %(AdditionalOptions) MultiThreaded false @@ -321,7 +321,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 false @@ -329,7 +329,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 false MultiThreaded @@ -338,7 +338,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 false @@ -346,7 +346,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 false MultiThreaded @@ -355,7 +355,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 false false @@ -364,7 +364,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 false false @@ -373,7 +373,7 @@ stdcpp17 json - TurnOffAllWarnings + Level3 false diff --git a/src/PureLib/PureLib.vcxproj b/src/PureLib/PureLib.vcxproj index e85de9b119..e22d853994 100644 --- a/src/PureLib/PureLib.vcxproj +++ b/src/PureLib/PureLib.vcxproj @@ -140,7 +140,7 @@ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDebugDLL - TurnOffAllWarnings + Level3 ProgramDatabase Disabled stdcpp17 @@ -156,7 +156,7 @@ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDLL - TurnOffAllWarnings + Level3 ProgramDatabase stdcpp17 pure @@ -173,7 +173,7 @@ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded - TurnOffAllWarnings + Level3 ProgramDatabase stdcpp17 pure @@ -190,14 +190,14 @@ stdcpp17 pure - TurnOffAllWarnings + Level3 stdcpp17 pure - TurnOffAllWarnings + Level3 MultiThreaded @@ -205,14 +205,14 @@ stdcpp17 pure - TurnOffAllWarnings + Level3 stdcpp17 pure - TurnOffAllWarnings + Level3 MultiThreaded @@ -220,14 +220,14 @@ stdcpp17 pure - TurnOffAllWarnings + Level3 stdcpp17 pure - TurnOffAllWarnings + Level3 MultiThreaded @@ -235,21 +235,21 @@ stdcpp17 pure - TurnOffAllWarnings + Level3 stdcpp17 pure - TurnOffAllWarnings + Level3 stdcpp17 pure;pure\zlib; - TurnOffAllWarnings + Level3 Default MultiThreadedDebugDLL diff --git a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj index b71fe4d9cc..e1683d355e 100644 --- a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj +++ b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj @@ -111,7 +111,7 @@ NotUsing - TurnOffAllWarnings + Level3 true WIN32;_DEBUG;UNDOCKEDREGFREEWINRT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true @@ -130,7 +130,7 @@ NotUsing - TurnOffAllWarnings + Level3 true _DEBUG;UNDOCKEDREGFREEWINRT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true @@ -149,7 +149,7 @@ NotUsing - TurnOffAllWarnings + Level3 true WIN32;_DEBUG;UNDOCKEDREGFREEWINRT_EXPORTS;_WINDOWS;_USRDLL;_ARM_;%(PreprocessorDefinitions) true @@ -168,7 +168,7 @@ NotUsing - TurnOffAllWarnings + Level3 true _DEBUG;UNDOCKEDREGFREEWINRT_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true @@ -187,7 +187,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -211,7 +211,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -236,7 +236,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -260,7 +260,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -285,7 +285,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -309,7 +309,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -334,7 +334,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -358,7 +358,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true diff --git a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/detours/detours.vcxproj b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/detours/detours.vcxproj index 604931e871..9cd51438e2 100644 --- a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/detours/detours.vcxproj +++ b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/detours/detours.vcxproj @@ -123,7 +123,7 @@ NotUsing - TurnOffAllWarnings + Level3 true WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true @@ -138,7 +138,7 @@ NotUsing - TurnOffAllWarnings + Level3 true _DEBUG;_LIB;%(PreprocessorDefinitions) true @@ -153,7 +153,7 @@ NotUsing - TurnOffAllWarnings + Level3 true WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true @@ -168,7 +168,7 @@ NotUsing - TurnOffAllWarnings + Level3 true _DEBUG;_LIB;%(PreprocessorDefinitions) true @@ -183,7 +183,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -203,7 +203,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -224,7 +224,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -244,7 +244,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -265,7 +265,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -285,7 +285,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -306,7 +306,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true @@ -326,7 +326,7 @@ NotUsing - TurnOffAllWarnings + Level3 true true true diff --git a/src/YamlCppLib/YamlCppLib.vcxproj b/src/YamlCppLib/YamlCppLib.vcxproj index ea3c1b2264..a19079203d 100644 --- a/src/YamlCppLib/YamlCppLib.vcxproj +++ b/src/YamlCppLib/YamlCppLib.vcxproj @@ -219,7 +219,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -228,7 +228,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -237,7 +237,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false MultiThreaded @@ -247,7 +247,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -256,7 +256,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -265,7 +265,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -274,7 +274,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false MultiThreaded @@ -284,7 +284,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -293,7 +293,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -302,7 +302,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -311,7 +311,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false MultiThreaded @@ -321,7 +321,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -330,7 +330,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -339,7 +339,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false @@ -348,7 +348,7 @@ libyaml\include;$(ProjectDir) stdcpp17 - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H %(AdditionalOptions) false MultiThreaded @@ -358,7 +358,7 @@ libyaml\include;$(ProjectDir) Default - TurnOffAllWarnings + Level3 /D YAML_DECLARE_STATIC /D HAVE_CONFIG_H /fsanitize-coverage=inline-8bit-counters /fsanitize-coverage=edge /fsanitize-coverage=trace-cmp /fsanitize-coverage=trace-div %(AdditionalOptions) MultiThreaded false diff --git a/src/cpprestsdk/cpprestsdk.vcxproj b/src/cpprestsdk/cpprestsdk.vcxproj index 832ba93574..ecd9bc3293 100644 --- a/src/cpprestsdk/cpprestsdk.vcxproj +++ b/src/cpprestsdk/cpprestsdk.vcxproj @@ -236,7 +236,7 @@ WIN32;_NO_ASYNCRTIMP;_DEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 ProgramDatabase stdcpp17 Disabled @@ -251,7 +251,7 @@ WIN32;_NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 ProgramDatabase stdcpp17 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -267,7 +267,7 @@ WIN32;_NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 ProgramDatabase stdcpp17 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -286,7 +286,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -298,7 +298,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) MultiThreaded @@ -311,7 +311,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -320,7 +320,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) MultiThreaded @@ -330,7 +330,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -339,7 +339,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;NDEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) MultiThreaded @@ -349,7 +349,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;_DEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -358,7 +358,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;_DEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions)%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) @@ -367,7 +367,7 @@ stdcpp17 NotUsing _NO_ASYNCRTIMP;_DEBUG;CPPREST_EXCLUDE_WEBSOCKETS;%(PreprocessorDefinitions) - TurnOffAllWarnings + Level3 $(ProjectDir)cpprestsdk\Release\src\pch;$(ProjectDir)cpprestsdk\Release\include;%(AdditionalIncludeDirectories) From 54444731296cd75e89bdc0f16d361a46fbd3014f Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 13:41:51 -0700 Subject: [PATCH 12/43] test --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 33434775b1..f0939d65b0 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -81,10 +81,10 @@ - $(SolutionDir)x86\$(Configuration)\$(MSBuildProjectName)\ + could\$(SolutionDir)x86\$(Configuration)\$(MSBuildProjectName)\ - $(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ + thisbe\$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ From 071f40bc69683284d16bd3149fa17f4617fcafd8 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 13:47:10 -0700 Subject: [PATCH 13/43] spelling --- .github/actions/spelling/excludes.txt | 1 + .github/actions/spelling/expect.txt | 12 +++++++----- src/Directory.Build.props | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index e4452c78aa..085ed013a9 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -44,6 +44,7 @@ \.pdf$ \.pem$ \.png$ +\.props$ \.psd$ \.pyc$ \.s$ diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 930e9f6146..4ebf6a35ac 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -65,6 +65,7 @@ cls clsctx clsid CODEOWNERS +Codeql COINIT COMGLB commandline @@ -199,20 +200,20 @@ LPBYTE LPCWSTR LPDWORD lpitemidlist -LPW -maclachlan LPSTR +LPW LPWCH LPWSTR LSTATUS LTDA luffy Luffytaro +maclachlan malware mapview +Maxed maxvalue maybenull -Maxed MBH mdmp MDs @@ -266,8 +267,8 @@ nuffing objbase objidl ofile -osfhandle OPTOUT +osfhandle Outptr packageinuse packageinusebyapplication @@ -328,8 +329,8 @@ riid roblox ronomon rosoft -roy rowids +roy RRF rrr runspace @@ -339,6 +340,7 @@ rzkzqaqjwj SARL schematab sddl +Semmle seof servercert servercertificate diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f0939d65b0..2bd7c8da4e 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,7 +3,7 @@ + Some properties may need to be overridden in specific projects --> true From 7e8d02f6a553b290de832d9d921bea2ce1413084 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 13:49:48 -0700 Subject: [PATCH 14/43] Revert "test" This reverts commit 54444731296cd75e89bdc0f16d361a46fbd3014f. --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 2bd7c8da4e..4812b4ac9f 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -81,10 +81,10 @@ - could\$(SolutionDir)x86\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)x86\$(Configuration)\$(MSBuildProjectName)\ - thisbe\$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ + $(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ From f6f5131edba4474bca638fe706cde9ef19e922bd Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 18 May 2023 14:29:14 -0700 Subject: [PATCH 15/43] fix --- src/Directory.Build.props | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 4812b4ac9f..e9e535f429 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -47,6 +47,9 @@ 10.0.17763.0 true true + + $(MSBuildThisFileDirectory) From 4743aab9856910093ce489a1b779ab6ef2a27d2f Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Mon, 22 May 2023 16:20:48 -0700 Subject: [PATCH 16/43] Some more errors from static analysis --- src/AppInstallerCLICore/ExecutionProgress.h | 2 - src/AppInstallerCLICore/ExecutionReporter.h | 2 - .../Workflows/DependenciesFlow.cpp | 5 + src/AppInstallerCLICore/pch.h | 3 +- src/AppInstallerCLITests/InstallFlow.cpp | 179 +++++++----------- src/AppInstallerCLITests/TestCommon.h | 1 - src/AppInstallerCLITests/TestSettings.h | 1 - src/AppInstallerCLITests/WorkflowCommon.h | 2 +- src/AppInstallerCLITests/YamlManifest.cpp | 5 + src/AppInstallerCLITests/pch.h | 4 + .../Public/AppInstallerProgress.h | 5 + .../Public/AppInstallerSynchronization.h | 1 - .../Public/AppInstallerTelemetry.h | 1 - .../Public/winget/Certificates.h | 7 +- .../Public/winget/FolderFileWatcher.h | 2 +- .../Public/winget/ManagedFile.h | 1 - .../Public/winget/ManifestValidation.h | 1 - .../Public/winget/Registry.h | 2 - src/AppInstallerCommonCore/pch.h | 2 +- .../Microsoft/ARPHelper.h | 1 - .../Microsoft/Schema/MetadataTable.h | 1 - .../SQLiteWrapper.cpp | 2 - .../SQLiteWrapper.h | 2 - src/AppInstallerRepositoryCore/pch.h | 2 +- src/AppInstallerSharedLib/pch.h | 2 +- .../AppInstallerTestExeInstaller.vcxproj | 2 + src/Microsoft.Management.Configuration/pch.h | 3 +- .../Helpers.cpp | 5 +- src/WinGetServer/WinMain.cpp | 2 +- src/WinGetUtil/pch.h | 2 +- 30 files changed, 111 insertions(+), 139 deletions(-) diff --git a/src/AppInstallerCLICore/ExecutionProgress.h b/src/AppInstallerCLICore/ExecutionProgress.h index 60b8e34c5f..559f65f366 100644 --- a/src/AppInstallerCLICore/ExecutionProgress.h +++ b/src/AppInstallerCLICore/ExecutionProgress.h @@ -6,8 +6,6 @@ #include #include -#include - #include #include #include diff --git a/src/AppInstallerCLICore/ExecutionReporter.h b/src/AppInstallerCLICore/ExecutionReporter.h index 2dca92cc93..0c6284f877 100644 --- a/src/AppInstallerCLICore/ExecutionReporter.h +++ b/src/AppInstallerCLICore/ExecutionReporter.h @@ -8,8 +8,6 @@ #include #include -#include - #include #include #include diff --git a/src/AppInstallerCLICore/Workflows/DependenciesFlow.cpp b/src/AppInstallerCLICore/Workflows/DependenciesFlow.cpp index e86788d156..214bb10d57 100644 --- a/src/AppInstallerCLICore/Workflows/DependenciesFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/DependenciesFlow.cpp @@ -190,7 +190,12 @@ namespace AppInstaller::CLI::Workflow << GetUserPresentableMessage(hr) << std::endl; } +// TODO: Check this warning. +// Comparison between different int types (HRESULT and long) +#pragma warning ( push ) +#pragma warning ( disable : 6221 ) if (hr == ERROR_SUCCESS_REBOOT_REQUIRED || windowsFeature.GetRestartRequiredStatus() == DismRestartType::DismRestartRequired) +#pragma warning ( pop ) { rebootRequired = true; } diff --git a/src/AppInstallerCLICore/pch.h b/src/AppInstallerCLICore/pch.h index 50a37a2cc0..027ce5ff97 100644 --- a/src/AppInstallerCLICore/pch.h +++ b/src/AppInstallerCLICore/pch.h @@ -42,11 +42,12 @@ #include #pragma warning( push ) -#pragma warning ( disable : 6001 6285 6340 6388 ) +#pragma warning ( disable : 6001 6285 6340 6388 6553 ) #include #include #include #include +#include #pragma warning( pop ) #include diff --git a/src/AppInstallerCLITests/InstallFlow.cpp b/src/AppInstallerCLITests/InstallFlow.cpp index 7e684b5f78..1b3b5e3685 100644 --- a/src/AppInstallerCLITests/InstallFlow.cpp +++ b/src/AppInstallerCLITests/InstallFlow.cpp @@ -716,166 +716,125 @@ TEST_CASE("PortableInstallFlow_MachineScope", "[InstallFlow][workflow]") TEST_CASE("ShellExecuteHandlerInstallerArgs", "[InstallFlow][workflow]") { + std::ostringstream installOutput; + TestContext context{ installOutput, std::cin }; + auto previousThreadGlobals = context.SetForCurrentThread(); + Manifest manifest; + std::vector expectedArgs; + std::optional exactArgs; + + SECTION("MSI | No CLI args | No manifest switches") { - std::ostringstream installOutput; - TestContext context{ installOutput, std::cin }; - auto previousThreadGlobals = context.SetForCurrentThread(); // Default Msi type with no args passed in, no switches specified in manifest - auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Msi_NoSwitches.yaml")); - context.Add(manifest); - context.Add(manifest.Installers.at(0)); + manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Msi_NoSwitches.yaml")); context.Add(TestDataFile("AppInstallerTestExeInstaller.exe")); - context << GetInstallerArgs; - std::string installerArgs = context.Get(); - REQUIRE(installerArgs.find("/passive") != std::string::npos); - REQUIRE(installerArgs.find(FileLogger::DefaultPrefix()) != std::string::npos); - REQUIRE(installerArgs.find(manifest.Id) != std::string::npos); - REQUIRE(installerArgs.find(manifest.Version) != std::string::npos); + expectedArgs.emplace_back("/passive"); + expectedArgs.emplace_back(FileLogger::DefaultPrefix()); + expectedArgs.emplace_back(manifest.Id); + expectedArgs.emplace_back(manifest.Version); } - + SECTION("MSI | With CLI args | No manifest switches") { - std::ostringstream installOutput; - TestContext context{ installOutput, std::cin }; - auto previousThreadGlobals = context.SetForCurrentThread(); // Msi type with /silent and /log and /custom and /installlocation, no switches specified in manifest - auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Msi_NoSwitches.yaml")); + manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Msi_NoSwitches.yaml")); context.Args.AddArg(Execution::Args::Type::Silent); context.Args.AddArg(Execution::Args::Type::Log, "MyLog.log"sv); context.Args.AddArg(Execution::Args::Type::InstallLocation, "MyDir"sv); - context.Add(manifest); - context.Add(manifest.Installers.at(0)); - context << GetInstallerArgs; - std::string installerArgs = context.Get(); - REQUIRE(installerArgs.find("/quiet") != std::string::npos); - REQUIRE(installerArgs.find("/log \"MyLog.log\"") != std::string::npos); - REQUIRE(installerArgs.find("TARGETDIR=\"MyDir\"") != std::string::npos); + expectedArgs.emplace_back("/quiet"); + expectedArgs.emplace_back("/log \"MyLog.log\""); + expectedArgs.emplace_back("TARGETDIR=\"MyDir\""); } - + SECTION("MSI | With CLI args | With manifest switches") { - std::ostringstream installOutput; - TestContext context{ installOutput, std::cin }; - auto previousThreadGlobals = context.SetForCurrentThread(); // Msi type with /silent and /log and /custom and /installlocation, switches specified in manifest - auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Msi_WithSwitches.yaml")); + manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Msi_WithSwitches.yaml")); context.Args.AddArg(Execution::Args::Type::Silent); context.Args.AddArg(Execution::Args::Type::Log, "MyLog.log"sv); context.Args.AddArg(Execution::Args::Type::InstallLocation, "MyDir"sv); - context.Add(manifest); - context.Add(manifest.Installers.at(0)); - context << GetInstallerArgs; - std::string installerArgs = context.Get(); - REQUIRE(installerArgs.find("/mysilent") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/mylog=\"MyLog.log\"") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/mycustom") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/myinstalldir=\"MyDir\"") != std::string::npos); // Use declaration in manifest + expectedArgs.emplace_back("/mysilent"); // Use declaration in manifest + expectedArgs.emplace_back("/mylog=\"MyLog.log\""); // Use declaration in manifest + expectedArgs.emplace_back("/mycustom"); // Use declaration in manifest + expectedArgs.emplace_back("/myinstalldir=\"MyDir\""); // Use declaration in manifest } - + SECTION("Inno | No CLI args | No manifest switches") { - std::ostringstream installOutput; - TestContext context{ installOutput, std::cin }; - auto previousThreadGlobals = context.SetForCurrentThread(); // Default Inno type with no args passed in, no switches specified in manifest - auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_NoSwitches.yaml")); - context.Add(manifest); - context.Add(manifest.Installers.at(0)); + manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_NoSwitches.yaml")); context.Add(TestDataFile("AppInstallerTestExeInstaller.exe")); - context << GetInstallerArgs; - std::string installerArgs = context.Get(); - REQUIRE(installerArgs.find("/SILENT") != std::string::npos); - REQUIRE(installerArgs.find(FileLogger::DefaultPrefix()) != std::string::npos); - REQUIRE(installerArgs.find(manifest.Id) != std::string::npos); - REQUIRE(installerArgs.find(manifest.Version) != std::string::npos); + expectedArgs.emplace_back("/SILENT"); + expectedArgs.emplace_back(FileLogger::DefaultPrefix()); + expectedArgs.emplace_back(manifest.Id); + expectedArgs.emplace_back(manifest.Version); } - + SECTION("Inno | With CLI args | No manifest switches") { - std::ostringstream installOutput; - TestContext context{ installOutput, std::cin }; - auto previousThreadGlobals = context.SetForCurrentThread(); // Inno type with /silent and /log and /custom and /installlocation, no switches specified in manifest - auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_NoSwitches.yaml")); + manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_NoSwitches.yaml")); context.Args.AddArg(Execution::Args::Type::Silent); context.Args.AddArg(Execution::Args::Type::Log, "MyLog.log"sv); context.Args.AddArg(Execution::Args::Type::InstallLocation, "MyDir"sv); - context.Add(manifest); - context.Add(manifest.Installers.at(0)); - context << GetInstallerArgs; - std::string installerArgs = context.Get(); - REQUIRE(installerArgs.find("/VERYSILENT") != std::string::npos); - REQUIRE(installerArgs.find("/LOG=\"MyLog.log\"") != std::string::npos); - REQUIRE(installerArgs.find("/DIR=\"MyDir\"") != std::string::npos); + expectedArgs.emplace_back("/VERYSILENT"); + expectedArgs.emplace_back("/LOG=\"MyLog.log\""); + expectedArgs.emplace_back("/DIR=\"MyDir\""); } - + SECTION("Inno | With CLI args | With manifest switches") { - std::ostringstream installOutput; - TestContext context{ installOutput, std::cin }; - auto previousThreadGlobals = context.SetForCurrentThread(); // Inno type with /silent and /log and /custom and /installlocation, switches specified in manifest - auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_WithSwitches.yaml")); + manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_WithSwitches.yaml")); context.Args.AddArg(Execution::Args::Type::Silent); context.Args.AddArg(Execution::Args::Type::Log, "MyLog.log"sv); context.Args.AddArg(Execution::Args::Type::InstallLocation, "MyDir"sv); - context.Add(manifest); - context.Add(manifest.Installers.at(0)); - context << GetInstallerArgs; - std::string installerArgs = context.Get(); - REQUIRE(installerArgs.find("/mysilent") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/mylog=\"MyLog.log\"") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/mycustom") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/myinstalldir=\"MyDir\"") != std::string::npos); // Use declaration in manifest + expectedArgs.emplace_back("/mysilent"); // Use declaration in manifest + expectedArgs.emplace_back("/mylog=\"MyLog.log\""); // Use declaration in manifest + expectedArgs.emplace_back("/mycustom"); // Use declaration in manifest + expectedArgs.emplace_back("/myinstalldir=\"MyDir\""); // Use declaration in manifest } - + SECTION("Inno | With CLI args | With manifest switches | With --custom arg") { - std::ostringstream installOutput; - TestContext context{ installOutput, std::cin }; - auto previousThreadGlobals = context.SetForCurrentThread(); // Inno type with /silent and /log and /custom and /installlocation, switches specified in manifest and --custom argument used in cli - auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_WithSwitches.yaml")); + manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_WithSwitches.yaml")); context.Args.AddArg(Execution::Args::Type::Silent); context.Args.AddArg(Execution::Args::Type::Log, "MyLog.log"sv); context.Args.AddArg(Execution::Args::Type::InstallLocation, "MyDir"sv); context.Args.AddArg(Execution::Args::Type::CustomSwitches, "/MyAppendedSwitch"sv); - context.Add(manifest); - context.Add(manifest.Installers.at(0)); - context << GetInstallerArgs; - std::string installerArgs = context.Get(); - REQUIRE(installerArgs.find("/mysilent") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/mylog=\"MyLog.log\"") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/mycustom") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/myinstalldir=\"MyDir\"") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("/MyAppendedSwitch") != std::string::npos); // Use declaration from argument + expectedArgs.emplace_back("/mysilent"); // Use declaration in manifest + expectedArgs.emplace_back("/mylog=\"MyLog.log\""); // Use declaration in manifest + expectedArgs.emplace_back("/mycustom"); // Use declaration in manifest + expectedArgs.emplace_back("/myinstalldir=\"MyDir\""); // Use declaration in manifest + expectedArgs.emplace_back("/MyAppendedSwitch"); // Use declaration from argument } - + SECTION("Inno | With CLI args | With manifest switches | With whitespace --custom arg") { - std::ostringstream installOutput; - TestContext context{ installOutput, std::cin }; - auto previousThreadGlobals = context.SetForCurrentThread(); // Inno type with /silent and /log and /custom and /installlocation, switches specified in manifest and whitespace-only --custom argument used in cli - auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_WithSwitches.yaml")); + manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_WithSwitches.yaml")); context.Args.AddArg(Execution::Args::Type::Silent); context.Args.AddArg(Execution::Args::Type::CustomSwitches, "\t"sv); - context.Add(manifest); - context.Add(manifest.Installers.at(0)); - context << GetInstallerArgs; - std::string installerArgs = context.Get(); - REQUIRE(installerArgs.find("/mysilent") != std::string::npos); // Use declaration in manifest - REQUIRE(installerArgs.find("\t") == std::string::npos); // Whitespace only Custom switches should not be appended + expectedArgs.emplace_back("/mysilent"); // Use declaration in manifest + expectedArgs.emplace_back("\t"); // Whitespace only Custom switches should not be appended } - + SECTION("Inno | With CLI args | With manifest switches | With --override arg") { - std::ostringstream installOutput; - TestContext context{ installOutput, std::cin }; - auto previousThreadGlobals = context.SetForCurrentThread(); // Override switch specified. The whole arg passed to installer is overridden. - auto manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_WithSwitches.yaml")); + manifest = YamlParser::CreateFromPath(TestDataFile("InstallerArgTest_Inno_WithSwitches.yaml")); context.Args.AddArg(Execution::Args::Type::Silent); context.Args.AddArg(Execution::Args::Type::Log, "MyLog.log"sv); context.Args.AddArg(Execution::Args::Type::InstallLocation, "MyDir"sv); context.Args.AddArg(Execution::Args::Type::Override, "/OverrideEverything"sv); - context.Add(manifest); - context.Add(manifest.Installers.at(0)); - context << GetInstallerArgs; - std::string installerArgs = context.Get(); - REQUIRE(installerArgs == "/OverrideEverything"); // Use value specified in override switch + exactArgs = "/OverrideEverything"; // Use value specified in override switch + } + + context.Add(manifest); + context.Add(manifest.Installers.at(0)); + context << GetInstallerArgs; + std::string installerArgs = context.Get(); + for (const auto& expectedArg : expectedArgs) + { + REQUIRE(installerArgs.find(expectedArg) != std::string::npos); + } + + if (exactArgs) + { + REQUIRE(installerArgs == *exactArgs); } } diff --git a/src/AppInstallerCLITests/TestCommon.h b/src/AppInstallerCLITests/TestCommon.h index 5866068eed..f420ec5438 100644 --- a/src/AppInstallerCLITests/TestCommon.h +++ b/src/AppInstallerCLITests/TestCommon.h @@ -5,7 +5,6 @@ #include #include #include -#include #include #include diff --git a/src/AppInstallerCLITests/TestSettings.h b/src/AppInstallerCLITests/TestSettings.h index fc7132a36e..c95a3dd21f 100644 --- a/src/AppInstallerCLITests/TestSettings.h +++ b/src/AppInstallerCLITests/TestSettings.h @@ -3,7 +3,6 @@ #pragma once #include #include -#include #include namespace TestCommon diff --git a/src/AppInstallerCLITests/WorkflowCommon.h b/src/AppInstallerCLITests/WorkflowCommon.h index 8ff394806a..0b22326704 100644 --- a/src/AppInstallerCLITests/WorkflowCommon.h +++ b/src/AppInstallerCLITests/WorkflowCommon.h @@ -11,7 +11,7 @@ #define REQUIRE_TERMINATED_WITH(_context_,_hr_) \ REQUIRE(_context_.IsTerminated()); \ - REQUIRE(_hr_ == _context_.GetTerminationHR()) + REQUIRE(static_cast(_hr_) == _context_.GetTerminationHR()) namespace TestCommon { diff --git a/src/AppInstallerCLITests/YamlManifest.cpp b/src/AppInstallerCLITests/YamlManifest.cpp index 9a73691809..5bce41a535 100644 --- a/src/AppInstallerCLITests/YamlManifest.cpp +++ b/src/AppInstallerCLITests/YamlManifest.cpp @@ -393,7 +393,12 @@ void CopyTestDataFilesToFolder(const std::vector& testDataFiles, co } } +// Function uses too much stack space. +// We should be okay here since this is called from tests and it doesn't do calls that are too complicated +#pragma warning( push ) +#pragma warning ( disable : 6262 ) void VerifyV1ManifestContent(const Manifest& manifest, bool isSingleton, ManifestVer manifestVer = { s_ManifestVersionV1 }) +#pragma warning( pop ) { REQUIRE(manifest.Id == "microsoft.msixsdk"); REQUIRE(manifest.Version == "1.7.32"); diff --git a/src/AppInstallerCLITests/pch.h b/src/AppInstallerCLITests/pch.h index fdceff3fea..0d058d7470 100644 --- a/src/AppInstallerCLITests/pch.h +++ b/src/AppInstallerCLITests/pch.h @@ -20,10 +20,14 @@ #include #include +#pragma warning( push ) +#pragma warning ( disable : 6001 6553 6387 6388 28193 28196 ) #include #include +#include #include #include +#pragma warning( push ) #include #include diff --git a/src/AppInstallerCommonCore/Public/AppInstallerProgress.h b/src/AppInstallerCommonCore/Public/AppInstallerProgress.h index 316b374ec8..0e069f28f5 100644 --- a/src/AppInstallerCommonCore/Public/AppInstallerProgress.h +++ b/src/AppInstallerCommonCore/Public/AppInstallerProgress.h @@ -1,7 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #pragma once + +#pragma warning( push ) +#pragma warning ( disable : 6553 ) #include +#pragma warning( pop ) + #include #include #include diff --git a/src/AppInstallerCommonCore/Public/AppInstallerSynchronization.h b/src/AppInstallerCommonCore/Public/AppInstallerSynchronization.h index 44794ccde0..4a7e99d7ac 100644 --- a/src/AppInstallerCommonCore/Public/AppInstallerSynchronization.h +++ b/src/AppInstallerCommonCore/Public/AppInstallerSynchronization.h @@ -3,7 +3,6 @@ #pragma once #include #include -#include #include #include diff --git a/src/AppInstallerCommonCore/Public/AppInstallerTelemetry.h b/src/AppInstallerCommonCore/Public/AppInstallerTelemetry.h index 25176bb800..e5f355835a 100644 --- a/src/AppInstallerCommonCore/Public/AppInstallerTelemetry.h +++ b/src/AppInstallerCommonCore/Public/AppInstallerTelemetry.h @@ -2,7 +2,6 @@ // Licensed under the MIT License. #pragma once #include -#include #include #include diff --git a/src/AppInstallerCommonCore/Public/winget/Certificates.h b/src/AppInstallerCommonCore/Public/winget/Certificates.h index 83c78af1de..c55afdbe33 100644 --- a/src/AppInstallerCommonCore/Public/winget/Certificates.h +++ b/src/AppInstallerCommonCore/Public/winget/Certificates.h @@ -1,10 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #pragma once + #include -#include +#pragma warning( push ) +#pragma warning ( disable : 6553 ) #include +#pragma warning( pop ) + +#include #include #include diff --git a/src/AppInstallerCommonCore/Public/winget/FolderFileWatcher.h b/src/AppInstallerCommonCore/Public/winget/FolderFileWatcher.h index cbf26b7bff..80aacb9d39 100644 --- a/src/AppInstallerCommonCore/Public/winget/FolderFileWatcher.h +++ b/src/AppInstallerCommonCore/Public/winget/FolderFileWatcher.h @@ -3,7 +3,7 @@ #pragma once #include #pragma warning( push ) -#pragma warning ( disable : 6387 28196 ) +#pragma warning ( disable : 6001 6387 28196 ) #include #pragma warning( pop ) diff --git a/src/AppInstallerCommonCore/Public/winget/ManagedFile.h b/src/AppInstallerCommonCore/Public/winget/ManagedFile.h index 7288c828a7..a4ff1daaa4 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManagedFile.h +++ b/src/AppInstallerCommonCore/Public/winget/ManagedFile.h @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #pragma once -#include #include namespace AppInstaller::Utility diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestValidation.h b/src/AppInstallerCommonCore/Public/winget/ManifestValidation.h index 52aa910680..85a07f549a 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestValidation.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestValidation.h @@ -5,7 +5,6 @@ #include #include -#include #include namespace YAML { class Node; } diff --git a/src/AppInstallerCommonCore/Public/winget/Registry.h b/src/AppInstallerCommonCore/Public/winget/Registry.h index fcbae166f2..1c2e6a7dc6 100644 --- a/src/AppInstallerCommonCore/Public/winget/Registry.h +++ b/src/AppInstallerCommonCore/Public/winget/Registry.h @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #pragma once -#include - #include #include #include diff --git a/src/AppInstallerCommonCore/pch.h b/src/AppInstallerCommonCore/pch.h index c9f24fb664..d0910cac8e 100644 --- a/src/AppInstallerCommonCore/pch.h +++ b/src/AppInstallerCommonCore/pch.h @@ -61,7 +61,7 @@ #include #pragma warning( push ) -#pragma warning ( disable : 6001 6285 6287 6340 6387 6388 26451 28196 ) +#pragma warning ( disable : 6001 6285 6287 6340 6387 6388 6553 26451 28196 ) #include #include #include diff --git a/src/AppInstallerRepositoryCore/Microsoft/ARPHelper.h b/src/AppInstallerRepositoryCore/Microsoft/ARPHelper.h index c114c17955..e3055edd9d 100644 --- a/src/AppInstallerRepositoryCore/Microsoft/ARPHelper.h +++ b/src/AppInstallerRepositoryCore/Microsoft/ARPHelper.h @@ -5,7 +5,6 @@ #include #include #include -#include #include diff --git a/src/AppInstallerRepositoryCore/Microsoft/Schema/MetadataTable.h b/src/AppInstallerRepositoryCore/Microsoft/Schema/MetadataTable.h index 5205a270d2..f4ecff442e 100644 --- a/src/AppInstallerRepositoryCore/Microsoft/Schema/MetadataTable.h +++ b/src/AppInstallerRepositoryCore/Microsoft/Schema/MetadataTable.h @@ -3,7 +3,6 @@ #pragma once #include "SQLiteWrapper.h" -#include #include namespace AppInstaller::Repository::Microsoft::Schema diff --git a/src/AppInstallerRepositoryCore/SQLiteWrapper.cpp b/src/AppInstallerRepositoryCore/SQLiteWrapper.cpp index 38b88d6982..c4aebfa23b 100644 --- a/src/AppInstallerRepositoryCore/SQLiteWrapper.cpp +++ b/src/AppInstallerRepositoryCore/SQLiteWrapper.cpp @@ -4,8 +4,6 @@ #include "SQLiteWrapper.h" #include "ICU/SQLiteICU.h" -#include - using namespace std::string_view_literals; // Enable this to have all Statement constructions output the associated query plan. diff --git a/src/AppInstallerRepositoryCore/SQLiteWrapper.h b/src/AppInstallerRepositoryCore/SQLiteWrapper.h index 3a5913ce95..d23952b1bd 100644 --- a/src/AppInstallerRepositoryCore/SQLiteWrapper.h +++ b/src/AppInstallerRepositoryCore/SQLiteWrapper.h @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #pragma once -#include -#include #include #include diff --git a/src/AppInstallerRepositoryCore/pch.h b/src/AppInstallerRepositoryCore/pch.h index 6719427823..ee0b237eac 100644 --- a/src/AppInstallerRepositoryCore/pch.h +++ b/src/AppInstallerRepositoryCore/pch.h @@ -11,7 +11,7 @@ #include #pragma warning( push ) -#pragma warning ( disable : 6001 6340 6387 6388 28196 ) +#pragma warning ( disable : 6001 6340 6387 6388 6553 28196 ) #include #include #include diff --git a/src/AppInstallerSharedLib/pch.h b/src/AppInstallerSharedLib/pch.h index 1698ae128f..45feedc351 100644 --- a/src/AppInstallerSharedLib/pch.h +++ b/src/AppInstallerSharedLib/pch.h @@ -41,7 +41,7 @@ #include #pragma warning( push ) -#pragma warning ( disable : 6001 6285 6287 6340 6387 6388 28196 ) +#pragma warning ( disable : 6001 6285 6287 6340 6387 6388 6553 28196 ) #include #include #include diff --git a/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj b/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj index c7ba9ccad5..2471d71910 100644 --- a/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj +++ b/src/AppInstallerTestExeInstaller/AppInstallerTestExeInstaller.vcxproj @@ -56,6 +56,8 @@ MultiThreadedDebugDLL + + Advapi32.lib;%(AdditionalDependencies) diff --git a/src/Microsoft.Management.Configuration/pch.h b/src/Microsoft.Management.Configuration/pch.h index 7d06129698..d0acfee61e 100644 --- a/src/Microsoft.Management.Configuration/pch.h +++ b/src/Microsoft.Management.Configuration/pch.h @@ -7,10 +7,11 @@ #include #pragma warning( push ) -#pragma warning( disable : 4324 4467 6388) +#pragma warning( disable : 4324 4467 6388 6553 ) // 4324 Allow use of alignment specifiers // 4467 Allow use of uuid attribute for com object creation. // 6388 Allow CreateInstance. +// 6553 Allow annotation to value type #include #include #pragma warning( pop ) diff --git a/src/Microsoft.Management.Deployment/Helpers.cpp b/src/Microsoft.Management.Deployment/Helpers.cpp index 83acf508ee..c1904bca38 100644 --- a/src/Microsoft.Management.Deployment/Helpers.cpp +++ b/src/Microsoft.Management.Deployment/Helpers.cpp @@ -4,7 +4,10 @@ #include "pch.h" #pragma warning ( push ) -#pragma warning ( disable : 6001 ) // use of uninitialized memory in wil/result.h +// 6001 - use of uninitialized memory in wil/result.h +// 6388 - *data might not be '0' in wil/result.h +// 6553 - annotation to value type +#pragma warning ( disable : 6001 6388 6553 ) #include #include #pragma warning ( pop ) diff --git a/src/WinGetServer/WinMain.cpp b/src/WinGetServer/WinMain.cpp index 1ec630bb95..64bc7bc7fa 100644 --- a/src/WinGetServer/WinMain.cpp +++ b/src/WinGetServer/WinMain.cpp @@ -2,7 +2,7 @@ // Licensed under the MIT License. #define NOMINMAX #pragma warning( push ) -#pragma warning ( disable : 6001 6388 6553) +#pragma warning ( disable : 6001 6388 6553 ) #include #include #pragma warning( pop ) diff --git a/src/WinGetUtil/pch.h b/src/WinGetUtil/pch.h index 1c076ea464..ea513a54d6 100644 --- a/src/WinGetUtil/pch.h +++ b/src/WinGetUtil/pch.h @@ -6,7 +6,7 @@ #include #pragma warning( push ) -#pragma warning ( disable : 6001 6340 6388 ) +#pragma warning ( disable : 6001 6340 6388 6553 ) #include #include #pragma warning( pop ) From 9f20a8ecfa9e66cd5f31144b44cbd078ddb74f36 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Mon, 22 May 2023 17:32:24 -0700 Subject: [PATCH 17/43] Fix warnings in test project --- src/AppInstallerCLITests/CompositeSource.cpp | 6 ++--- src/AppInstallerCLITests/InstallFlow.cpp | 12 ++++----- src/AppInstallerCLITests/SourceFlow.cpp | 9 +++---- src/AppInstallerCLITests/Sources.cpp | 2 +- src/AppInstallerCLITests/UninstallFlow.cpp | 2 +- src/AppInstallerCLITests/UpdateFlow.cpp | 26 ++++++++++---------- src/AppInstallerCLITests/WindowsFeature.cpp | 10 ++++---- src/AppInstallerCLITests/WorkflowCommon.h | 5 +++- src/AppInstallerCLITests/main.cpp | 7 ++---- 9 files changed, 38 insertions(+), 41 deletions(-) diff --git a/src/AppInstallerCLITests/CompositeSource.cpp b/src/AppInstallerCLITests/CompositeSource.cpp index e2dbc5daab..1b7d562f2a 100644 --- a/src/AppInstallerCLITests/CompositeSource.cpp +++ b/src/AppInstallerCLITests/CompositeSource.cpp @@ -743,7 +743,7 @@ TEST_CASE("CompositeSource_AvailableSearchFailure", "[CompositeSource]") } catch (...) {} - REQUIRE(searchFailure == expectedHR); + REQUIRE((searchFailure == expectedHR)); } TEST_CASE("CompositeSource_InstalledToAvailableCorrelationSearchFailure", "[CompositeSource]") @@ -779,7 +779,7 @@ TEST_CASE("CompositeSource_InstalledToAvailableCorrelationSearchFailure", "[Comp } catch (...) {} - REQUIRE(searchFailure == expectedHR); + REQUIRE((searchFailure == expectedHR)); } TEST_CASE("CompositeSource_InstalledAvailableSearchFailure", "[CompositeSource]") @@ -823,7 +823,7 @@ TEST_CASE("CompositeSource_InstalledAvailableSearchFailure", "[CompositeSource]" } catch (...) {} - REQUIRE(searchFailure == expectedHR); + REQUIRE((searchFailure == expectedHR)); } TEST_CASE("CompositeSource_TrackingPackageFound", "[CompositeSource]") diff --git a/src/AppInstallerCLITests/InstallFlow.cpp b/src/AppInstallerCLITests/InstallFlow.cpp index 1b3b5e3685..18278a71b6 100644 --- a/src/AppInstallerCLITests/InstallFlow.cpp +++ b/src/AppInstallerCLITests/InstallFlow.cpp @@ -161,7 +161,7 @@ TEST_CASE("InstallFlowNonZeroExitCode", "[InstallFlow][workflow]") INFO(installOutput.str()); // Verify Installer is called and parameters are passed in. - REQUIRE(context.GetTerminationHR() == S_OK); + REQUIRE_SUCCEEDED(context); REQUIRE(std::filesystem::exists(installResultPath.GetPath())); std::ifstream installResultFile(installResultPath.GetPath()); REQUIRE(installResultFile.is_open()); @@ -186,7 +186,7 @@ TEST_CASE("InstallFlow_InstallationNotes", "[InstallFlow][workflow]") INFO(installOutput.str()); // Verify installation notes are displayed - REQUIRE(context.GetTerminationHR() == S_OK); + REQUIRE_SUCCEEDED(context); REQUIRE(std::filesystem::exists(installResultPath.GetPath())); REQUIRE(installOutput.str().find("testInstallationNotes") != std::string::npos); } @@ -209,7 +209,7 @@ TEST_CASE("InstallFlow_UnsupportedArguments_Warn", "[InstallFlow][workflow]") INFO(installOutput.str()); // Verify unsupported arguments warn message is shown - REQUIRE(context.GetTerminationHR() == S_OK); + REQUIRE_SUCCEEDED(context); REQUIRE(std::filesystem::exists(installResultPath.GetPath())); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::UnsupportedArgument).get()) != std::string::npos); REQUIRE(installOutput.str().find("-o,--log") != std::string::npos); @@ -232,7 +232,7 @@ TEST_CASE("InstallFlow_UnsupportedArguments_Error", "[InstallFlow][workflow]") INFO(installOutput.str()); // Verify unsupported arguments error message is shown - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UNSUPPORTED_ARGUMENT); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_UNSUPPORTED_ARGUMENT); REQUIRE(!std::filesystem::exists(installResultPath.GetPath())); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::UnsupportedArgument).get()) != std::string::npos); REQUIRE(installOutput.str().find("-l,--location") != std::string::npos); @@ -254,7 +254,7 @@ TEST_CASE("InstallFlow_UnsupportedArguments_NotProvided") INFO(installOutput.str()); // Verify unsupported arguments error message is not shown when not provided - REQUIRE(context.GetTerminationHR() == S_OK); + REQUIRE_SUCCEEDED(context); REQUIRE(std::filesystem::exists(installResultPath.GetPath())); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::UnsupportedArgument).get()) == std::string::npos); REQUIRE(installOutput.str().find("-o,--log") == std::string::npos); @@ -389,7 +389,7 @@ TEST_CASE("InstallFlow_Zip_UnsupportedNestedInstaller", "[InstallFlow][workflow] install.Execute(context); INFO(installOutput.str()); - REQUIRE_TERMINATED_WITH(context, ERROR_NOT_SUPPORTED); + REQUIRE_TERMINATED_WITH(context, HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)); // Verify Installer was not called REQUIRE(!std::filesystem::exists(installResultPath.GetPath())); diff --git a/src/AppInstallerCLITests/SourceFlow.cpp b/src/AppInstallerCLITests/SourceFlow.cpp index 6581f92a82..5e0223320d 100644 --- a/src/AppInstallerCLITests/SourceFlow.cpp +++ b/src/AppInstallerCLITests/SourceFlow.cpp @@ -59,8 +59,7 @@ TEST_CASE("SourceAddFlow_Agreement", "[SourceAddFlow][workflow]") REQUIRE(sourceAddOutput.str().find("https://test") != std::string::npos); REQUIRE(sourceAddOutput.str().find(Resource::LocString(Resource::String::SourceAgreementsMarketMessage).get()) != std::string::npos); - // Verify Installer is called. - REQUIRE(context.GetTerminationHR() == S_OK); + REQUIRE_SUCCEEDED(context); } TEST_CASE("SourceAddFlow_Agreement_Prompt_Yes", "[SourceAddFlow][workflow]") @@ -85,8 +84,7 @@ TEST_CASE("SourceAddFlow_Agreement_Prompt_Yes", "[SourceAddFlow][workflow]") REQUIRE(sourceAddOutput.str().find("https://test") != std::string::npos); REQUIRE(sourceAddOutput.str().find(Resource::LocString(Resource::String::SourceAgreementsMarketMessage).get()) != std::string::npos); - // Verify Installer is called. - REQUIRE(context.GetTerminationHR() == S_OK); + REQUIRE_SUCCEEDED(context); } TEST_CASE("SourceAddFlow_Agreement_Prompt_No", "[SourceAddFlow][workflow]") @@ -111,8 +109,7 @@ TEST_CASE("SourceAddFlow_Agreement_Prompt_No", "[SourceAddFlow][workflow]") REQUIRE(sourceAddOutput.str().find("https://test") != std::string::npos); REQUIRE(sourceAddOutput.str().find(Resource::LocString(Resource::String::SourceAgreementsMarketMessage).get()) != std::string::npos); - // Verify Installer is called. - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_SOURCE_AGREEMENTS_NOT_ACCEPTED); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_SOURCE_AGREEMENTS_NOT_ACCEPTED); } TEST_CASE("OpenSource_WithCustomHeader", "[OpenSource][CustomHeader]") diff --git a/src/AppInstallerCLITests/Sources.cpp b/src/AppInstallerCLITests/Sources.cpp index f35ea9ed45..b23e93ed9a 100644 --- a/src/AppInstallerCLITests/Sources.cpp +++ b/src/AppInstallerCLITests/Sources.cpp @@ -1065,7 +1065,7 @@ TEST_CASE("RepoSources_OpenMultipleWithSingleFailure", "[sources]") } catch (...) {} - REQUIRE(openFailure == FailingSourcesTestSource::FailingHR); + REQUIRE((openFailure == FailingSourcesTestSource::FailingHR)); } TEST_CASE("RepoSources_OpenMultipleWithTotalFailure", "[sources]") diff --git a/src/AppInstallerCLITests/UninstallFlow.cpp b/src/AppInstallerCLITests/UninstallFlow.cpp index 480c830e41..caeafc51c6 100644 --- a/src/AppInstallerCLITests/UninstallFlow.cpp +++ b/src/AppInstallerCLITests/UninstallFlow.cpp @@ -169,7 +169,7 @@ TEST_CASE("UninstallFlow_UninstallExeNotFound", "[UninstallFlow][workflow]") // Verify Uninstaller is not called. REQUIRE(!std::filesystem::exists(uninstallResultPath.GetPath())); REQUIRE(uninstallOutput.str().find(Resource::LocString(Resource::String::NoInstalledPackageFound).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_NO_APPLICATIONS_FOUND); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_NO_APPLICATIONS_FOUND); } TEST_CASE("UninstallFlow_UninstallMultiple", "[UninstallFlow][workflow][MultiQuery]") diff --git a/src/AppInstallerCLITests/UpdateFlow.cpp b/src/AppInstallerCLITests/UpdateFlow.cpp index 56406fcf01..3d9832196f 100644 --- a/src/AppInstallerCLITests/UpdateFlow.cpp +++ b/src/AppInstallerCLITests/UpdateFlow.cpp @@ -80,7 +80,7 @@ TEST_CASE("UpdateFlow_UpdateWithManifestAppNotInstalled", "[UpdateFlow][workflow // Verify Installer is not called. REQUIRE(!std::filesystem::exists(updateResultPath.GetPath())); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::NoInstalledPackageFound).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_NO_APPLICATIONS_FOUND); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_NO_APPLICATIONS_FOUND); } TEST_CASE("UpdateFlow_UpdateWithManifestVersionAlreadyInstalled", "[UpdateFlow][workflow]") @@ -101,7 +101,7 @@ TEST_CASE("UpdateFlow_UpdateWithManifestVersionAlreadyInstalled", "[UpdateFlow][ REQUIRE(!std::filesystem::exists(updateResultPath.GetPath())); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::UpdateNoPackagesFound).get()) != std::string::npos); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::UpdateNoPackagesFoundReason).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); } TEST_CASE("UpdateFlow_UpdateExe", "[UpdateFlow][workflow]") @@ -232,7 +232,7 @@ TEST_CASE("UpdateFlow_UpdateExeWithUnsupportedArgs", "[UpdateFlow][workflow]") INFO(updateOutput.str()); // Verify unsupported arguments error message is shown - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UNSUPPORTED_ARGUMENT); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_UNSUPPORTED_ARGUMENT); REQUIRE(!std::filesystem::exists(updateResultPath.GetPath())); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::UnsupportedArgument).get()) != std::string::npos); REQUIRE(updateOutput.str().find("-l,--location") != std::string::npos); @@ -256,7 +256,7 @@ TEST_CASE("UpdateFlow_UnknownVersion", "[UpdateFlow][workflow]") INFO(updateOutput.str()); // Verify help message is shown the user to use --include-unknown - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); REQUIRE(!std::filesystem::exists(updateResultPath.GetPath())); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::UpgradeUnknownVersionExplanation).get()) != std::string::npos); } @@ -408,7 +408,7 @@ TEST_CASE("UpdateFlow_UpdateExeLatestAlreadyInstalled", "[UpdateFlow][workflow]" REQUIRE(!std::filesystem::exists(updateResultPath.GetPath())); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::UpdateNoPackagesFound).get()) != std::string::npos); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::UpdateNoPackagesFoundReason).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); } TEST_CASE("UpdateFlow_UpdateExeInstallerTypeNotApplicable", "[UpdateFlow][workflow]") @@ -428,7 +428,7 @@ TEST_CASE("UpdateFlow_UpdateExeInstallerTypeNotApplicable", "[UpdateFlow][workfl // Verify Installer is not called. REQUIRE(!std::filesystem::exists(updateResultPath.GetPath())); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::UpgradeDifferentInstallTechnologyInNewerVersions).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); } TEST_CASE("UpdateFlow_UpdateExeInstallerTypeNotApplicableSpecificVersion", "[UpdateFlow][workflow]") @@ -449,7 +449,7 @@ TEST_CASE("UpdateFlow_UpdateExeInstallerTypeNotApplicableSpecificVersion", "[Upd // Verify Installer is not called. REQUIRE(!std::filesystem::exists(updateResultPath.GetPath())); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::UpgradeDifferentInstallTechnology).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); } TEST_CASE("UpdateFlow_UpdateExeWithDifferentInstalledType", "[UpdateFlow][workflow]") @@ -469,7 +469,7 @@ TEST_CASE("UpdateFlow_UpdateExeWithDifferentInstalledType", "[UpdateFlow][workfl INFO(updateOutput.str()); // Verify Installer is called. - REQUIRE(context.GetTerminationHR() == S_OK); + REQUIRE_SUCCEEDED(context); REQUIRE(std::filesystem::exists(updateResultPath.GetPath())); } @@ -491,7 +491,7 @@ TEST_CASE("UpdateFlow_UpdateExeSpecificVersionNotFound", "[UpdateFlow][workflow] // Verify Installer is not called. REQUIRE(!std::filesystem::exists(updateResultPath.GetPath())); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::GetManifestResultVersionNotFound("1.2.3.4"_liv)).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_NO_MANIFEST_FOUND); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_NO_MANIFEST_FOUND); } TEST_CASE("UpdateFlow_UpdateExeSpecificVersionNotApplicable", "[UpdateFlow][workflow]") @@ -513,7 +513,7 @@ TEST_CASE("UpdateFlow_UpdateExeSpecificVersionNotApplicable", "[UpdateFlow][work // Verify Installer is not called. REQUIRE(!std::filesystem::exists(updateResultPath.GetPath())); REQUIRE(updateOutput.str().find(Resource::LocString(Resource::String::UpgradeDifferentInstallTechnology).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); } TEST_CASE("UpdateFlow_UpdateAllApplicable", "[UpdateFlow][workflow]") @@ -845,7 +845,7 @@ TEST_CASE("UpdateFlow_RequireExplicit", "[UpdateFlow][workflow]") } // Command should always succeed - REQUIRE(context.GetTerminationHR() == S_OK); + REQUIRE_SUCCEEDED(context); } TEST_CASE("InstallFlow_FoundInstalledAndUpgradeAvailable", "[UpdateFlow][workflow]") @@ -892,7 +892,7 @@ TEST_CASE("InstallFlow_FoundInstalledAndUpgradeAvailable_WithNoUpgrade", "[Updat // Verify Installer is not called. REQUIRE(!std::filesystem::exists(installResultPath.GetPath())); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::PackageAlreadyInstalled).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_PACKAGE_ALREADY_INSTALLED); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_PACKAGE_ALREADY_INSTALLED); } TEST_CASE("InstallFlow_FoundInstalledAndUpgradeNotAvailable", "[UpdateFlow][workflow]") @@ -913,7 +913,7 @@ TEST_CASE("InstallFlow_FoundInstalledAndUpgradeNotAvailable", "[UpdateFlow][work REQUIRE(!std::filesystem::exists(installResultPath.GetPath())); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::UpdateNoPackagesFound).get()) != std::string::npos); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::UpdateNoPackagesFoundReason).get()) != std::string::npos); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE); } TEST_CASE("UpdateFlow_UpdateAll_ForwardArgs", "[UpdateFlow][workflow]") diff --git a/src/AppInstallerCLITests/WindowsFeature.cpp b/src/AppInstallerCLITests/WindowsFeature.cpp index 0f00b55658..671bd7ad69 100644 --- a/src/AppInstallerCLITests/WindowsFeature.cpp +++ b/src/AppInstallerCLITests/WindowsFeature.cpp @@ -39,7 +39,7 @@ TEST_CASE("InstallFlow_WindowsFeatureDoesNotExist", "[windowsFeature]") install.Execute(context); INFO(installOutput.str()); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_INSTALL_MISSING_DEPENDENCY); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_INSTALL_MISSING_DEPENDENCY); REQUIRE(!std::filesystem::exists(installResultPath.GetPath())); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::WindowsFeatureNotFound(LocIndView{ "testFeature1" })).get()) != std::string::npos); @@ -79,7 +79,7 @@ TEST_CASE("InstallFlow_FailedToEnableWindowsFeature", "[windowsFeature]") install.Execute(context); INFO(installOutput.str()); - REQUIRE(context.GetTerminationHR() == dismErrorResult); + REQUIRE_TERMINATED_WITH(context, dismErrorResult); REQUIRE(!std::filesystem::exists(installResultPath.GetPath())); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::FailedToEnableWindowsFeatureOverrideRequired).get()) != std::string::npos); } @@ -119,7 +119,7 @@ TEST_CASE("InstallFlow_FailedToEnableWindowsFeature_Force", "[windowsFeature]") INFO(installOutput.str()); // Verify Installer is called and parameters are passed in. - REQUIRE(context.GetTerminationHR() == ERROR_SUCCESS); + REQUIRE_SUCCEEDED(context); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::FailedToEnableWindowsFeature(testFeatureDisplayName, LocIndView{ "testFeature1" })).get()) != std::string::npos); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::FailedToEnableWindowsFeature(testFeatureDisplayName, LocIndView{ "testFeature2" })).get()) != std::string::npos); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::FailedToEnableWindowsFeatureOverridden).get()) != std::string::npos); @@ -162,7 +162,7 @@ TEST_CASE("InstallFlow_RebootRequired", "[windowsFeature]") install.Execute(context); INFO(installOutput.str()); - REQUIRE(context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_INSTALL_REBOOT_REQUIRED_TO_INSTALL); + REQUIRE_TERMINATED_WITH(context, APPINSTALLER_CLI_ERROR_INSTALL_REBOOT_REQUIRED_TO_INSTALL); REQUIRE(!std::filesystem::exists(installResultPath.GetPath())); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::RebootRequiredToEnableWindowsFeatureOverrideRequired).get()) != std::string::npos); } @@ -200,7 +200,7 @@ TEST_CASE("InstallFlow_RebootRequired_Force", "[windowsFeature]") INFO(installOutput.str()); // Verify Installer is called and parameters are passed in. - REQUIRE(context.GetTerminationHR() == ERROR_SUCCESS); + REQUIRE_SUCCEEDED(context); REQUIRE(installOutput.str().find(Resource::LocString(Resource::String::RebootRequiredToEnableWindowsFeatureOverridden).get()) != std::string::npos); REQUIRE(std::filesystem::exists(installResultPath.GetPath())); std::ifstream installResultFile(installResultPath.GetPath()); diff --git a/src/AppInstallerCLITests/WorkflowCommon.h b/src/AppInstallerCLITests/WorkflowCommon.h index 0b22326704..2589b83907 100644 --- a/src/AppInstallerCLITests/WorkflowCommon.h +++ b/src/AppInstallerCLITests/WorkflowCommon.h @@ -11,7 +11,10 @@ #define REQUIRE_TERMINATED_WITH(_context_,_hr_) \ REQUIRE(_context_.IsTerminated()); \ - REQUIRE(static_cast(_hr_) == _context_.GetTerminationHR()) + REQUIRE(( (_hr_) == (_context_).GetTerminationHR() )) + +#define REQUIRE_SUCCEEDED(_context_) \ + REQUIRE(( S_OK == (_context_).GetTerminationHR() )) namespace TestCommon { diff --git a/src/AppInstallerCLITests/main.cpp b/src/AppInstallerCLITests/main.cpp index d38da19342..3b64ac269c 100644 --- a/src/AppInstallerCLITests/main.cpp +++ b/src/AppInstallerCLITests/main.cpp @@ -1,11 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. + #define CATCH_CONFIG_RUNNER -#include -#include -#include -#include -#include +#include "pch.h" #include #include From 7fec4f4800071f7bc0945adaf4062a22188e2753 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Mon, 22 May 2023 18:02:06 -0700 Subject: [PATCH 18/43] run codql manually --- azure-pipelines.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f045cc8395..e4c3212405 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,6 +62,10 @@ jobs: packageLayoutDir: $(Build.BinariesDirectory)\WingetPackageLayout steps: + + # TODO: Remove; only to test in non-default branch + - task: CodeQL3000Init@0 + - task: NuGetToolInstaller@1 displayName: Install Nuget @@ -384,3 +388,7 @@ jobs: displayName: Publish PowerShell Module Artifacts inputs: targetPath: '$(Build.ArtifactStagingDirectory)' + + # TODO: Remove; only to test in non-default branch + - task: CodeQL3000Finalize@0 + condition: always() \ No newline at end of file From 49a6d09963abf107f0928ecd8d0d9c753bb7946c Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Tue, 23 May 2023 12:47:56 -0700 Subject: [PATCH 19/43] Fix more warnings --- azure-pipelines.yml | 2 +- src/AppInstallerCLICore/Workflows/ArchiveFlow.cpp | 2 +- .../Workflows/DependenciesFlow.cpp | 9 +++------ src/AppInstallerCLITests/Correlation.cpp | 13 ++++++++----- src/AppInstallerCLITests/TestConfiguration.h | 4 ++-- src/AppInstallerCLITests/pch.h | 3 +++ 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e4c3212405..a5f45ea48f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -389,6 +389,6 @@ jobs: inputs: targetPath: '$(Build.ArtifactStagingDirectory)' - # TODO: Remove; only to test in non-default branch + # TODO: Remove; only to test in non-default branch - task: CodeQL3000Finalize@0 condition: always() \ No newline at end of file diff --git a/src/AppInstallerCLICore/Workflows/ArchiveFlow.cpp b/src/AppInstallerCLICore/Workflows/ArchiveFlow.cpp index c273fd827a..704884b6c2 100644 --- a/src/AppInstallerCLICore/Workflows/ArchiveFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/ArchiveFlow.cpp @@ -118,7 +118,7 @@ namespace AppInstaller::CLI::Workflow { AICLI_LOG(CLI, Error, << "Nested installer type not supported: " << installer.NestedInstallerType); context.Reporter.Error() << Resource::String::NestedInstallerNotSupported << std::endl; - AICLI_TERMINATE_CONTEXT(ERROR_NOT_SUPPORTED); + AICLI_TERMINATE_CONTEXT(HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)); } auto const& nestedInstallerFiles = installer.NestedInstallerFiles; diff --git a/src/AppInstallerCLICore/Workflows/DependenciesFlow.cpp b/src/AppInstallerCLICore/Workflows/DependenciesFlow.cpp index 214bb10d57..3df766e224 100644 --- a/src/AppInstallerCLICore/Workflows/DependenciesFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/DependenciesFlow.cpp @@ -190,12 +190,9 @@ namespace AppInstaller::CLI::Workflow << GetUserPresentableMessage(hr) << std::endl; } -// TODO: Check this warning. -// Comparison between different int types (HRESULT and long) -#pragma warning ( push ) -#pragma warning ( disable : 6221 ) - if (hr == ERROR_SUCCESS_REBOOT_REQUIRED || windowsFeature.GetRestartRequiredStatus() == DismRestartType::DismRestartRequired) -#pragma warning ( pop ) + // ERROR_SUCCESS_REBOOT_REQUIRED is not an HResult, but that's what DismEnableFeature returns. + // Cast it to HResult (instead of using HRESULT_FROM_WIN32) to avoid warning about comparing semantically different types. + if (hr == static_cast(ERROR_SUCCESS_REBOOT_REQUIRED) || windowsFeature.GetRestartRequiredStatus() == DismRestartType::DismRestartRequired) { rebootRequired = true; } diff --git a/src/AppInstallerCLITests/Correlation.cpp b/src/AppInstallerCLITests/Correlation.cpp index 1b364ad06d..2f07d42aac 100644 --- a/src/AppInstallerCLITests/Correlation.cpp +++ b/src/AppInstallerCLITests/Correlation.cpp @@ -27,7 +27,7 @@ struct TestCase std::string ARPName; std::string ARPPublisher; - bool IsMatch; + bool IsMatch = false; }; // Definition of a collection of test cases that we evaluate @@ -43,10 +43,10 @@ struct DataSet // Thresholds for considering a run of an heuristic against // this data set "good". // Values are ratios to the total number of test cases - double RequiredTrueMatchRatio; - double RequiredTrueMismatchRatio; - double RequiredFalseMatchRatio; - double RequiredFalseMismatchRatio; + double RequiredTrueMatchRatio = 0; + double RequiredTrueMismatchRatio = 0; + double RequiredFalseMatchRatio = 0; + double RequiredFalseMismatchRatio = 0; }; // Aggregate result of running an heuristic against a data set. @@ -264,9 +264,12 @@ DataSet GetDataSet_WithNoise() // It is useful for comparing multiple algorithms, but for // regular testing we need only check that the chosen algorithm // performs well. +#pragma warning( push ) +#pragma warning ( disable : 26444 ) // Don't declare local variables with no name TEMPLATE_TEST_CASE("Correlation_MeasureAlgorithmPerformance", "[correlation][.]", EmptyMatchConfidenceAlgorithm, WordsEditDistanceMatchConfidenceAlgorithm) +#pragma warning( push ) { // Each section loads a different data set, // and then they are all handled the same diff --git a/src/AppInstallerCLITests/TestConfiguration.h b/src/AppInstallerCLITests/TestConfiguration.h index 0d18770f54..e2637f76ba 100644 --- a/src/AppInstallerCLITests/TestConfiguration.h +++ b/src/AppInstallerCLITests/TestConfiguration.h @@ -84,7 +84,7 @@ namespace TestCommon winrt::Windows::Foundation::DateTime PublishedDateValue; winrt::Windows::Foundation::DateTime PublishedDate() const { return PublishedDateValue; } - bool IsLocalValue; + bool IsLocalValue = false; bool IsLocal() const { return IsLocalValue; } winrt::hstring AuthorValue; @@ -99,7 +99,7 @@ namespace TestCommon winrt::Windows::Foundation::Collections::IVector SettingsValue; winrt::Windows::Foundation::Collections::IVectorView Settings() const { return (SettingsValue ? SettingsValue.GetView() : nullptr); } - bool IsPublicValue; + bool IsPublicValue = false; bool IsPublic() const { return IsPublicValue; } }; diff --git a/src/AppInstallerCLITests/pch.h b/src/AppInstallerCLITests/pch.h index 0d058d7470..be66d3dc4d 100644 --- a/src/AppInstallerCLITests/pch.h +++ b/src/AppInstallerCLITests/pch.h @@ -11,7 +11,10 @@ #include #include +#pragma warning( push ) +#pragma warning ( disable : 26495 ) // Member variable is uninitialized #include +#pragma warning( pop ) #include From 903ca2f5c5ffe15bdb91b0dac43bcdbb7a6bf6eb Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Tue, 23 May 2023 12:52:19 -0700 Subject: [PATCH 20/43] always run static analysis for testing --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a5f45ea48f..25e5fec85c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -345,6 +345,7 @@ jobs: # Run static analysis for all the binaries - task: CredScan@3 + condition: always() # TODO: remove - task: BinSkim@4 inputs: @@ -352,6 +353,7 @@ jobs: Function: 'analyze' TargetPattern: 'guardianGlob' AnalyzeTargetGlob: 'f|$(buildOutDir)/**.dll;f|$(buildOutDir)/**.exe;f|$(Build.SourcesDirectory)\src\WinGetUtilInterop\bin\*.dll' + condition: always() # TODO: remove - task: PublishSecurityAnalysisLogs@3 inputs: From b94e493752e17b3954bef880b1e5c849b776241d Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Tue, 23 May 2023 13:47:08 -0700 Subject: [PATCH 21/43] More warnings --- src/AppInstallerCLITests/pch.h | 2 +- src/AppInstallerCommonCore/Public/winget/ManifestCommon.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AppInstallerCLITests/pch.h b/src/AppInstallerCLITests/pch.h index be66d3dc4d..fd7148d245 100644 --- a/src/AppInstallerCLITests/pch.h +++ b/src/AppInstallerCLITests/pch.h @@ -12,7 +12,7 @@ #include #pragma warning( push ) -#pragma warning ( disable : 26495 ) // Member variable is uninitialized +#pragma warning ( disable : 26439 26451 26495 ) #include #pragma warning( pop ) diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h index c29d76b383..4f45978b5a 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h @@ -266,8 +266,8 @@ namespace AppInstaller::Manifest struct MarketsInfo { - std::vector AllowedMarkets; - std::vector ExcludedMarkets; + std::vector AllowedMarkets = {}; + std::vector ExcludedMarkets = {}; }; struct NestedInstallerFile From afd9972a3ddd467d2ad4cbb396b201f5de932918 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Tue, 23 May 2023 14:44:56 -0700 Subject: [PATCH 22/43] More warnings --- src/AppInstallerCLITests/TestRestRequestHandler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AppInstallerCLITests/TestRestRequestHandler.h b/src/AppInstallerCLITests/TestRestRequestHandler.h index 33e33ab650..b521eab980 100644 --- a/src/AppInstallerCLITests/TestRestRequestHandler.h +++ b/src/AppInstallerCLITests/TestRestRequestHandler.h @@ -1,7 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #pragma once + +#pragma warning( push ) +#pragma warning ( disable : 26439 26495 ) #include +#pragma warning( pop ) class TestRestRequestHandler : public web::http::http_pipeline_stage { From 08bf8dc63129dc830c1c21fcb1e0316da5282895 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Wed, 24 May 2023 12:54:21 -0700 Subject: [PATCH 23/43] Disable tests for quicker testing --- azure-pipelines.yml | 327 ++++++++++++++++++++++---------------------- 1 file changed, 164 insertions(+), 163 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 25e5fec85c..c7ff9f6b87 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -126,6 +126,7 @@ jobs: /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=SideloadOnly' + enabled: false - task: CopyFiles@2 displayName: 'Copy WindowsPackageManager.dll Symbols to artifacts folder' @@ -134,170 +135,170 @@ jobs: TargetFolder: '$(artifactsDir)' condition: succeededOrFailed() - - task: PowerShell@2 - displayName: Install Tests Dependencies - inputs: - targetType: 'inline' - script: | - Add-AppxPackage AppInstallerCLIPackage_0.0.2.0_Test\Dependencies\$(buildPlatform)\Microsoft.VCLibs.$(buildPlatform).14.00.Desktop.appx - workingDirectory: $(appxPackageDir) - - - task: VisualStudioTestPlatformInstaller@1 - displayName: Prepare VSTest for E2E Tests - inputs: - packageFeedSelector: 'nugetOrg' - - - task: DownloadSecureFile@1 - name: PsExec - displayName: 'Download PsExec.exe' - inputs: - secureFile: 'PsExec.exe' - - - task: CmdLine@2 - displayName: Run Unit Tests Unpackaged Under System Context - inputs: - script: | - $(PsExec.secureFilePath) -accepteula -s -i $(buildOutDir)\AppInstallerCLITests\AppInstallerCLITests.exe -logto $(artifactsDir)\AICLI-Unpackaged-System.log -s -r junit -o $(artifactsDir)\TEST-AppInstallerCLI-Unpackaged-System.xml - workingDirectory: '$(buildOutDir)\AppInstallerCLITests' - continueOnError: true - - - task: PowerShell@2 - displayName: Create Package Layout - inputs: - filePath: 'src\AppInstallerCLIPackage\Execute-AppxRecipe.ps1' - arguments: '-AppxRecipePath AppInstallerCLIPackage\bin\$(buildPlatform)\$(buildConfiguration)\AppInstallerCLIPackage.build.appxrecipe -LayoutPath $(packageLayoutDir) -Force -Verbose' - workingDirectory: 'src' - continueOnError: true - - - task: PowerShell@2 - displayName: Run Unit Tests Packaged - inputs: - filePath: 'src\AppInstallerCLITests\Run-TestsInPackage.ps1' - arguments: '-Args "~[pips]" -BuildRoot $(buildOutDir) -PackageRoot $(packageLayoutDir) -LogTarget $(artifactsDir)\AICLI-Packaged.log -TestResultsTarget $(artifactsDir)\TEST-AppInstallerCLI-Packaged.xml -ScriptWait' - workingDirectory: 'src' - continueOnError: true - - - task: PublishTestResults@2 - displayName: Publish Unit Test Results - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: '$(artifactsDir)\TEST-*.xml' - failTaskOnFailedTests: true - - - task: DownloadSecureFile@1 - name: AppInstallerTest - displayName: 'Download Source Package Certificate' - inputs: - secureFile: 'AppInstallerTest.pfx' - - - task: DownloadSecureFile@1 - name: HTTPSDevCert - displayName: 'Download Kestrel Certificate' - inputs: - secureFile: 'HTTPSDevCertV2.pfx' - - - task: MSBuild@1 - displayName: Build MSIX Test Installer File - inputs: - platform: '$(buildPlatform)' - solution: 'src\AppInstallerTestMsixInstaller\AppInstallerTestMsixInstaller.wapproj' - configuration: '$(buildConfiguration)' - msbuildArguments: '/p:AppxPackageOutput="$(Build.ArtifactStagingDirectory)\AppInstallerTestMsixInstaller.msix" - /p:AppxBundle=Never - /p:UapAppxPackageBuildMode=SideLoadOnly - /p:AppxPackageSigningEnabled=false' - - - task: PowerShell@2 - displayName: Install Root Certificate - inputs: - filePath: 'src\LocalhostWebServer\InstallDevCert.ps1' - arguments: '-pfxpath $(HTTPSDevCert.secureFilePath) -password microsoft' - - - task: PowerShell@2 - displayName: Launch LocalhostWebServer - inputs: - filePath: 'src\LocalhostWebServer\Run-LocalhostWebServer.ps1' - arguments: '-BuildRoot $(buildOutDir)\LocalhostWebServer -StaticFileRoot $(Agent.TempDirectory)\TestLocalIndex -CertPath $(HTTPSDevCert.secureFilePath) -CertPassword microsoft' - - - task: PowerShell@2 - displayName: 'Set program files directory' - inputs: - targetType: 'inline' - script: | - if ("$(buildPlatform)" -eq "x86") { - Write-Host "##vso[task.setvariable variable=platformProgramFiles;]${env:ProgramFiles(x86)}" - } else { - Write-Host "##vso[task.setvariable variable=platformProgramFiles;]${env:ProgramFiles}" - } - - # Resolves resource strings utilized by InProc E2E tests. - - task: CopyFiles@2 - displayName: 'Copy resources.pri to dotnet directory' - inputs: - SourceFolder: '$(buildOutDir)\AppInstallerCLI' - TargetFolder: '$(platformProgramFiles)\dotnet' - Contents: resources.pri - - # Winmd accessed by test runner process (dotnet.exe) - - task: CopyFiles@2 - displayName: 'Copy winmd to dotnet directory' - inputs: - SourceFolder: '$(buildOutDir)\Microsoft.Management.Deployment' - TargetFolder: '$(platformProgramFiles)\dotnet' - Contents: Microsoft.Management.Deployment.winmd - - - template: templates/e2e-test.template.yml - parameters: - title: "E2E Tests Packaged" - isPackaged: true - filter: "TestCategory!=InProcess&TestCategory!=OutOfProcess" - - - template: templates/e2e-test.template.yml - parameters: - title: "COM API E2E Tests (In-process)" - isPackaged: false - filter: "TestCategory=InProcess" - - - template: templates/e2e-test.template.yml - parameters: - title: "COM API E2E Tests (Out-of-process)" - isPackaged: true - filter: "TestCategory=OutOfProcess" - - - task: CopyFiles@2 - displayName: 'Copy E2E Tests Package Log to artifacts folder' - inputs: - SourceFolder: '$(temp)\E2ETestLogs' - TargetFolder: '$(artifactsDir)\E2ETestsPackagedLog' - condition: succeededOrFailed() - - - task: CopyFiles@2 - displayName: 'Copy Files: WinGetUtilInterop.UnitTests' - inputs: - SourceFolder: '$(Build.SourcesDirectory)\src\WinGetUtilInterop.UnitTests\bin\$(BuildConfiguration)\netcoreapp3.1' - TargetFolder: '$(Build.ArtifactStagingDirectory)\WinGetUtilInterop.UnitTests\' - CleanTargetFolder: true - OverWrite: true - - - task: VSTest@2 - displayName: 'Run tests: WinGetUtilInterop.UnitTests' - inputs: - testSelector: 'testAssemblies' - testAssemblyVer2: 'WinGetUtilInterop.UnitTests.dll' - searchFolder: '$(Build.ArtifactStagingDirectory)\WinGetUtilInterop.UnitTests' - codeCoverageEnabled: true - platform: 'Any CPU' - configuration: '$(BuildConfiguration)' + #- task: PowerShell@2 + # displayName: Install Tests Dependencies + # inputs: + # targetType: 'inline' + # script: | + # Add-AppxPackage AppInstallerCLIPackage_0.0.2.0_Test\Dependencies\$(buildPlatform)\Microsoft.VCLibs.$(buildPlatform).14.00.Desktop.appx + # workingDirectory: $(appxPackageDir) + + #- task: VisualStudioTestPlatformInstaller@1 + # displayName: Prepare VSTest for E2E Tests + # inputs: + # packageFeedSelector: 'nugetOrg' + + #- task: DownloadSecureFile@1 + # name: PsExec + # displayName: 'Download PsExec.exe' + # inputs: + # secureFile: 'PsExec.exe' + + #- task: CmdLine@2 + # displayName: Run Unit Tests Unpackaged Under System Context + # inputs: + # script: | + # $(PsExec.secureFilePath) -accepteula -s -i $(buildOutDir)\AppInstallerCLITests\AppInstallerCLITests.exe -logto $(artifactsDir)\AICLI-Unpackaged-System.log -s -r junit -o $(artifactsDir)\TEST-AppInstallerCLI-Unpackaged-System.xml + # workingDirectory: '$(buildOutDir)\AppInstallerCLITests' + # continueOnError: true + + #- task: PowerShell@2 + # displayName: Create Package Layout + # inputs: + # filePath: 'src\AppInstallerCLIPackage\Execute-AppxRecipe.ps1' + # arguments: '-AppxRecipePath AppInstallerCLIPackage\bin\$(buildPlatform)\$(buildConfiguration)\AppInstallerCLIPackage.build.appxrecipe -LayoutPath $(packageLayoutDir) -Force -Verbose' + # workingDirectory: 'src' + # continueOnError: true + + #- task: PowerShell@2 + # displayName: Run Unit Tests Packaged + # inputs: + # filePath: 'src\AppInstallerCLITests\Run-TestsInPackage.ps1' + # arguments: '-Args "~[pips]" -BuildRoot $(buildOutDir) -PackageRoot $(packageLayoutDir) -LogTarget $(artifactsDir)\AICLI-Packaged.log -TestResultsTarget $(artifactsDir)\TEST-AppInstallerCLI-Packaged.xml -ScriptWait' + # workingDirectory: 'src' + # continueOnError: true + + #- task: PublishTestResults@2 + # displayName: Publish Unit Test Results + # inputs: + # testResultsFormat: 'JUnit' + # testResultsFiles: '$(artifactsDir)\TEST-*.xml' + # failTaskOnFailedTests: true + + #- task: DownloadSecureFile@1 + # name: AppInstallerTest + # displayName: 'Download Source Package Certificate' + # inputs: + # secureFile: 'AppInstallerTest.pfx' + + #- task: DownloadSecureFile@1 + # name: HTTPSDevCert + # displayName: 'Download Kestrel Certificate' + # inputs: + # secureFile: 'HTTPSDevCertV2.pfx' + + #- task: MSBuild@1 + # displayName: Build MSIX Test Installer File + # inputs: + # platform: '$(buildPlatform)' + # solution: 'src\AppInstallerTestMsixInstaller\AppInstallerTestMsixInstaller.wapproj' + # configuration: '$(buildConfiguration)' + # msbuildArguments: '/p:AppxPackageOutput="$(Build.ArtifactStagingDirectory)\AppInstallerTestMsixInstaller.msix" + # /p:AppxBundle=Never + # /p:UapAppxPackageBuildMode=SideLoadOnly + # /p:AppxPackageSigningEnabled=false' + + #- task: PowerShell@2 + # displayName: Install Root Certificate + # inputs: + # filePath: 'src\LocalhostWebServer\InstallDevCert.ps1' + # arguments: '-pfxpath $(HTTPSDevCert.secureFilePath) -password microsoft' + + #- task: PowerShell@2 + # displayName: Launch LocalhostWebServer + # inputs: + # filePath: 'src\LocalhostWebServer\Run-LocalhostWebServer.ps1' + # arguments: '-BuildRoot $(buildOutDir)\LocalhostWebServer -StaticFileRoot $(Agent.TempDirectory)\TestLocalIndex -CertPath $(HTTPSDevCert.secureFilePath) -CertPassword microsoft' + + #- task: PowerShell@2 + # displayName: 'Set program files directory' + # inputs: + # targetType: 'inline' + # script: | + # if ("$(buildPlatform)" -eq "x86") { + # Write-Host "##vso[task.setvariable variable=platformProgramFiles;]${env:ProgramFiles(x86)}" + # } else { + # Write-Host "##vso[task.setvariable variable=platformProgramFiles;]${env:ProgramFiles}" + # } + + ## Resolves resource strings utilized by InProc E2E tests. + #- task: CopyFiles@2 + # displayName: 'Copy resources.pri to dotnet directory' + # inputs: + # SourceFolder: '$(buildOutDir)\AppInstallerCLI' + # TargetFolder: '$(platformProgramFiles)\dotnet' + # Contents: resources.pri + + ## Winmd accessed by test runner process (dotnet.exe) + #- task: CopyFiles@2 + # displayName: 'Copy winmd to dotnet directory' + # inputs: + # SourceFolder: '$(buildOutDir)\Microsoft.Management.Deployment' + # TargetFolder: '$(platformProgramFiles)\dotnet' + # Contents: Microsoft.Management.Deployment.winmd + + #- template: templates/e2e-test.template.yml + # parameters: + # title: "E2E Tests Packaged" + # isPackaged: true + # filter: "TestCategory!=InProcess&TestCategory!=OutOfProcess" + + #- template: templates/e2e-test.template.yml + # parameters: + # title: "COM API E2E Tests (In-process)" + # isPackaged: false + # filter: "TestCategory=InProcess" + + #- template: templates/e2e-test.template.yml + # parameters: + # title: "COM API E2E Tests (Out-of-process)" + # isPackaged: true + # filter: "TestCategory=OutOfProcess" + + #- task: CopyFiles@2 + # displayName: 'Copy E2E Tests Package Log to artifacts folder' + # inputs: + # SourceFolder: '$(temp)\E2ETestLogs' + # TargetFolder: '$(artifactsDir)\E2ETestsPackagedLog' + # condition: succeededOrFailed() + + #- task: CopyFiles@2 + # displayName: 'Copy Files: WinGetUtilInterop.UnitTests' + # inputs: + # SourceFolder: '$(Build.SourcesDirectory)\src\WinGetUtilInterop.UnitTests\bin\$(BuildConfiguration)\netcoreapp3.1' + # TargetFolder: '$(Build.ArtifactStagingDirectory)\WinGetUtilInterop.UnitTests\' + # CleanTargetFolder: true + # OverWrite: true + + #- task: VSTest@2 + # displayName: 'Run tests: WinGetUtilInterop.UnitTests' + # inputs: + # testSelector: 'testAssemblies' + # testAssemblyVer2: 'WinGetUtilInterop.UnitTests.dll' + # searchFolder: '$(Build.ArtifactStagingDirectory)\WinGetUtilInterop.UnitTests' + # codeCoverageEnabled: true + # platform: 'Any CPU' + # configuration: '$(BuildConfiguration)' - - task: VSTest@2 - displayName: 'Run tests: Microsoft.Management.Configuration.UnitTests' - inputs: - testSelector: 'testAssemblies' - testAssemblyVer2: '**\Microsoft.Management.Configuration.UnitTests.dll' - searchFolder: '$(buildOutDir)\Microsoft.Management.Configuration.UnitTests' - codeCoverageEnabled: true - platform: '$(buildPlatform)' - configuration: '$(BuildConfiguration)' + #- task: VSTest@2 + # displayName: 'Run tests: Microsoft.Management.Configuration.UnitTests' + # inputs: + # testSelector: 'testAssemblies' + # testAssemblyVer2: '**\Microsoft.Management.Configuration.UnitTests.dll' + # searchFolder: '$(buildOutDir)\Microsoft.Management.Configuration.UnitTests' + # codeCoverageEnabled: true + # platform: '$(buildPlatform)' + # configuration: '$(BuildConfiguration)' - task: CopyFiles@2 displayName: 'Copy Util to artifacts folder' From ba9d74f100b4193256157f19f67f72455015c9af Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Wed, 24 May 2023 12:54:44 -0700 Subject: [PATCH 24/43] Supress warning in test project --- src/AppInstallerCLITests/pch.h | 8 ++++++++ src/AppInstallerCommonCore/Public/winget/ManifestCommon.h | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/AppInstallerCLITests/pch.h b/src/AppInstallerCLITests/pch.h index fd7148d245..8719dacb19 100644 --- a/src/AppInstallerCLITests/pch.h +++ b/src/AppInstallerCLITests/pch.h @@ -46,3 +46,11 @@ #include #include #include + +// The compiler complains about MarketsInfo::ExcludedMarkets being uninitialized, +// only in this project for some reason. +// Adding = {} didn't fix it, so disabling warning here. +#pragma warning( push ) +#pragma warning ( disable : 26495 ) +#include +#pragma warning( pop ) \ No newline at end of file diff --git a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h index 4f45978b5a..c29d76b383 100644 --- a/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h +++ b/src/AppInstallerCommonCore/Public/winget/ManifestCommon.h @@ -266,8 +266,8 @@ namespace AppInstaller::Manifest struct MarketsInfo { - std::vector AllowedMarkets = {}; - std::vector ExcludedMarkets = {}; + std::vector AllowedMarkets; + std::vector ExcludedMarkets; }; struct NestedInstallerFile From 9c7521bf7153a8e558e42716fafa6447697b82f6 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Wed, 24 May 2023 13:12:50 -0700 Subject: [PATCH 25/43] Fix test --- src/AppInstallerCLITests/InstallFlow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/AppInstallerCLITests/InstallFlow.cpp b/src/AppInstallerCLITests/InstallFlow.cpp index 18278a71b6..dd8ee3df92 100644 --- a/src/AppInstallerCLITests/InstallFlow.cpp +++ b/src/AppInstallerCLITests/InstallFlow.cpp @@ -721,6 +721,7 @@ TEST_CASE("ShellExecuteHandlerInstallerArgs", "[InstallFlow][workflow]") auto previousThreadGlobals = context.SetForCurrentThread(); Manifest manifest; std::vector expectedArgs; + std::vector forbiddenArgs; std::optional exactArgs; SECTION("MSI | No CLI args | No manifest switches") @@ -810,7 +811,7 @@ TEST_CASE("ShellExecuteHandlerInstallerArgs", "[InstallFlow][workflow]") context.Args.AddArg(Execution::Args::Type::Silent); context.Args.AddArg(Execution::Args::Type::CustomSwitches, "\t"sv); expectedArgs.emplace_back("/mysilent"); // Use declaration in manifest - expectedArgs.emplace_back("\t"); // Whitespace only Custom switches should not be appended + forbiddenArgs.emplace_back("\t"); // Whitespace only Custom switches should not be appended } SECTION("Inno | With CLI args | With manifest switches | With --override arg") { @@ -832,6 +833,11 @@ TEST_CASE("ShellExecuteHandlerInstallerArgs", "[InstallFlow][workflow]") REQUIRE(installerArgs.find(expectedArg) != std::string::npos); } + for (const auto& forbiddenArg : forbiddenArgs) + { + REQUIRE(installerArgs.find(forbiddenArg) == std::string::npos); + } + if (exactArgs) { REQUIRE(installerArgs == *exactArgs); From 46d6e0c644c798d31fd767e52d5caf4a24148ff3 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Wed, 24 May 2023 14:35:15 -0700 Subject: [PATCH 26/43] Show available space --- azure-pipelines.yml | 117 +++++++++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 50 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c7ff9f6b87..f159fea839 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -102,6 +102,11 @@ jobs: arguments: '-TargetFile binver\binver\version.h -BuildVersion $(BuildVer)' workingDirectory: 'src' + - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } + condition: always() + + - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } + # Build all solutions in the root directory. - task: VSBuild@1 displayName: Build Solution @@ -115,6 +120,9 @@ jobs: /p:AppxBundle=Always /p:UapAppxPackageBuildMode=SideloadOnly' + - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } + condition: always() + - task: VSBuild@1 displayName: Build Test Project inputs: @@ -300,41 +308,41 @@ jobs: # platform: '$(buildPlatform)' # configuration: '$(BuildConfiguration)' - - task: CopyFiles@2 - displayName: 'Copy Util to artifacts folder' - inputs: - Contents: | - $(buildOutDir)\WinGetUtil\WinGetUtil.dll - $(buildOutDir)\WinGetUtil\WinGetUtil.pdb - TargetFolder: '$(artifactsDir)' - condition: succeededOrFailed() + #- task: CopyFiles@2 + # displayName: 'Copy Util to artifacts folder' + # inputs: + # Contents: | + # $(buildOutDir)\WinGetUtil\WinGetUtil.dll + # $(buildOutDir)\WinGetUtil\WinGetUtil.pdb + # TargetFolder: '$(artifactsDir)' + # condition: succeededOrFailed() - - task: CopyFiles@2 - displayName: 'Copy PowerShell Module Files' - inputs: - SourceFolder: '$(buildOutDir)\PowerShell' - TargetFolder: '$(artifactsDir)\PowerShell' - condition: always() + #- task: CopyFiles@2 + # displayName: 'Copy PowerShell Module Files' + # inputs: + # SourceFolder: '$(buildOutDir)\PowerShell' + # TargetFolder: '$(artifactsDir)\PowerShell' + # condition: always() - - task: CopyFiles@2 - displayName: 'Copy Dev Package (Loose Files)' - inputs: - SourceFolder: '$(packageLayoutDir)' - TargetFolder: '$(artifactsDir)\DevPackage' - condition: always() + #- task: CopyFiles@2 + # displayName: 'Copy Dev Package (Loose Files)' + # inputs: + # SourceFolder: '$(packageLayoutDir)' + # TargetFolder: '$(artifactsDir)\DevPackage' + # condition: always() - - task: CopyFiles@2 - displayName: 'Copy Dev Packages' - inputs: - SourceFolder: '$(appxPackageDir)' - TargetFolder: '$(artifactsDir)\AppxPackages' - condition: always() + #- task: CopyFiles@2 + # displayName: 'Copy Dev Packages' + # inputs: + # SourceFolder: '$(appxPackageDir)' + # TargetFolder: '$(artifactsDir)\AppxPackages' + # condition: always() - - task: PublishPipelineArtifact@1 - displayName: Publish Pipeline Artifacts - inputs: - targetPath: '$(artifactsDir)' - condition: always() + #- task: PublishPipelineArtifact@1 + # displayName: Publish Pipeline Artifacts + # inputs: + # targetPath: '$(artifactsDir)' + # condition: always() - task: ComponentGovernanceComponentDetection@0 displayName: Component Governance @@ -348,6 +356,9 @@ jobs: - task: CredScan@3 condition: always() # TODO: remove + - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } + condition: always() + - task: BinSkim@4 inputs: InputType: 'Basic' @@ -356,6 +367,9 @@ jobs: AnalyzeTargetGlob: 'f|$(buildOutDir)/**.dll;f|$(buildOutDir)/**.exe;f|$(Build.SourcesDirectory)\src\WinGetUtilInterop\bin\*.dll' condition: always() # TODO: remove + - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } + condition: always() + - task: PublishSecurityAnalysisLogs@3 inputs: ArtifactName: 'CodeAnalysisLogs' @@ -364,33 +378,36 @@ jobs: ToolLogsNotFoundAction: 'Standard' condition: succeededOrFailed() + - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } + condition: always() + - job: 'BuildPowerShellModule' timeoutInMinutes: 120 dependsOn: 'Build' condition: always() - steps: - - task: DownloadPipelineArtifact@2 - displayName: 'Download Build Artifacts' + #steps: + #- task: DownloadPipelineArtifact@2 + # displayName: 'Download Build Artifacts' - - task: CopyFiles@2 - displayName: 'Copy x64 PowerShell Binaries to Output' - inputs: - SourceFolder: '$(Pipeline.Workspace)\Build.x64release\PowerShell' - Contents: '**\*' - TargetFolder: '$(Build.ArtifactStagingDirectory)' + #- task: CopyFiles@2 + # displayName: 'Copy x64 PowerShell Binaries to Output' + # inputs: + # SourceFolder: '$(Pipeline.Workspace)\Build.x64release\PowerShell' + # Contents: '**\*' + # TargetFolder: '$(Build.ArtifactStagingDirectory)' - - task: CopyFiles@2 - displayName: 'Copy x86 PowerShell Binaries to Output' - inputs: - SourceFolder: '$(Pipeline.Workspace)\Build.x86release\PowerShell' - Contents: '**\*' - TargetFolder: '$(Build.ArtifactStagingDirectory)' + #- task: CopyFiles@2 + # displayName: 'Copy x86 PowerShell Binaries to Output' + # inputs: + # SourceFolder: '$(Pipeline.Workspace)\Build.x86release\PowerShell' + # Contents: '**\*' + # TargetFolder: '$(Build.ArtifactStagingDirectory)' - - task: PublishPipelineArtifact@1 - displayName: Publish PowerShell Module Artifacts - inputs: - targetPath: '$(Build.ArtifactStagingDirectory)' + #- task: PublishPipelineArtifact@1 + # displayName: Publish PowerShell Module Artifacts + # inputs: + # targetPath: '$(Build.ArtifactStagingDirectory)' # TODO: Remove; only to test in non-default branch - task: CodeQL3000Finalize@0 From a24eb74f036b504e736f01aec94e2d0a8d68fc64 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Wed, 24 May 2023 14:36:49 -0700 Subject: [PATCH 27/43] Fix codeql call --- azure-pipelines.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f159fea839..54ac999cba 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -381,10 +381,13 @@ jobs: - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } condition: always() -- job: 'BuildPowerShellModule' - timeoutInMinutes: 120 - dependsOn: 'Build' - condition: always() + # TODO: Remove; only to test in non-default branch + - task: CodeQL3000Finalize@0 + condition: always() +#- job: 'BuildPowerShellModule' + #timeoutInMinutes: 120 + #dependsOn: 'Build' + #condition: always() #steps: #- task: DownloadPipelineArtifact@2 @@ -408,7 +411,3 @@ jobs: # displayName: Publish PowerShell Module Artifacts # inputs: # targetPath: '$(Build.ArtifactStagingDirectory)' - - # TODO: Remove; only to test in non-default branch - - task: CodeQL3000Finalize@0 - condition: always() \ No newline at end of file From 9b5d9ccbe38c591eb8b6bcb9cc24573d696015c4 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Wed, 24 May 2023 16:46:09 -0700 Subject: [PATCH 28/43] Try disabling binskim required flags --- src/Directory.Build.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index e9e535f429..f1aa50a32a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -66,7 +66,7 @@ false false - Spectre + true @@ -106,11 +106,11 @@ true stdcpp17 - true + - true + - true + Console @@ -132,7 +132,7 @@ NDEBUG;%(PreprocessorDefinitions) MultiThreaded - Guard + true From b916228a26be1734432b2abee1ef8be20c866f8b Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Wed, 24 May 2023 22:30:51 -0700 Subject: [PATCH 29/43] Reeenable conformance mode --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f1aa50a32a..3968ff929a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -108,7 +108,7 @@ - + true @@ -116,7 +116,7 @@ Console false - true + From 48e87b65e62658a229177e232eba552a9204ac85 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 11:40:12 -0700 Subject: [PATCH 30/43] Continue on error --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 54ac999cba..f9b80a0f28 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -365,6 +365,7 @@ jobs: Function: 'analyze' TargetPattern: 'guardianGlob' AnalyzeTargetGlob: 'f|$(buildOutDir)/**.dll;f|$(buildOutDir)/**.exe;f|$(Build.SourcesDirectory)\src\WinGetUtilInterop\bin\*.dll' + continueOnError: true condition: always() # TODO: remove - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } From 8ccc8fe359c4bd3165eb568123279ffcdce20ae5 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 11:41:08 -0700 Subject: [PATCH 31/43] Only PREFast --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 3968ff929a..c212410be8 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -106,7 +106,7 @@ true stdcpp17 - + true true From 3e1e38fcc01e0e50be06ab1a99c66f82c6f52daa Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 11:41:26 -0700 Subject: [PATCH 32/43] Only SDL check --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index c212410be8..085132b38e 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -106,11 +106,11 @@ true stdcpp17 - true + !-- true --> true - + true Console From 1934f6851165136ab7840e9bd8bf3fef7985fd6f Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 11:41:46 -0700 Subject: [PATCH 33/43] Only CETCompat --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 085132b38e..55b5bd3c91 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -110,13 +110,13 @@ true - true + Console false - + true From d6fb024500a78369ca4440013132bb3c12317049 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 11:42:06 -0700 Subject: [PATCH 34/43] Only ControlFlow guard --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 55b5bd3c91..4292ba1450 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -116,7 +116,7 @@ Console false - true + @@ -132,7 +132,7 @@ NDEBUG;%(PreprocessorDefinitions) MultiThreaded - + Guard true From 5ac0fd8198f8855a5a52d079e55b48e6f52ad76f Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 11:47:29 -0700 Subject: [PATCH 35/43] CodeQL --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f9b80a0f28..ef52bf97a5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,6 +21,8 @@ variables: appxPackageDir: '$(Build.ArtifactStagingDirectory)/AppxPackages/' # Enable CodeQL/Semmle static analysis for default branch Codeql.Enabled: true + # TODO: Remove. Only for testing, we should use standard cadence of 72h + CodeQL.Cadence: 0 # Do not set the build version for a PR build. From 62870ba75ef09d716fb2d341119cca9b1d62e757 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 12:40:29 -0700 Subject: [PATCH 36/43] only ControlFlowGuard --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 4292ba1450..d5dd591681 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -106,7 +106,7 @@ true stdcpp17 - !-- true --> + true From 10dd98a0f3ac5a4a00191fb6133a79ab99756596 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 12:40:52 -0700 Subject: [PATCH 37/43] only CETCompat --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index d5dd591681..1f78151e9e 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -116,7 +116,7 @@ Console false - + true @@ -132,7 +132,7 @@ NDEBUG;%(PreprocessorDefinitions) MultiThreaded - Guard + true From e3321cfc8ea1b8ad7865b2703fb539afa47b3fe0 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 12:41:18 -0700 Subject: [PATCH 38/43] Only SDLCheck --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 1f78151e9e..00dc06349a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -110,13 +110,13 @@ true - + true Console false - true + From 59fade2bdf1674a81e1da288bbb313af66f66791 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 12:41:42 -0700 Subject: [PATCH 39/43] Only spectre --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 00dc06349a..33c6270706 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -66,7 +66,7 @@ false false - + Spectre true @@ -110,7 +110,7 @@ true - true + Console From 090d12afc60225e1a772ae5d00b15279bf9b2d45 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 12:51:56 -0700 Subject: [PATCH 40/43] Enable all binskim configs --- src/Directory.Build.props | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 33c6270706..df2117ca82 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,7 +3,9 @@ + Some properties may need to be overridden in specific projects. + + BinSkim requires us to use SpectreMitigation, SDLCheck, CETCompat, ControlFlowGuard. --> true @@ -15,16 +17,24 @@ - + false + + Spectre + TurnOffAllWarnings false + true + Guard + + true + @@ -65,7 +75,6 @@ true false false - Spectre @@ -105,18 +114,14 @@ %(AdditionalOptions) /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING true stdcpp17 - - - + true + true - - Console false - - + true @@ -131,8 +136,7 @@ true NDEBUG;%(PreprocessorDefinitions) MultiThreaded - - + Guard true @@ -142,6 +146,8 @@ + + true Disabled _DEBUG;%(PreprocessorDefinitions) false From 761de73575bfa3076921f70510419e1a4ac22e66 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 14:06:21 -0700 Subject: [PATCH 41/43] Disable binskim config --- src/Directory.Build.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index df2117ca82..eda866ba69 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -114,14 +114,14 @@ %(AdditionalOptions) /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING true stdcpp17 - true + true Console false - true + @@ -136,7 +136,7 @@ true NDEBUG;%(PreprocessorDefinitions) MultiThreaded - Guard + true From e3c96cd77e161fa6cc3e69734cb5095abd3e0a88 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 14:11:05 -0700 Subject: [PATCH 42/43] Clean up pipeline --- azure-pipelines.yml | 482 +++++++++++++++++++------------------- src/Directory.Build.props | 12 +- 2 files changed, 248 insertions(+), 246 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ef52bf97a5..e0a1ebf247 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -104,9 +104,7 @@ jobs: arguments: '-TargetFile binver\binver\version.h -BuildVersion $(BuildVer)' workingDirectory: 'src' - - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } - condition: always() - + # TODO: remove - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } # Build all solutions in the root directory. @@ -136,216 +134,8 @@ jobs: /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=SideloadOnly' - enabled: false - - - task: CopyFiles@2 - displayName: 'Copy WindowsPackageManager.dll Symbols to artifacts folder' - inputs: - Contents: '$(buildOutDir)\WindowsPackageManager\WindowsPackageManager.pdb' - TargetFolder: '$(artifactsDir)' - condition: succeededOrFailed() - - #- task: PowerShell@2 - # displayName: Install Tests Dependencies - # inputs: - # targetType: 'inline' - # script: | - # Add-AppxPackage AppInstallerCLIPackage_0.0.2.0_Test\Dependencies\$(buildPlatform)\Microsoft.VCLibs.$(buildPlatform).14.00.Desktop.appx - # workingDirectory: $(appxPackageDir) - - #- task: VisualStudioTestPlatformInstaller@1 - # displayName: Prepare VSTest for E2E Tests - # inputs: - # packageFeedSelector: 'nugetOrg' - - #- task: DownloadSecureFile@1 - # name: PsExec - # displayName: 'Download PsExec.exe' - # inputs: - # secureFile: 'PsExec.exe' - - #- task: CmdLine@2 - # displayName: Run Unit Tests Unpackaged Under System Context - # inputs: - # script: | - # $(PsExec.secureFilePath) -accepteula -s -i $(buildOutDir)\AppInstallerCLITests\AppInstallerCLITests.exe -logto $(artifactsDir)\AICLI-Unpackaged-System.log -s -r junit -o $(artifactsDir)\TEST-AppInstallerCLI-Unpackaged-System.xml - # workingDirectory: '$(buildOutDir)\AppInstallerCLITests' - # continueOnError: true - - #- task: PowerShell@2 - # displayName: Create Package Layout - # inputs: - # filePath: 'src\AppInstallerCLIPackage\Execute-AppxRecipe.ps1' - # arguments: '-AppxRecipePath AppInstallerCLIPackage\bin\$(buildPlatform)\$(buildConfiguration)\AppInstallerCLIPackage.build.appxrecipe -LayoutPath $(packageLayoutDir) -Force -Verbose' - # workingDirectory: 'src' - # continueOnError: true - - #- task: PowerShell@2 - # displayName: Run Unit Tests Packaged - # inputs: - # filePath: 'src\AppInstallerCLITests\Run-TestsInPackage.ps1' - # arguments: '-Args "~[pips]" -BuildRoot $(buildOutDir) -PackageRoot $(packageLayoutDir) -LogTarget $(artifactsDir)\AICLI-Packaged.log -TestResultsTarget $(artifactsDir)\TEST-AppInstallerCLI-Packaged.xml -ScriptWait' - # workingDirectory: 'src' - # continueOnError: true - - #- task: PublishTestResults@2 - # displayName: Publish Unit Test Results - # inputs: - # testResultsFormat: 'JUnit' - # testResultsFiles: '$(artifactsDir)\TEST-*.xml' - # failTaskOnFailedTests: true - - #- task: DownloadSecureFile@1 - # name: AppInstallerTest - # displayName: 'Download Source Package Certificate' - # inputs: - # secureFile: 'AppInstallerTest.pfx' - - #- task: DownloadSecureFile@1 - # name: HTTPSDevCert - # displayName: 'Download Kestrel Certificate' - # inputs: - # secureFile: 'HTTPSDevCertV2.pfx' - - #- task: MSBuild@1 - # displayName: Build MSIX Test Installer File - # inputs: - # platform: '$(buildPlatform)' - # solution: 'src\AppInstallerTestMsixInstaller\AppInstallerTestMsixInstaller.wapproj' - # configuration: '$(buildConfiguration)' - # msbuildArguments: '/p:AppxPackageOutput="$(Build.ArtifactStagingDirectory)\AppInstallerTestMsixInstaller.msix" - # /p:AppxBundle=Never - # /p:UapAppxPackageBuildMode=SideLoadOnly - # /p:AppxPackageSigningEnabled=false' - - #- task: PowerShell@2 - # displayName: Install Root Certificate - # inputs: - # filePath: 'src\LocalhostWebServer\InstallDevCert.ps1' - # arguments: '-pfxpath $(HTTPSDevCert.secureFilePath) -password microsoft' - - #- task: PowerShell@2 - # displayName: Launch LocalhostWebServer - # inputs: - # filePath: 'src\LocalhostWebServer\Run-LocalhostWebServer.ps1' - # arguments: '-BuildRoot $(buildOutDir)\LocalhostWebServer -StaticFileRoot $(Agent.TempDirectory)\TestLocalIndex -CertPath $(HTTPSDevCert.secureFilePath) -CertPassword microsoft' - - #- task: PowerShell@2 - # displayName: 'Set program files directory' - # inputs: - # targetType: 'inline' - # script: | - # if ("$(buildPlatform)" -eq "x86") { - # Write-Host "##vso[task.setvariable variable=platformProgramFiles;]${env:ProgramFiles(x86)}" - # } else { - # Write-Host "##vso[task.setvariable variable=platformProgramFiles;]${env:ProgramFiles}" - # } - - ## Resolves resource strings utilized by InProc E2E tests. - #- task: CopyFiles@2 - # displayName: 'Copy resources.pri to dotnet directory' - # inputs: - # SourceFolder: '$(buildOutDir)\AppInstallerCLI' - # TargetFolder: '$(platformProgramFiles)\dotnet' - # Contents: resources.pri - - ## Winmd accessed by test runner process (dotnet.exe) - #- task: CopyFiles@2 - # displayName: 'Copy winmd to dotnet directory' - # inputs: - # SourceFolder: '$(buildOutDir)\Microsoft.Management.Deployment' - # TargetFolder: '$(platformProgramFiles)\dotnet' - # Contents: Microsoft.Management.Deployment.winmd - - #- template: templates/e2e-test.template.yml - # parameters: - # title: "E2E Tests Packaged" - # isPackaged: true - # filter: "TestCategory!=InProcess&TestCategory!=OutOfProcess" - - #- template: templates/e2e-test.template.yml - # parameters: - # title: "COM API E2E Tests (In-process)" - # isPackaged: false - # filter: "TestCategory=InProcess" - - #- template: templates/e2e-test.template.yml - # parameters: - # title: "COM API E2E Tests (Out-of-process)" - # isPackaged: true - # filter: "TestCategory=OutOfProcess" - - #- task: CopyFiles@2 - # displayName: 'Copy E2E Tests Package Log to artifacts folder' - # inputs: - # SourceFolder: '$(temp)\E2ETestLogs' - # TargetFolder: '$(artifactsDir)\E2ETestsPackagedLog' - # condition: succeededOrFailed() - - #- task: CopyFiles@2 - # displayName: 'Copy Files: WinGetUtilInterop.UnitTests' - # inputs: - # SourceFolder: '$(Build.SourcesDirectory)\src\WinGetUtilInterop.UnitTests\bin\$(BuildConfiguration)\netcoreapp3.1' - # TargetFolder: '$(Build.ArtifactStagingDirectory)\WinGetUtilInterop.UnitTests\' - # CleanTargetFolder: true - # OverWrite: true - - #- task: VSTest@2 - # displayName: 'Run tests: WinGetUtilInterop.UnitTests' - # inputs: - # testSelector: 'testAssemblies' - # testAssemblyVer2: 'WinGetUtilInterop.UnitTests.dll' - # searchFolder: '$(Build.ArtifactStagingDirectory)\WinGetUtilInterop.UnitTests' - # codeCoverageEnabled: true - # platform: 'Any CPU' - # configuration: '$(BuildConfiguration)' - - #- task: VSTest@2 - # displayName: 'Run tests: Microsoft.Management.Configuration.UnitTests' - # inputs: - # testSelector: 'testAssemblies' - # testAssemblyVer2: '**\Microsoft.Management.Configuration.UnitTests.dll' - # searchFolder: '$(buildOutDir)\Microsoft.Management.Configuration.UnitTests' - # codeCoverageEnabled: true - # platform: '$(buildPlatform)' - # configuration: '$(BuildConfiguration)' - - #- task: CopyFiles@2 - # displayName: 'Copy Util to artifacts folder' - # inputs: - # Contents: | - # $(buildOutDir)\WinGetUtil\WinGetUtil.dll - # $(buildOutDir)\WinGetUtil\WinGetUtil.pdb - # TargetFolder: '$(artifactsDir)' - # condition: succeededOrFailed() - - #- task: CopyFiles@2 - # displayName: 'Copy PowerShell Module Files' - # inputs: - # SourceFolder: '$(buildOutDir)\PowerShell' - # TargetFolder: '$(artifactsDir)\PowerShell' - # condition: always() - - #- task: CopyFiles@2 - # displayName: 'Copy Dev Package (Loose Files)' - # inputs: - # SourceFolder: '$(packageLayoutDir)' - # TargetFolder: '$(artifactsDir)\DevPackage' - # condition: always() - - #- task: CopyFiles@2 - # displayName: 'Copy Dev Packages' - # inputs: - # SourceFolder: '$(appxPackageDir)' - # TargetFolder: '$(artifactsDir)\AppxPackages' - # condition: always() - - #- task: PublishPipelineArtifact@1 - # displayName: Publish Pipeline Artifacts - # inputs: - # targetPath: '$(artifactsDir)' - # condition: always() + # Run static analysis and compliance checks for all the binaries - task: ComponentGovernanceComponentDetection@0 displayName: Component Governance inputs: @@ -354,10 +144,9 @@ jobs: alertWarningLevel: 'High' failOnAlert: true - # Run static analysis for all the binaries - task: CredScan@3 - condition: always() # TODO: remove + # TODO: remove - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } condition: always() @@ -367,9 +156,9 @@ jobs: Function: 'analyze' TargetPattern: 'guardianGlob' AnalyzeTargetGlob: 'f|$(buildOutDir)/**.dll;f|$(buildOutDir)/**.exe;f|$(Build.SourcesDirectory)\src\WinGetUtilInterop\bin\*.dll' - continueOnError: true - condition: always() # TODO: remove + continueOnError: true # TODO: remove once we pass these checks + # TODO: remove - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } condition: always() @@ -381,36 +170,243 @@ jobs: ToolLogsNotFoundAction: 'Standard' condition: succeededOrFailed() - - powershell: Get-Volume; @('.', '$(Build.ArtifactStagingDirectory)') | %{ $mb = (Get-ChildItem $_ -Recurse | Measure-Object -Sum Length).Sum / (1024 * 1024); Write-Host "$_ :`t$mb MBs" } + - task: CopyFiles@2 + displayName: 'Copy WindowsPackageManager.dll Symbols to artifacts folder' + inputs: + Contents: '$(buildOutDir)\WindowsPackageManager\WindowsPackageManager.pdb' + TargetFolder: '$(artifactsDir)' + condition: succeededOrFailed() + + - task: PowerShell@2 + displayName: Install Tests Dependencies + inputs: + targetType: 'inline' + script: | + Add-AppxPackage AppInstallerCLIPackage_0.0.2.0_Test\Dependencies\$(buildPlatform)\Microsoft.VCLibs.$(buildPlatform).14.00.Desktop.appx + workingDirectory: $(appxPackageDir) + + - task: VisualStudioTestPlatformInstaller@1 + displayName: Prepare VSTest for E2E Tests + inputs: + packageFeedSelector: 'nugetOrg' + + - task: DownloadSecureFile@1 + name: PsExec + displayName: 'Download PsExec.exe' + inputs: + secureFile: 'PsExec.exe' + + - task: CmdLine@2 + displayName: Run Unit Tests Unpackaged Under System Context + inputs: + script: | + $(PsExec.secureFilePath) -accepteula -s -i $(buildOutDir)\AppInstallerCLITests\AppInstallerCLITests.exe -logto $(artifactsDir)\AICLI-Unpackaged-System.log -s -r junit -o $(artifactsDir)\TEST-AppInstallerCLI-Unpackaged-System.xml + workingDirectory: '$(buildOutDir)\AppInstallerCLITests' + continueOnError: true + + - task: PowerShell@2 + displayName: Create Package Layout + inputs: + filePath: 'src\AppInstallerCLIPackage\Execute-AppxRecipe.ps1' + arguments: '-AppxRecipePath AppInstallerCLIPackage\bin\$(buildPlatform)\$(buildConfiguration)\AppInstallerCLIPackage.build.appxrecipe -LayoutPath $(packageLayoutDir) -Force -Verbose' + workingDirectory: 'src' + continueOnError: true + + - task: PowerShell@2 + displayName: Run Unit Tests Packaged + inputs: + filePath: 'src\AppInstallerCLITests\Run-TestsInPackage.ps1' + arguments: '-Args "~[pips]" -BuildRoot $(buildOutDir) -PackageRoot $(packageLayoutDir) -LogTarget $(artifactsDir)\AICLI-Packaged.log -TestResultsTarget $(artifactsDir)\TEST-AppInstallerCLI-Packaged.xml -ScriptWait' + workingDirectory: 'src' + continueOnError: true + + - task: PublishTestResults@2 + displayName: Publish Unit Test Results + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: '$(artifactsDir)\TEST-*.xml' + failTaskOnFailedTests: true + + - task: DownloadSecureFile@1 + name: AppInstallerTest + displayName: 'Download Source Package Certificate' + inputs: + secureFile: 'AppInstallerTest.pfx' + + - task: DownloadSecureFile@1 + name: HTTPSDevCert + displayName: 'Download Kestrel Certificate' + inputs: + secureFile: 'HTTPSDevCertV2.pfx' + + - task: MSBuild@1 + displayName: Build MSIX Test Installer File + inputs: + platform: '$(buildPlatform)' + solution: 'src\AppInstallerTestMsixInstaller\AppInstallerTestMsixInstaller.wapproj' + configuration: '$(buildConfiguration)' + msbuildArguments: '/p:AppxPackageOutput="$(Build.ArtifactStagingDirectory)\AppInstallerTestMsixInstaller.msix" + /p:AppxBundle=Never + /p:UapAppxPackageBuildMode=SideLoadOnly + /p:AppxPackageSigningEnabled=false' + + - task: PowerShell@2 + displayName: Install Root Certificate + inputs: + filePath: 'src\LocalhostWebServer\InstallDevCert.ps1' + arguments: '-pfxpath $(HTTPSDevCert.secureFilePath) -password microsoft' + + - task: PowerShell@2 + displayName: Launch LocalhostWebServer + inputs: + filePath: 'src\LocalhostWebServer\Run-LocalhostWebServer.ps1' + arguments: '-BuildRoot $(buildOutDir)\LocalhostWebServer -StaticFileRoot $(Agent.TempDirectory)\TestLocalIndex -CertPath $(HTTPSDevCert.secureFilePath) -CertPassword microsoft' + + - task: PowerShell@2 + displayName: 'Set program files directory' + inputs: + targetType: 'inline' + script: | + if ("$(buildPlatform)" -eq "x86") { + Write-Host "##vso[task.setvariable variable=platformProgramFiles;]${env:ProgramFiles(x86)}" + } else { + Write-Host "##vso[task.setvariable variable=platformProgramFiles;]${env:ProgramFiles}" + } + + # Resolves resource strings utilized by InProc E2E tests. + - task: CopyFiles@2 + displayName: 'Copy resources.pri to dotnet directory' + inputs: + SourceFolder: '$(buildOutDir)\AppInstallerCLI' + TargetFolder: '$(platformProgramFiles)\dotnet' + Contents: resources.pri + + # Winmd accessed by test runner process (dotnet.exe) + - task: CopyFiles@2 + displayName: 'Copy winmd to dotnet directory' + inputs: + SourceFolder: '$(buildOutDir)\Microsoft.Management.Deployment' + TargetFolder: '$(platformProgramFiles)\dotnet' + Contents: Microsoft.Management.Deployment.winmd + + - template: templates/e2e-test.template.yml + parameters: + title: "E2E Tests Packaged" + isPackaged: true + filter: "TestCategory!=InProcess&TestCategory!=OutOfProcess" + + - template: templates/e2e-test.template.yml + parameters: + title: "COM API E2E Tests (In-process)" + isPackaged: false + filter: "TestCategory=InProcess" + + - template: templates/e2e-test.template.yml + parameters: + title: "COM API E2E Tests (Out-of-process)" + isPackaged: true + filter: "TestCategory=OutOfProcess" + + - task: CopyFiles@2 + displayName: 'Copy E2E Tests Package Log to artifacts folder' + inputs: + SourceFolder: '$(temp)\E2ETestLogs' + TargetFolder: '$(artifactsDir)\E2ETestsPackagedLog' + condition: succeededOrFailed() + + - task: CopyFiles@2 + displayName: 'Copy Files: WinGetUtilInterop.UnitTests' + inputs: + SourceFolder: '$(Build.SourcesDirectory)\src\WinGetUtilInterop.UnitTests\bin\$(BuildConfiguration)\netcoreapp3.1' + TargetFolder: '$(Build.ArtifactStagingDirectory)\WinGetUtilInterop.UnitTests\' + CleanTargetFolder: true + OverWrite: true + + - task: VSTest@2 + displayName: 'Run tests: WinGetUtilInterop.UnitTests' + inputs: + testSelector: 'testAssemblies' + testAssemblyVer2: 'WinGetUtilInterop.UnitTests.dll' + searchFolder: '$(Build.ArtifactStagingDirectory)\WinGetUtilInterop.UnitTests' + codeCoverageEnabled: true + platform: 'Any CPU' + configuration: '$(BuildConfiguration)' + + - task: VSTest@2 + displayName: 'Run tests: Microsoft.Management.Configuration.UnitTests' + inputs: + testSelector: 'testAssemblies' + testAssemblyVer2: '**\Microsoft.Management.Configuration.UnitTests.dll' + searchFolder: '$(buildOutDir)\Microsoft.Management.Configuration.UnitTests' + codeCoverageEnabled: true + platform: '$(buildPlatform)' + configuration: '$(BuildConfiguration)' + + - task: CopyFiles@2 + displayName: 'Copy Util to artifacts folder' + inputs: + Contents: | + $(buildOutDir)\WinGetUtil\WinGetUtil.dll + $(buildOutDir)\WinGetUtil\WinGetUtil.pdb + TargetFolder: '$(artifactsDir)' + condition: succeededOrFailed() + + - task: CopyFiles@2 + displayName: 'Copy PowerShell Module Files' + inputs: + SourceFolder: '$(buildOutDir)\PowerShell' + TargetFolder: '$(artifactsDir)\PowerShell' + condition: always() + + - task: CopyFiles@2 + displayName: 'Copy Dev Package (Loose Files)' + inputs: + SourceFolder: '$(packageLayoutDir)' + TargetFolder: '$(artifactsDir)\DevPackage' + condition: always() + + - task: CopyFiles@2 + displayName: 'Copy Dev Packages' + inputs: + SourceFolder: '$(appxPackageDir)' + TargetFolder: '$(artifactsDir)\AppxPackages' + condition: always() + + - task: PublishPipelineArtifact@1 + displayName: Publish Pipeline Artifacts + inputs: + targetPath: '$(artifactsDir)' condition: always() + # TODO: Remove; only to test in non-default branch - task: CodeQL3000Finalize@0 condition: always() -#- job: 'BuildPowerShellModule' - #timeoutInMinutes: 120 - #dependsOn: 'Build' - #condition: always() - - #steps: - #- task: DownloadPipelineArtifact@2 - # displayName: 'Download Build Artifacts' + +- job: 'BuildPowerShellModule' + timeoutInMinutes: 120 + dependsOn: 'Build' + condition: always() + + steps: + - task: DownloadPipelineArtifact@2 + displayName: 'Download Build Artifacts' - #- task: CopyFiles@2 - # displayName: 'Copy x64 PowerShell Binaries to Output' - # inputs: - # SourceFolder: '$(Pipeline.Workspace)\Build.x64release\PowerShell' - # Contents: '**\*' - # TargetFolder: '$(Build.ArtifactStagingDirectory)' - - #- task: CopyFiles@2 - # displayName: 'Copy x86 PowerShell Binaries to Output' - # inputs: - # SourceFolder: '$(Pipeline.Workspace)\Build.x86release\PowerShell' - # Contents: '**\*' - # TargetFolder: '$(Build.ArtifactStagingDirectory)' - - #- task: PublishPipelineArtifact@1 - # displayName: Publish PowerShell Module Artifacts - # inputs: - # targetPath: '$(Build.ArtifactStagingDirectory)' + - task: CopyFiles@2 + displayName: 'Copy x64 PowerShell Binaries to Output' + inputs: + SourceFolder: '$(Pipeline.Workspace)\Build.x64release\PowerShell' + Contents: '**\*' + TargetFolder: '$(Build.ArtifactStagingDirectory)' + + - task: CopyFiles@2 + displayName: 'Copy x86 PowerShell Binaries to Output' + inputs: + SourceFolder: '$(Pipeline.Workspace)\Build.x86release\PowerShell' + Contents: '**\*' + TargetFolder: '$(Build.ArtifactStagingDirectory)' + + - task: PublishPipelineArtifact@1 + displayName: Publish PowerShell Module Artifacts + inputs: + targetPath: '$(Build.ArtifactStagingDirectory)' diff --git a/src/Directory.Build.props b/src/Directory.Build.props index eda866ba69..6169f9a7c8 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,13 +22,18 @@ false + + + TurnOffAllWarnings + false + + + @@ -75,7 +81,7 @@ true false false - Spectre + true From bd25948b981e1eb97113ad5168c1155f28f282b6 Mon Sep 17 00:00:00 2001 From: Flor Elisa Chacon Ochoa Date: Thu, 25 May 2023 16:00:32 -0700 Subject: [PATCH 43/43] Clean up directory.build.props --- src/Directory.Build.props | 44 ++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 6169f9a7c8..100f55967c 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -28,11 +28,10 @@ false - @@ -81,7 +79,6 @@ true false false - true @@ -105,29 +102,44 @@ $(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\ + + + Spectre + + + + true + Guard + + + true + + + + stdcpp17 + + %(AdditionalOptions) /bigobj + Use pch.h $(IntDir)pch.pch + + Level4 + true + + true AICLI_DISABLE_TEST_HOOKS;%(PreprocessorDefinitions) WINGET_DISABLE_EXPERIMENTAL_FEATURES;%(PreprocessorDefinitions) WINGET_ENABLE_RELEASE_BUILD;%(PreprocessorDefinitions) USE_PROD_CLSIDS;%(PreprocessorDefinitions) USE_PROD_WINGET_SERVER;%(PreprocessorDefinitions) - Level4 - %(AdditionalOptions) /bigobj /D _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING - true - stdcpp17 - - - true Console false - @@ -142,7 +154,6 @@ true NDEBUG;%(PreprocessorDefinitions) MultiThreaded - true @@ -152,11 +163,10 @@ - - true Disabled _DEBUG;%(PreprocessorDefinitions) - false + + true