Skip to content

Commit

Permalink
Microsoft.Management.Configuration Windows target platform (#3032)
Browse files Browse the repository at this point in the history
Move Microsoft.Management.Configuration projects to target 10.0.19041.0.
Fix UTs Microsoft.Management.Configuration flaky tests.
  • Loading branch information
msftrubengu authored Mar 2, 2023
1 parent a6d02ac commit cf980e6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -19,7 +19,7 @@

<PropertyGroup>
<CsWinRTComponent>true</CsWinRTComponent>
<CsWinRTWindowsMetadata>10.0.22000.0</CsWinRTWindowsMetadata>
<CsWinRTWindowsMetadata>10.0.19041.0</CsWinRTWindowsMetadata>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void CreateFile(string? content = null)
{
if (content is null)
{
File.Create(this.FullFileName);
using var fs = File.Create(this.FullFileName);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ private ConfigurationUnit CreteConfigurationUnit()
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"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit cf980e6

Please sign in to comment.