Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid multiple Publish Profiles in Visual Studio 2012 project files?

What is the best way to avoid having different users on our team contribute changes to .csproj files that include references to their local Publish Profiles?

We recently migrated to 2012 and our .csproj files have a handful of references to different .pubxml files in Properties/PublishProfiles within the .csproj XML.

If it's related, we svn:ignore any .user files and the Properties/PublishProfiles folder.

like image 650
Matt Beckman Avatar asked Nov 28 '12 20:11

Matt Beckman


1 Answers

In your .csproj file, replace all references to .pubxml files with a single wildcard reference:

<None Include="Properties\PublishProfiles\*.pubxml" />

Each developer can then add and delete their own publish profiles without Visual Studio updating the .csproj XML.

Also, like you said, set your source control to ignore *.user and *.pubxml.

like image 97
Joe Daley Avatar answered Sep 29 '22 20:09

Joe Daley