Open
Description
Hi!
I revisited your module, to pimp up my own Import-VisualCommandPrompt module with VS15 support. (Once I'm done, I'll put it in a public repo.) However, your scripts fail to launch inside PS Core for some reason.
PS C:\Users\Matty\Source\Repos> $PSVersionTable
Name Value
---- -----
CLRVersion
PSVersion 6.0.0-alpha
PSRemotingProtocolVersion 2.3
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSEdition Core
GitCommitId v6.0.0-alpha.18
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
BuildVersion 3.0.0.0
PS C:\Users\Matty\Source\Repos> git clone https://github.com/node4good/msvs-com-helper.git
Cloning into 'msvs-com-helper'...
remote: Counting objects: 215, done.
remote: Total 215 (delta 0), reused 0 (delta 0), pack-reused 215
Receiving objects: 100% (215/215), 30.03 KiB | 0 bytes/s, done.
Resolving deltas: 100% (94/94), done.
PS C:\Users\Matty\Source\Repos> .\msvs-com-helper\GetKey.ps1
Add-Type : (13) : The type or namespace name 'RegularExpressions' does not exist in the namespace 'System.Text' (are you missing an assembly referen
ce?)
At C:\Users\Matty\Source\Repos\msvs-com-helper\GetKey.ps1:17 char:1
+ Add-Type -Path GetVS2017Configuration.cs;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Exception
+ FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand
Add-Type : (272) : The type or namespace name 'Regex' could not be found (are you missing a using directive or an assembly reference?)
At C:\Users\Matty\Source\Repos\msvs-com-helper\GetKey.ps1:17 char:1
+ Add-Type -Path GetVS2017Configuration.cs;
...
I tried tracking down the issue, but couldn't. The namespaces and the types it complains about exist in PS Core.
PS C:\Users\Matty\Source\Repos\msvs-com-helper> [System.Text.RegularExpressions.Regex]
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False Regex System.Object
The docs say this type lives in the namespace it should. Also, my shell is running Core CLR, so this type should exist (even from C# I guess).
PS C:\Users\Matty\Source\Repos\msvs-com-helper> $IsCoreCLR
True
Any ideas what is the problem? Should you want to test, grab an installer or zip file from Powershell releases. Needs no install, just unpack and run powershell.exe.
Metadata
Assignees
Labels
No labels