commit cf980e68307307363fe9cc344931e20eb5e5ef18 parent a6d02acc09139d937ac99a7082b38c7934d83242 Author: Ruben Guerrero <rubengu@microsoft.com> Date: Thu, 2 Mar 2023 11:02:48 -0800 Microsoft.Management.Configuration Windows target platform (#3032) Move Microsoft.Management.Configuration projects to target 10.0.19041.0. Fix UTs Microsoft.Management.Configuration flaky tests. Diffstat:
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/Microsoft.Management.Configuration.Processor/Microsoft.Management.Configuration.Processor.csproj b/src/Microsoft.Management.Configuration.Processor/Microsoft.Management.Configuration.Processor.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0-windows10.0.22000.0</TargetFramework> + <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework> <Nullable>enable</Nullable> <SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion> <Platforms>x64;x86;arm64</Platforms> @@ -19,7 +19,7 @@ <PropertyGroup> <CsWinRTComponent>true</CsWinRTComponent> - <CsWinRTWindowsMetadata>10.0.22000.0</CsWinRTWindowsMetadata> + <CsWinRTWindowsMetadata>10.0.19041.0</CsWinRTWindowsMetadata> </PropertyGroup> <ItemGroup> diff --git a/src/Microsoft.Management.Configuration.Projection/Microsoft.Management.Configuration.Projection.csproj b/src/Microsoft.Management.Configuration.Projection/Microsoft.Management.Configuration.Projection.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0-windows10.0.22000.0</TargetFramework> + <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework> <Platforms>x64;x86;arm64</Platforms> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> @@ -11,7 +11,7 @@ <PropertyGroup> <CsWinRTIncludes>Microsoft.Management.Configuration</CsWinRTIncludes> <CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir> - <CsWinRTWindowsMetadata>10.0.22000.0</CsWinRTWindowsMetadata> + <CsWinRTWindowsMetadata>10.0.19041.0</CsWinRTWindowsMetadata> <!-- Ensure Support for Windows 10, Version 1809 --> <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion> </PropertyGroup> diff --git a/src/Microsoft.Management.Configuration.UnitTests/Helpers/TempFile.cs b/src/Microsoft.Management.Configuration.UnitTests/Helpers/TempFile.cs @@ -81,7 +81,7 @@ namespace Microsoft.Management.Configuration.UnitTests.Helpers { if (content is null) { - File.Create(this.FullFileName); + using var fs = File.Create(this.FullFileName); } else { diff --git a/src/Microsoft.Management.Configuration.UnitTests/Tests/ConfigurationDetailsTests.cs b/src/Microsoft.Management.Configuration.UnitTests/Tests/ConfigurationDetailsTests.cs @@ -185,8 +185,8 @@ namespace Microsoft.Management.Configuration.UnitTests.Tests private (DscResourceInfoInternal dscResourceInfo, PSModuleInfo psModuleInfo) GetResourceAndModuleInfo(ConfigurationUnit unit) { // This is easier than trying to mock sealed class from external code... - var testEnv = this.fixture.PrepareTestProcessorEnvironment(); - testEnv.ValidateRunspace(); + var testEnv = this.fixture.PrepareTestProcessorEnvironment(true); + var dscResourceInfo = testEnv.GetDscResource(new ConfigurationUnitInternal(unit, null)); var psModuleInfo = testEnv.GetAvailableModule(PowerShellHelpers.CreateModuleSpecification("xSimpleTestResource", "0.0.0.1")); diff --git a/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj b/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj @@ -12,7 +12,7 @@ <DefaultLanguage>en-US</DefaultLanguage> <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> <ApplicationTypeRevision>10.0</ApplicationTypeRevision> - <WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion> + <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion> <WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport> <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>