Created Project Template, cannot edit a file and put it back into the .zip. VS2017 RRS feed

  • Question

  • I created a Project template and named it StandardProject. It works well, but I need to tweak a Using statement. In Windows Explorer (Microsoft Windows 7 Enterprise, Service Pack 1, 64-bit) I drag out FormMain.cs make my edit, and drag it back in. I select Copy and Replace. I get the message that the zip file is invalid or corrupt. Yet it still works fine in all respects (except this).

    I have no instances of VS open, and I even rebooted the computer, but the problem remains.

    I do not believe the zip file is invalid or corrupt, or I couldn't still use it as a template, and I wouldn't be able to see and drag(copy) out files.

    What is going on, and how can I put my edited file back in?

    Thank you

    Jon Jacobs, There are 10 kinds of people: those who understand binary and those who don't

    Friday, April 5, 2019 7:47 PM

All replies

  • Create new zip file for the template and copy it to the required location, overwriting the old one while VS is not open.  Probably easier and faster than struggling with odd problems when trying to replace a file in the existing zip.

    Friday, April 5, 2019 8:55 PM
  • I had considered creating a new zip file, but held that as a last resort. Maybe there was something special about template zip files that I would lose. But in the absence of any other possibilities, I did what you said. Funny, my changes have no effect on the new projects created from the template. However, I think I have to look further into the XML files to make that work.

    I appreciate your input.

    Jon Jacobs, There are 10 kinds of people: those who understand binary and those who don't

    Saturday, April 6, 2019 4:22 PM
  • Hi Jon Q jacobs,

    Sorry for delay in reply.

    According to your description, there is something wrong with compressing file. Our form is discussing Our forum is discussing Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. So we will move this post to Where is forum for...? forum to redirect it. Then you could post your issue on the appropriate forum for better support. Thank you for understanding.

    Best Regards,


    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

    Wednesday, April 10, 2019 8:45 AM