tintoy / msbuild-project-tools-vscode

VS Code extension for MSBuild intellisense (including PackageReference completion).
MIT License
82 stars 16 forks source link

Any plan on code snippets for MSBuild project file? #28

Closed doggy8088 closed 6 years ago

doggy8088 commented 6 years ago

Hi,

Do you have any plan on code snippets for MSBuild project file? Any ideas?

tintoy commented 6 years ago

Hi - are there any you'd particularly like to see? I'm open to the idea :)

doggy8088 commented 6 years ago

@tintoy Yes, I have tons of ideas for this. 😄

There are some other frameworks such as Entity Framework Core. There are some tooling support need to change *.csproj manually.

What do you think? 😃

tintoy commented 6 years ago

Those are great ideas!

Would you like to open a PR or would you prefer me to add them? I'm happy to do either 😀

doggy8088 commented 6 years ago

@tintoy Can I just put my snippets into https://github.com/tintoy/msbuild-project-tools-vscode/blob/master/snippets/msbuild-project.json , then you do the following works?

tintoy commented 6 years ago

Sure that's fine, I can take it from there.

doggy8088 commented 6 years ago

@tintoy PR https://github.com/tintoy/msbuild-project-tools-vscode/pull/29 have been tested. All works. Please take a look. Thanks. 😄

tintoy commented 6 years ago

@doggy8088 - it's good to go:

https://github.com/tintoy/msbuild-project-tools-vscode/releases/tag/v0.2.21

Thanks again for your contribution! Feel free to add any other snippets you come up with :wink:

doggy8088 commented 6 years ago

@tintoy I installed this version. The code snippets looks not working. Do you know why?

image

tintoy commented 6 years ago

Have you changed the language to MSBuild?

tintoy commented 6 years ago

Here's what I see:

image

doggy8088 commented 6 years ago

I opened my *.csproj file, the default language mode is "XML". After I switch language mode to MSBuild. Everything is OK. But why my default is XML? What else I need to configure?

doggy8088 commented 6 years ago

After I set the "files.associations" in my user settings. The default language mode has been changed to msbuild now. Problem solved. 👍

    "files.associations": {
        "*.csproj": "msbuild"
    }
tintoy commented 6 years ago

Yeah - the readme shows how to do that, but I was nervous about automatically taking over people's file associations :)