How to prevent generation of .csproj.user?

7.4k views Asked by At

Certain user specific configurations are stored in .csproj.user. How do I tell MS Visual Studio to store this information in the .csproj every time?

2

There are 2 answers

4
Reed Copsey On

You can't. Visual Studio stores the user-specific settings in the .csproj.user file, and the build settings in the .csproj file. This is to allow multiple users to work on a project, which is critical when working in a team with source control.

That being said, you can always delete the .user file, and it will be recreated, at any point in time.

0
Lucio Paiva On

I had the same problem and the only solution I could come up with was to manually edit the .csproj.user file, cut the configuration I wanted and paste in the .csproj file. It worked fine, despite being a somewhat user-hostile solution.