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

1

12

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.

Leonelleonelle answered 28/11, 2012 at 20:19 Comment(0)
F
17

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.

Fernandofernas answered 18/5, 2013 at 13:51 Comment(1)
FYI still a valid strategy for VS 2015.Goniometer

© 2022 - 2024 — McMap. All rights reserved.