VS2017 Community Create template Error The document cannot be opened. It has been renamed, deleted or moved

Source: Internet
Author: User

When I create a project using a template I created myself, the document cannot be opened appears when the file is opened. It has been renamed, deleted or moved "error prompt.

It seems that this bug is only in the community version.

At this point we need to manually modify the template file

Here's how I solved this issue:

    1. Follow your steps 1 to 6
    2. At Step 7 make sure to uncheck "Automatically import the template into Visual Studio"
    3. Click Finish
    4. Extract the just created zip file of your template into a folder of your choice
    5. Now copy all your source (. cpp) and headers (. h) files from your original SFML project to the extracted folder
    6. In this folder look for mytemplate.vstemplate and open it in a text editor
    7. You'll see a templatedata and templatecontent sections
    8. Inside the templatedata section add the line <CreateInPlace>true</CreateInPlace>
    9. Inside the templatecontent section add for each copied file from step 5 the lines
      <projectitem replaceparameters= "false" Targetfilename= "filename.cpp" >filename.cpp </ProjectItem> or
      <projectitem replaceparameters= "false" Targetfilename= "filename.h" >filename.h</ Projectitem>
    10. Now put all files back into a zip file
    11. Copy your new zip file to Visual Studio 2015\templates\projecttemplates folder
    12. Restart Visual Studio and open a new project from your project template

Reference from: https://social.msdn.microsoft.com/Forums/vstudio/en-US/24b38dbb-c445-47a4-a05b-c9c12cfa6a6b/ Visual-studio-community-2015-source-file-missing-from-template?forum=vssetup

VS2017 Community Create template Error The document cannot be opened. It has been renamed, deleted or moved

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.