Reputation: 1
I went through the steps to export the Visual C++ Project as a Template in Visual Studio 2015. It only contains one file. Main.cpp
When I open the new project created from that template it gives: "files cannot be found" when I try to click on Main.cpp.
I'm missing something, please help.
Upvotes: 0
Views: 3660
Reputation: 11
Unfortunately any answer is just going to be a work around -- this functionality is currently broken in Visual Studio 2015, bug has reported in a couple places:
https://github.com/aspnet/Tooling/issues/732
Upvotes: 0
Reputation: 511
Ok here is how you do it:
<TemplateContent> <Project TargetFileName="sample.vcxproj" File="sample.vcxproj" ReplaceParameters="true"> <ProjectItem ReplaceParameters="false" TargetFileName="$projectname$.vcxproj.filters">sample.vcxproj.filters</ProjectItem> </Project> </TemplateContent>
<ProjectItem ReplaceParameters="false" TargetFileName="Main.cpp">Main.cpp</ProjectItem>
Upvotes: 1