Recent update of VS2019 breaks custom VC item templates

Trentacosta, Ralph 1 Reputation point
2020-12-10T19:06:53.72+00:00

IN 2017 and early 2019 versions of VS did not have this issue.. I just updated to the recent VS 2019 update and now I cannot successfully create a C++ item with my custom item templates. When I add a new item to my project, I select my template, I give the file a unique name, my Wizard loads, and then once its done loading, it just brings me back to the "Add new item" screen. My file does getting written to the file system, so I am not sure why I am brought back to this screen. My c# custom item templates work just fine, its just the C++ item template, which I have created like many others, use the c# item template project, change the project type from CSharp to VC and off I go. Again this same template works fine in 2017, just not 2019. I have even removed my wizard from the equation.

Any idea's?

Thanks

Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
325 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Dylan Zhu-MSFT 6,401 Reputation points
    2020-12-11T03:31:46.987+00:00

    Hi TrentacostaRalph,

    You could try to re-create a new C++ item template in VS 2019(18.x).

    And if it doesn't work ,please try to repair your visual studio.

    Best Regards, Dylan

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our * *documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**

    0 comments No comments

  2. Trentacosta, Ralph 1 Reputation point
    2020-12-11T14:32:40.187+00:00

    I have created a new CSharp item templated, changed project type to VC, changed my item files to a .cpp file no luck
    Repaired VS, again no luck.

    Is there an acutally C++ item template project that can be used? I do not see one with the projects I have.
    In debugging through my wizard, it leaves IWizard.ShouldAddProjectItem with out error and then I never hit any other breakpoints that I have set beyond that method . i.e. BeforeOpeningFile, ProjectFinishedGenerating....

    What do you mean by VS2019(18+). I am at version 16.8.3

    Any other idea's? Do I need a particular item checked in my VS install for this to work in VS2019? I just tried this, I tired to add the base Standard VS C++ FIle (.cpp) item and that too behaves the same way as my custom templates. After you add the file, it returns you to the Add New Item dialog.

    0 comments No comments

  3. Trentacosta, Ralph 1 Reputation point
    2020-12-11T18:55:19.287+00:00

    Unreal, problem solved... my cpp project was not checked out so I could not add the file to the project. I think that may be a bug as this is not an issue for CSharp projects.

    0 comments No comments