Skip to content

dotnet template incorrectly sets the Standard Library version #92

@KubaP

Description

@KubaP

The issue
The issue seems to lie with the template. On creation of a new project, the .csproj file is populated with the ps standard library reference like so:

<PackageReference Include="PowerShellStandard.Library" Version="5.1.0-preview-06">
...

With this preview reference, the intellisense will not work correctly for the powershell-related annotations in the source code, such as the [Cmdlet(...)] annotation (intellisense for standard c# features works correctly). This issue is present when using the latest VSCode C# extension.

The version number however should be just 5.1.0. With this reference, the C# extesion provides correct intellisense.

Steps to reproduce

dotnet new -i Microsoft.PowerShell.Standard.Module.Template

dotnet new psmodule

Open the TestSampleCmdletCommand.cs file in VSCode, and invoke intellisense on one of the powershell related annotations, such as the VerbDiagnostic.Test symbol; no relevant intellisense will show up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions