{"id":397,"date":"2010-11-11T13:16:30","date_gmt":"2010-11-11T13:16:30","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=397"},"modified":"2022-02-17T06:24:05","modified_gmt":"2022-02-17T06:24:05","slug":"creating-new-project-from-existing-project","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/projects-general\/creating-new-project-from-existing-project","title":{"rendered":"Creating New Project From Existing Project"},"content":{"rendered":"<ol>\n<li>\nCopy the project to a new project directory\n<\/li>\n<li>\nOpen it and rebuild it to ensure it builds correctly.\n<\/li>\n<li>\nIn solution explorer right click the solution &gt; Rename\n<\/li>\n<li>\nIn solution explorer right click the project&nbsp; &gt; Rename\n<\/li>\n<li>\nBelow here may need updating&#8230;.\n<\/li>\n<li>\nRename the main project files to the new project name\n<\/li>\n<li>\nOpen project by running Visual Studio and then opening the NewProjectName.vcproj file\n<\/li>\n<li>\nExpanding the project files tree, in Source Files delete the OldProjectName.cpp file and add the NewProjectName.cpp project file\n<\/li>\n<li>\nDelete the original Debug and Release folders.\n<\/li>\n<li>\nMenu &gt; Build &gt; Rebuild Solution and the project should compile.\n<\/li>\n<\/ol>\n<p>\nIf you rename the namespace you will need to update the RootNamespace property for the project. &nbsp;Unlike for C# and VB this doesn&#39;t seem to be possible via the project properties, but can be done by closing the project, right click YourProjectName.vcproj and open with notepad. &nbsp;Look for the &lt;RootNamespace&gt; entry and update it.\n<\/p>\n<p>\nIf you rename say the main window file (just right click and re-name) you will get a build error as you will need to update the include to it from the main project .cpp file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Copy the project to a new project directory Open it and rebuild it to ensure it builds correctly. In solution explorer right click the solution &gt; Rename In solution explorer right click the project&nbsp; &gt; Rename Below here may need updating&#8230;. Rename the main project files to the new project name Open project by running [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[],"class_list":["post-397","post","type-post","status-publish","format-standard","hentry","category-projects-general"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/comments?post=397"}],"version-history":[{"count":10,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/397\/revisions"}],"predecessor-version":[{"id":1484,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/397\/revisions\/1484"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}