SYSK 121: When it’s Not Only Acceptable, but Recommended to Check into Source Control Your .user File

Developer’s personal settings and preferences are stored in a .user file.  This is why it’s not recommended to add .user files to VSS or other Source Control tool – keep personal to yourself. 


However, when using ClickOnce deployment, the published version is stored in YourExeProject.csproj.user.  So, if you don’t check this file into VSS, when somebody else (or you on another computer) will do the ClickOnce publishing to the deployment server, the version number will restart from zero!  Needless to say, that will mess up your versioning…  You could manually enter the version you want, but many don’t...  So, if you’re using ClickOnce with version auto-increment, do add your csproj.user file to the solution and check it into Source Control tool.


Comments (6)

  1. ToddM says:

    Shouldn’t this be written up as a bug?  Aren’t there a whole lot of places better than .user to store this information?  Even adding a new file type to the project seems to be a better approach than using .user.

  2. Uhhh…  Can you find the programmer who wrote this little ‘feature’ and have a long talk with him?  That makes ClickOnce almost unuseable for a multi developer environment.

  3. David says:

    I also hope this is marked as a bug for VS2005 and will be fixed in SP1?

  4. Peter Ritchie says:

    There isn’t a bug logged specifically about this.  The one bug logged that mentions this is FDBK32796:

  5. Andy says:

    Now that is a nasty little gotcha.  I think it would be better just to maually increment the version yourself instead of checking in .user files.

  6. John says:

    Yeah this sounds pretty silly to me too.

Skip to main content