Reputation: 293
I created a Project Template https://learn.microsoft.com/en-us/visualstudio/ide/creating-project-and-item-templates?view=vs-2017 Inside vcxproj I have props file definition: (left side of the image): props in vcxproj
The prop file is present in the project package. When creating a New Project the line with prop file definition is deleted from vcxproj by Visual Studio. When I restored it manually and reload project everything works fine. What can be the reason Visual Studio is doing that?
Upvotes: 0
Views: 2146
Reputation: 76928
Visual Studio removes props file definition from vcxproj file
First, make sure the props file exists in the project template, Second, make sure the new project is created with the custom template. You can follow below steps:
MyCustomTemplate
.<Import Project="$projectname$.props"
/> to the project file .vcxproj
. .vcxproj
with notepad.)Update:
Since you are using the Visual Studio 2015, you would get that error. And if you upgrade your Visual Studio to 2017, everything will be fine.
If you do not want to upgrade your Visual Studio to 2017, you can follow the method of Paul H. to resolve this issue:
How to include a property sheet in VC project template
Hope this helps.
Upvotes: 1