Community.VisualStudio.Toolkit icon indicating copy to clipboard operation
Community.VisualStudio.Toolkit copied to clipboard

Namespaces + vssdk nuget missing in community toolkit project template

Open AdmiralSnyder opened this issue 2 years ago • 3 comments

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...

AdmiralSnyder avatar Feb 04 '22 02:02 AdmiralSnyder

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?

reduckted avatar Feb 04 '22 10:02 reduckted

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 avatar Feb 04 '22 11:02 AdmiralSnyder

@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...

AdmiralSnyder avatar Feb 04 '22 11:02 AdmiralSnyder