Closed doggy8088 closed 6 years ago
Good idea about the prefix; I was going to suggest that but you beat me to it!
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
).
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>
).
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.
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".
Good point - sounds fine to me then :)
I have to get to bed (I'm in Australia) but I'll get this merged first thing tomorrow :)
Sure, g'nite! 😄
Looks good, thanks!