none
VS 2017 Community / Problems with custom project template RRS feed

  • Question

  • Hello,

    I'm trying to create a custom project template in VS 2017 Community Version 15.4.0. Whenever I try to create a project from this template I get the error "The document cannot be opened. It has been renamed, deleted or moved" when I try to open the .cpp file (the only source file in the project). Moreover, the source file is not named after the project name, but like it was in the original project based on which the template was created. I followed several tipps on the web, but still cannot really figure out how to edit the .template file of the project template zip file to get the template working. Can anybody help?

    Sunday, October 15, 2017 7:57 AM

Answers

  • Hi muhmöh,

    How do you create your custom project template in VS2017? Do make it through export project template or VSIX project? If possible, please tell us the detailed steps about how do you create your project template.

    Please create your custom project template with following document to check your steps, whether there has any steps missing.

    https://docs.microsoft.com/en-us/visualstudio/extensibility/getting-started-with-the-vsix-project-template

    And if all your steps are correct, please create a new default project template without any custom code to check whether the new project template also has this issue. It could help us confirm this issue related to your custom project template or Visual Studio itself.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by muhmöh Monday, October 23, 2017 10:36 AM
    Monday, October 16, 2017 2:39 AM
    Moderator
  • Hi muhmöh,

    Thanks for your  detailed steps.

    I have reproduced your problem based on your steps. And this problem seems only occurs with C++ project. There has any other communities also has this issue and have submit this issue to Visual Studio Developer Community. The Microsoft stuff has verified it is a bug in C++ project template. Please wait for the C++ team to find out and fix this issue patiently。

    https://developercommunity.visualstudio.com/content/problem/60489/export-template-results-in-missing-files.html

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 17, 2017 2:05 AM
    Moderator
  • Hi muhmöh,

    The latest VS2017 15.4.1 still has this issue, I also help you add a comment to the feedback team:

    https://developercommunity.visualstudio.com/content/problem/60489/export-template-results-in-missing-files.html

    You could also add your comment and vote it.

    In addition, since we reported this issue, if possible, you could mark the reply as the answer, so other community members who get the same issue will find this feedback easily and then help you vote it.

    We will also pay attentions to this feedback, if we get any update from the developer community site, we will update it here.

    Sincerely,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by muhmöh Monday, October 23, 2017 10:36 AM
    Monday, October 23, 2017 8:50 AM
    Moderator

All replies

  • Hi muhmöh,

    How do you create your custom project template in VS2017? Do make it through export project template or VSIX project? If possible, please tell us the detailed steps about how do you create your project template.

    Please create your custom project template with following document to check your steps, whether there has any steps missing.

    https://docs.microsoft.com/en-us/visualstudio/extensibility/getting-started-with-the-vsix-project-template

    And if all your steps are correct, please create a new default project template without any custom code to check whether the new project template also has this issue. It could help us confirm this issue related to your custom project template or Visual Studio itself.

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by muhmöh Monday, October 23, 2017 10:36 AM
    Monday, October 16, 2017 2:39 AM
    Moderator
  • Hello Weiwei,

    I followed the followin steps:

    I created a new C++ Project, based on the built-in Windows console application template. Then I exported it with Export template, using the Export Template wizard and provding it with a Name for the template. Then I wanted to make a new Project based on my template, but could not open the source file. The error message was: "The document cannot be opened. It has been renamed, deleted or moved".

    Besides that, the source file was not named after the project name, but had the same name it had in the original project on which the template was created.

    Best regards,

    muhmöh

    Monday, October 16, 2017 6:00 AM
  • Hi muhmöh,

    Thanks for your  detailed steps.

    I have reproduced your problem based on your steps. And this problem seems only occurs with C++ project. There has any other communities also has this issue and have submit this issue to Visual Studio Developer Community. The Microsoft stuff has verified it is a bug in C++ project template. Please wait for the C++ team to find out and fix this issue patiently。

    https://developercommunity.visualstudio.com/content/problem/60489/export-template-results-in-missing-files.html

    Best Regards,
    Weiwei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 17, 2017 2:05 AM
    Moderator
  • Hi muhmöh,

    The latest VS2017 15.4.1 still has this issue, I also help you add a comment to the feedback team:

    https://developercommunity.visualstudio.com/content/problem/60489/export-template-results-in-missing-files.html

    You could also add your comment and vote it.

    In addition, since we reported this issue, if possible, you could mark the reply as the answer, so other community members who get the same issue will find this feedback easily and then help you vote it.

    We will also pay attentions to this feedback, if we get any update from the developer community site, we will update it here.

    Sincerely,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by muhmöh Monday, October 23, 2017 10:36 AM
    Monday, October 23, 2017 8:50 AM
    Moderator
  • Hello,

    in the latest release of Visual Studio 2017  15.4.4 the issue has gotten worse. I can't even create a c++ Project based on the Windows Console App template. It results in this error:

    The error message translates in English as: Acces denied Exception from HRESULT ...)

    Sincerely,

    Muhmöh

    Wednesday, November 15, 2017 10:54 AM