Reputation: 1339
I am recreating an AddIn project that I had in VS 2010 and a basic function like adding a folder to the project is not working. Giving me:
The kind 'vsProjectItemKindPhysicalFolder' passed to ProjectItems.AddFolder is invalid.
Does anyone know how to solve this?
Thank you
Upvotes: 0
Views: 470
Reputation: 1339
The problem is that you need to pass in the constant named vsProjectItemKindPhysicalFolder
and not the name of the constant as a project type:
proj.ProjectItems.AddFolder(@"Generated", EnvDTE.Constants.vsProjectItemKindPhysicalFolder);
Upvotes: 1
Reputation: 548
This is most likely because you already have a folder by that exact name on the physical disk, but is not part of the project yet. You should try renaming the existing folder and try doing that action again.
Upvotes: 0