For questions specific to the *.csproj.user xml file that holds user-specific options for project(s) in Visual Studio. When using this tag also include the more generic [csproj] tag.
Questions tagged [csproj-user]
15 questions
11
votes
1 answer
Can Conditional compilation symbols be added to csproj.user file?
I'm working in VS 2013 with a C# Xamarin iOS project. I would like to add a Conditional compilation symbol without effecting anyone else or having to go into Configuration Manager and say copying Debug (primarily so that if someone modifies Debug I…

Gavin Sutherland
- 1,666
- 3
- 23
- 36
8
votes
2 answers
How to prevent generation of .csproj.user?
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?

mcintoda
- 635
- 1
- 8
- 10
8
votes
3 answers
controls and forms missing icon and view designer option in vs2019 running SDK project with framework 4.7.2
Summary answer so far: Forms and controls only open in the designer if csproj.user file exists.
The problem story:
I have 2 controls that both inherit from a base control.
However one is missing the control icon in the solution explorer
The good…

Kirsten
- 15,730
- 41
- 179
- 318
8
votes
7 answers
Use relative paths for working directory & start in C# project
In a C# project I try to use relative paths for "Start external program" and for "Working directory".
I tried relative paths starting with ../ and relative paths with $(SolutionDir) / $(ProjectDir)
With all tries I get an error popup. (The…

Julian
- 33,915
- 22
- 119
- 174
8
votes
4 answers
csproj.user file in C# sln
my machine did an automatic reboot, due to patch applied by my network in my company, and last error i saw reported something with the csproj.user file. Now each time i try to launch my solution, it opens and then brings the dialog to send the…

user38230
- 645
- 3
- 13
- 31
6
votes
5 answers
.csproj.user issues when checked into TFS
We made the mistake of allowing .csproj.user files to be checked in to TFS so we could set "Start external program" defaults. This worked poorly, especially when branching.
Now we're trying to undo this.
If I delete the .csproj.user file for a…

TrueWill
- 25,132
- 10
- 101
- 150
2
votes
2 answers
How do I force Visual Studio 2019 to produce .csproj.user file?
I am developing a C# project in Visual Studio 2019. I've read that it should produce .csproj.user files automatically, but it is not. How do I force Visual Studio to produce a .csproj.user file? Thank you.

gib65
- 1,709
- 3
- 24
- 58
2
votes
1 answer
Exclude csproj.user file from Visual Studio TFS Check in
I am working on a solution where we're checking in code. Each time there is a check in, it checks in a csproj.user which reflects current user's config. How can we make a rule to not check in this file? We're using Visual Studio Team Services (was…

Jacky
- 393
- 1
- 3
- 13
1
vote
0 answers
automatic set of assembly version in csproj via task
I want to set Assembly Version of C# project in csproj file with a self generated task.
I want to set Assembly Version to:
Major Version -> Project version: for example 3
Minor Version -> 0
Build Number -> Year + Calendarweek
Revision ->…

Gleees
- 11
- 2
1
vote
1 answer
Is it possible to run AfterBuild target from csproj.user file?
I want to extend my local build process in .csproj.user file which is not tracked within our git repository. Previously I used PostBuildEvent but suddenly I discover that it does not work well with variables:…

Dmitriy Vornychev
- 545
- 3
- 12
0
votes
0 answers
Not able to copy ps1 files to nuget package
I have created a nuget package for a service. I need to add a few ps1 scripts inside this nuget package. I am trying to achieve the same using this:

Kalyanam Rajashree
- 652
- 2
- 11
- 23
0
votes
0 answers
In .nuget BeforeTargets ="BeforeBuild" should call only once for the Solution even though it has 40 projects?
I am looking for a way to run my defined Target only once per build process and not for every project that gets build.
I have defined the following in nuget.targets file
<_tenant…
0
votes
1 answer
At which location (path) does visual studio 2019 creates *.csproj.user file?
What is the location of Visual studio 2019 created *.csproj.user file? I searched it in user appdata folder, but I couldn't find any. Please help.

Pradeep
- 13
- 1
- 8
0
votes
1 answer
How to get csproj to add the reference file for a dll for a nuget package?
I'm able to add a dll and make sure it's in lib and ref folders so I can avoid the MSB3246, NU5128, and NU5131 warnings in a .nuspec file.
NewDll
…

On The Net Again
- 265
- 4
- 16
0
votes
1 answer
How can I create an instance of HttpConfiguration in a NUnit test using the new csproj format?
I created a unit test (with NUnit) that creates an instance of HttpConfiguration and it is working fine using the classical csproj format. The test succeeds. I also created a unit test (with xUnit) that does the same, using the new csproj format.…

Daan
- 2,478
- 3
- 36
- 76