A file with the 'csproj' file extension is a Visual Studio .NET C# Project file.
Questions tagged [csproj]
1301 questions
0
votes
2 answers
Access solutioninfo.cs and assemblyinfo.cs from within .csproj
I need to access some information from my solutioninfo.cs and assemblyinfo.cs within my .csproj file and use it as a property.
use the value of
// my solutioninfo.cs
[assembly: AssemblyCompany("MyCompany")]
in my csproj:
// my…

crauscher
- 6,528
- 14
- 59
- 85
0
votes
1 answer
Wildcard assembly reference in csproj
I'm using nuget (as many of you) a lot for referencing external and internal component-assemblies.
For debugging purposes, it would be nice being able to exchange the nuget-assembly for it's source-code.
Unfortunately, some "core-lib" is used pretty…

Sascha
- 2,193
- 3
- 24
- 38
0
votes
1 answer
How do I remove the Private element (copy local) from csproj (xml) using Powershell
I am trying to remove Project/ItemGroup/Reference/Private element from csproj xml.
$csproj = [xml] ( Get-Content $fullProjectPath )
$csproj.Project.ItemGroup |
ForEach-Object { $_.Reference } |
where { $_.Include -match…

Bhavesh
- 293
- 4
- 10
0
votes
1 answer
Visual Studio 2012 csproj and sqlproj
I have the latest VS 2012 RC and when I try to open an existing soulution that was written by another programmer in VS 2012, it says that the files csproj and sqlproj are incompatible with the version I am running. Any ideas why?

codehammer
- 481
- 5
- 8
0
votes
1 answer
Ajax Minifier: JS file duplication when combining via project file / msbuild task
I've been attempting to get minification and bundling working on my MVC3 project for some time, trying out quite a few different compressors and methods. I've finally settled on using Microsoft Ajax Minifier via an msbuild task in my project file.…

Spikeh
- 3,540
- 4
- 24
- 49
0
votes
1 answer
Compiling Win32 and x64 csproj with different references
I would like to keep my .csproj projet and compile two version of the dll, one for Win32 platform and the other for x64 platform.
I hit a problem because I need to use different references for each platform
For example, for the…

Baptiste Pernet
- 3,318
- 22
- 47
0
votes
1 answer
What Are the New Reference Items in My .csproj File from NuGet 2.0?
One of our underlying projects is packaged via NuGet and distributed (internally) so that other teams can consume the library - let's call it "Core." With NuGet 1.x, we got a reference in our .csproj file that looked something like this:

SethO
- 2,703
- 5
- 28
- 38
0
votes
3 answers
Remove xmlns="" attribute when adding Reference element into csproj
I try to programmatic add the reference of dll into csproj file at time of installation service through the MSI Installer.
..\..\TestProject.dll
I put below line of source…

Saroop Trivedi
- 2,245
- 6
- 31
- 49
0
votes
1 answer
Change AssemblyName in CSProj in code
I'm writing a utility that will change the assembly name of a csproj file. I know the csproj is essentially XML so XPath should work. In fact, I can get it to work for certain information. Here is the code I have:
var xmlDoc = new…

Devin
- 1,014
- 1
- 9
- 28
0
votes
1 answer
PreBuild for PreBuild Event Command in csproj
Can I specify in csproj file that the exe being executed in prebuild events should be built before executing it?

tau
- 121
- 6
0
votes
1 answer
Using Nant build project and run the NUnit
I want to use Nant build a project and import the dll file to execute NUnit.
But I don't konw how to write the xml code to build a csproj file.
here is my xml :

Edison
- 79
- 1
- 13
-1
votes
1 answer
How to read project file .csproj to compile only those .cs which includes in project
How to read project file .csproj to compile only those class files (.cs) which includes in project. And ignore file which excluded from project.

Dipti
- 21
- 4
-1
votes
1 answer
How to disable modifying .csproj file from being modified when saving .resx file in Visual Studio 2022?
I have created a C# console application with Visual Studio 2022. I have added multiple .resx files and I have modified my .csproj file:
Exe
…

Zvonimir Matic
- 831
- 1
- 8
- 12
-1
votes
1 answer
Trigger specific build pipeline in Azure Dev Ops with single repository(.sln) having multiple projects(.csproj)
I've a single repository having visual studio solution(.sln), where I've more than one project(.csproj) in same solution(i.e. WebAPI project, WebApp project etc.)...
Now, I've created separate pipeline(s) for individual project, which trigger…

Manish Jain
- 217
- 1
- 4
- 16
-1
votes
2 answers
.NET core output type in csproj file
I have a csproj file made on a Windows machine that uses .NET SDK. I am currently using the file on a Mac and want to know what the project SDK should be for .NET Core 2.2 and want to know what the output type should be for a Mac.

SameerRaina
- 39
- 5