Skip to content

Commit e647549

Browse files
author
Sergei Vorobev
committed
Exclude Microsoft.WSMan.Management from the list of default snapins
Fix PowerShell#1180
1 parent 9eda67b commit e647549

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

build.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function Start-PSBuild {
156156

157157
# handle xaml files
158158
# Heuristic to resolve xaml on the fresh machine
159-
if ($FullCLR -and ($XamlGen -or -not (Test-Path "$PSScriptRoot/src/Microsoft.PowerShell.Activities/gen/*.g.resources")))
159+
if ($FullCLR -and ($XamlGen -or -not (Test-Path "$PSScriptRoot/src/Microsoft.PowerShell.Activities/gen/*.g.cs")))
160160
{
161161
log "Run XamlGen (generating .g.cs and .resources for .xaml files)"
162162
Start-XamlGen -MSBuildConfiguration $msbuildConfiguration

src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ private static IList<DefaultPSSnapInInformation> DefaultMshSnapins
14091409
"SecurityMshSnapInResources,Description","SecurityMshSnapInResources,Vendor")
14101410
};
14111411

1412-
#if !LINUX
1412+
#if !PORTABLE
14131413
if (!Utils.IsWinPEHost())
14141414
{
14151415
defaultMshSnapins.Add(new DefaultPSSnapInInformation("Microsoft.WSMan.Management", "Microsoft.WSMan.Management", null,
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Describe 'Basic engine APIs' {
2+
Context 'powershell::Create' {
3+
It 'can create default instance' {
4+
[powershell]::Create() | Should Not Be $null
5+
}
6+
}
7+
}

0 commit comments

Comments
 (0)