What is a .pubxml.user file?
Asked Answered
E

1

33

I'm deciding whether to add a file to version control. It's name ends with .pubxml.user. Can anyone tell me what it is? The fill name of the file is <name of our web server>.pubxml.user. It is evidently related to the publishing configuration.

The project is in ASP.NET MVC and C#, using Visual Studio 2013. the file is in the PublishProfiles folder.

Epispastic answered 15/4, 2014 at 22:8 Comment(2)
I came looking for the answer too, but all I found so far is this comment For each .pubxml file there is a .pubxml.user file. The .pubxml.user file contains the encrypted password if you selected the Save password option, and by default it is excluded from the project. located at asp.net/mvc/tutorials/deployment/visual-studio-web-deployment/…Prothesis
Annoyingly it's updated when publishing, like it combines config (should be added to VCS) and build results (optional in VCS).Valaria
V
26

Because this is a user-specific file, it should be excluded from version control. From https://msdn.microsoft.com/en-us/library/ff398069(v=vs.110).aspx, emphasis mine.

When you create a publish profile, two files are created in the PublishProfiles folder: .pubxml and .pubxml.user. The .pubxml.user file contains only a few settings that apply to a specific user, such as an encrypted password. By default it is not included in source control. Typically when you change settings related to a profile you edit the .pubxml file rather than the .pubxml.user file.

Verbiage answered 6/8, 2015 at 22:20 Comment(3)
What drives me nuts is it somehow creates this password for the user without telling the user what it is. So it's not a real password entered by the user, in the case where the Azure publish wizard was used, the password magically appears in this file without the user typing it in. I wonder if it's really the user's azure account password, or if it's something else.Tavarez
@WarrenP If this is an azure website (web app currently) the password should have been created in azure when the web app was created. This thread discusses how to get the username and password for the depolyment. #28708971Ballou
Thanks. I just deleted all the .user files - Mine seemed to have some kind of logging of when it deployed files? Not needed any way. Gone :DFasciation

© 2022 - 2024 — McMap. All rights reserved.