VsixCommunity / Community.VisualStudio.Toolkit

Making it easier to write Visual Studio extensions
Other
252 stars 44 forks source link

Namespaces + vssdk nuget missing in community toolkit project template #294

Open AdmiralSnyder opened 2 years ago

AdmiralSnyder commented 2 years ago

hi, when creating a new project from the template, a) the VSSDK nuget package is missing b) a lot of namespaces are missing when creating new items, like an async tool window

i think at least a comment that the VSSDK nuget package needs to be added should be written into the generated package.cs file.

also, possibly, the link to this repo and the cookbook. maybe the missing namespaces can be at least warned about in another comment...

reduckted commented 2 years ago

This toolkit contains a reference to Microsoft.VisualStudio.SDK, so you don't need to reference it directly - you will be able to access all of the types in the SDK because that package is a transitive reference.

I've just tried to create a new project using the VSIX Project (Community) template, and added an item using Async Tool Window (Community). The project compiled without any errors.

What version of the Extensibility Template Pack 2022 extension do you have installed?

AdmiralSnyder commented 2 years ago

Extensibility Template Pack 2022 is version 2.2.47, which is current. - i did not add an item manually, maybe that fixed it? couldn't get the initial project to compile. i just created a new project now and this is how the package.cs looks like before trying to compile: image

rebuilding does not remove the errors, so either the transitive package ref is broken or just gets ignored...

AdmiralSnyder commented 2 years ago

@reduckted do you think the idea of adding comments to the template for the package.cs is worth creating a separate issue? that specific template also doesn't get loaded if you don't add a [ProvideAutoLoad] to it - so that, too should be commented, probably...