none
Visual Studio templates broken, code goes missing after an export and import.

    Question

  • Default templates in visual studio and the ones downloadable online come with .cpp files, but if you create a template and then make a project from this template, all source files which should be there (as they were in the original project) are missing.

    Software affected:

    Microsoft Visual Studio Community 2015 - Version 14.0.25425.01 Update 3, installed on Windows 10

    Steps to reproduce:

    Create a project with the default settings (I made a win32 console application). The project will by default contain some source files and will compile and run.

    File -> Export Template -> Project Template (All settings default again)

    File -> New -> Project -> (Name of created template)

    All source files will still be listed in the Solution Explorer. However, opening any gives the message "The document cannot be opened. It has been renamed, deleted, or moved" - And the source files are missing from the folder. If you copy all source files to the appropriate place manually the template will work, (All other project data including linker settings is correct), but this defeats part of the purpose of using templates.

    Opening the folder where this template is created (C:\Users\klfwip\Documents\Visual Studio 2015\My Exported Templates) a zip file was created. The archive contains XML / template information describing the project and listing the source files, but the .cpp files themselves are absent.

    I don't see any options in the template creation process to force it to include the source files and couldn't find anything relating to this online, so unless I am missing a step here template creation is broken.

    I don't know if this is the right place to ask this, but any help would be appreciated.

    Sunday, August 21, 2016 9:57 PM

Answers

All replies

  • Hi klfwip,

    thanks for posting here.

    This forum is about c++ development. For your case, I will move it to vs general for better support.

    Your understanding and cooperation will be grateful.

    Best Regards,

    Sera Yu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Monday, August 22, 2016 7:10 AM
  • Hi klfwip,

    Thank you for your post.

    We followed your steps and reproduced your issue successfully, please see:

    Since the VS 2015 Update 3 is just released not too long.

    You could submit this feedback to Microsoft Connect feedback portal: http://connect.microsoft.com, Microsoft engineers will evaluate them seriously. Thanks for your understanding. After you submit the feedback, you can post the link here which will be beneficial for other members with the similar issue. And I will help you to vote it.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Monday, August 22, 2016 7:49 AM
    Moderator
  • I opened another topic on this before I managed to see this. As Lana has suggested, I submitted Feedback which can be found here: https://connect.microsoft.com/VisualStudio/feedback/details/3075913

    Used your well formatted reproduction steps klfwip, hope that is alright.

    Monday, August 22, 2016 6:14 PM
  • Hi Robert,

    I have already in the link you provided, please wait patiently till the Microsoft Engineer to solve this issue.

    Thank you for your understanding.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Tuesday, August 23, 2016 6:38 AM
    Moderator
  • Did this ever get resolved? I am having the same issues
    Saturday, January 14, 2017 2:02 PM
  • Same thing here…

    Impossible to get a template working. I managed it once, but it didn't show up in the choices of templates until i repaired VS Community 2017.

    It works well at the office, under VS2015 pro.
    Monday, March 20, 2017 7:04 PM