Replies: 2 comments 3 replies
-
What did you do before? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Based on how a solution folder is added here: I suspect that at least part of the answer is to use the Based on that documentation, I think you'd want to call it something like this to create a project from a template: Guid guidNull = default;
Guid iidProject = typeof(IVsHierarchy).GUID;
solution.CreateProject(
rguidProjectType: ref guidNull,
lpszMoniker: pathToTemplate,
lpszLocation: pathToNewProjectDirectory,
lpszName: newProjectName,
grfCreateFlags: __VSCREATEPROJFLAGS.CPF_CLONEFILE,
iidProject: typeof(IVsHierarchy).GUID,
ppProject: out IntPtr projectPtr
); Where you're supposed to get the project template path from, I have no idea. 🤷♂️ There's also seems to be a few other methods to add projects that you might have some luck with (I haven't tried any of them though):
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
Thanks for the awesome toolkit...
I have an extension I wrote ages ago (still in VB haha) that I am porting to VS2019 and above.... I have almost everything working using the Community.VisualStudio.Toolkit but one thing I still cannot do that I used to be able to do with the DTE2 interface is to add a New project to the current solution (you used to point it to a template file)
Does anyone know if there any way to do this using the toolkit?
Beta Was this translation helpful? Give feedback.
All reactions