Coder Social home page Coder Social logo

not support " = []" about csharpier HOT 5 CLOSED

AlvisZhang avatar AlvisZhang commented on September 20, 2024
not support " = []"

from csharpier.

Comments (5)

belav avatar belav commented on September 20, 2024

Collection expressions are supported, you must be on an old version of csharpier. Note that csharpier is versioned separately from the ide extensions and updating the extension does not actually update csharpier.

from csharpier.

stevenfishli avatar stevenfishli commented on September 20, 2024

I'm using dotnet 8.0.1 and cshapier 1.6.0
same error

string[] test = ["1", "2"];
Failed to compile so was not formatted.\n (40,29): error CS1525: Invalid expression term '['\n"

If I use this string[] test = new string[] { "1", "2" };, there is no problem.

from csharpier.

stevenfishli avatar stevenfishli commented on September 20, 2024

I use this command dotnet csharpier --version to get the version.
It is 0.22.1.
I have installed vs code extension cshapier 1.6.0.
I see the latest version is 0.28 at gitlab.
How can I update the version to 0.28?

from csharpier.

stevenfishli avatar stevenfishli commented on September 20, 2024

Finally, I know my problem.
I use wrong version at .config/dotnet-tools.json

{
  "version": 1,
  "isRoot": true,
  "tools": {
    "CSharpier": {
      "version": "0.28.0",
      "commands": [
        "dotnet-csharpier"
      ]
    }
  }
}

I guess someone is like me to follow this link to setup husky
https://csharpier.com/docs/Pre-commit

Then, we use wrong version 0.22.1 and it is a very old version.
Maybe better to use X.XX.X and remind others to input latest version.

from csharpier.

belav avatar belav commented on September 20, 2024

I updated the doc to remove the hardcoded version number.

from csharpier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.