Skip to content

Compiling in VSCode fails #152

@ajkessel

Description

@ajkessel

I've installed the Powershell Pro Tools extension in latest VSCode as well as the 4.6.2 .NET developer kit and runtime framework. I have the following package.psd1:

@{
    Root = 'c:\apps\bin\start-socks.ps1'
    OutputPath = 'c:\apps\bin\out'
    Package = @{
        Enabled = $true
        Obfuscate = $false
        HideConsoleWindow = $true
        PowerShellVersion = '7.4.1'
        DotNetVersion = 'v4.6.2'
        FileVersion = '1.0.0'
        FileDescription = ''
        ProductName = ''
        ProductVersion = ''
        Copyright = ''
        RequireElevation = $false
        ApplicationIconPath = ''
        PackageType = 'Console'
    }
    Bundle = @{
        Enabled = $true
        Modules = $true
        # IgnoredModules = @()
    }
}
        

but always get this error when compiling:

C:\apps\bin\out\bin\36ca0dc2e46544d88b1341681ffbfa26\ConsolePowerShellHost.cs(3,14): error CS0234: The type or namespace name 'Management' does not exist in the namespace 'System' (are you missing an assembly reference?) [C:\apps\bin\out\bin\36ca0dc2e46544d88b1341681ffbfa26\start-socks.csproj]
C:\apps\bin\out\bin\36ca0dc2e46544d88b1341681ffbfa26\ConsolePowerShellHost.cs(5,17): error CS0234: The type or namespace name 'PowerShell' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [C:\apps\bin\out\bin\36ca0dc2e46544d88b1341681ffbfa26\start-socks.csproj]

Can anyone please point me in the right direction?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions