Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fine-tune msbuild snippets #30

Merged
merged 2 commits into from
Jan 29, 2018
Merged

Fine-tune msbuild snippets #30

merged 2 commits into from
Jan 29, 2018

Conversation

doggy8088
Copy link
Contributor

* Remove "msbuild-" prefix in the prefix field because all these snippets are used in MSBuild language mode only.
* Add a "ASP.NET Core Full Packages" snippet
* Full NuGet properties in the "nuget-properties" snippet
@tintoy
Copy link
Owner

tintoy commented Jan 29, 2018

Good idea about the prefix; I was going to suggest that but you beat me to it!

Copy link
Owner

@tintoy tintoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether the prefixes for the ASP.NET Core metapackage vs its constituent packages could be more self-descriptive?

@@ -9,8 +9,153 @@
],
"description": "Load Metapackage for ASP.NET Core"
},
"ASP.NET Core Full Packages": {
"prefix": "aspnetcore-metapackage-full",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought - perhaps you might want to make the prefix something like aspnetcore-full rather than including the term metapackage in the prefix? Might improve discoverability by helping consumers understand why they'd choose one over the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. 👍

@tintoy
Copy link
Owner

tintoy commented Jan 29, 2018

BTW, for snippets that only declare a single property or item, it might be easier to add those to the list of well-known properties / item types since the language service already knows how to insert them.

For example, here's the AssemblyName property and its associated description.

https://github.com/tintoy/msbuild-project-tools-vscode/blob/master/help/properties.json#L221-L223

I could probably look into adding an optional default value for well-known properties (so there could also be a defaultValue property in addition to description).

@tintoy
Copy link
Owner

tintoy commented Jan 29, 2018

And here's the definition for the PackageId property:

https://github.com/tintoy/msbuild-project-tools-vscode/blob/master/help/properties.json#L545

I think the snippets that add multiple required properties together are still a good idea, but perhaps leave out the containing PropertyGroup element? That way, it's easy for them to add those properties into an existing property group (and if they want to add a new property group, they can just type <Prop and the first suggestion will be <PropertyGroup>).

@doggy8088
Copy link
Contributor Author

I think defaultValue is a good idea.

These snippets are common usage for me. Wrapping them in a "Group" can be easily identified their purpose. ( It depends. ) No matter what, after these code snippets been inserted into csproj. They can still move their generated code to else where.

@doggy8088
Copy link
Contributor Author

I have a .NET Core courses in my country. I also asked to many of my studuents, almost 90% devs don't know what's <ItemGroup> and <PropertyGroup>. That why I want to put these snippets into a "Group".

@tintoy
Copy link
Owner

tintoy commented Jan 29, 2018

Good point - sounds fine to me then :)

@tintoy
Copy link
Owner

tintoy commented Jan 29, 2018

I have to get to bed (I'm in Australia) but I'll get this merged first thing tomorrow :)

@doggy8088
Copy link
Contributor Author

Sure, g'nite! 😄

@tintoy
Copy link
Owner

tintoy commented Jan 29, 2018

Looks good, thanks!

@tintoy tintoy merged commit 20bc162 into tintoy:master Jan 29, 2018
@tintoy
Copy link
Owner

tintoy commented Jan 29, 2018

Published in v0.2.22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants