1,397 questions
13
votes
3
answers
6k
views
XPath and *.csproj
I am for sure missing some important detail here. I just cannot make .NET's XPath work with Visual Studio project files.
Let's load an xml document:
var doc = new XmlDocument();
doc.Load("blah/blah....
9
votes
8
answers
15k
views
How do I get a diagram of the dependencies between my C# projects
I have a fairly complex application which has been broken up into multiple components. Each component has a solution file which contains a bunch of projects. So I like to think of this as a component ...
17
votes
2
answers
13k
views
MS-Build BeforeBuild not firing
I'm customizing a .csproj project to run some custom tasks before the main build. However, I can't get the tasks to execute at all.
I uncommented the <Target Name="BeforeBuild" /> ...
2
votes
5
answers
3k
views
C# nant build using .csproj files
Typically when doing a build script for C# I just include **/*.cs for each project/dll to build. However I now have a situation where I have some .cs files which are not part of the project but live ...
4
votes
2
answers
2k
views
Visual Studio Linked Files Directory Structure
I have two versions of a project. One for Silverlight and one for .NET. The SL project has the vast majority of the code base in it. I want to globally add all files from the SL project into the .NET ...
34
votes
6
answers
9k
views
MvcBuildViews true with Entity Framework in ASP.NET MVC 2
In VS 2010, changing <MvcBuildViews>true</MvcBuildViews> in a MVC2 project's .csproj file causes an error if you are using Entity Framework.
Could not load type 'System.Data.Entity....
107
votes
9
answers
85k
views
Is there a way to automatically include content files into asp.net project file?
I'm frequently adding a lot of content files (mostly images and js) to my ASP.NET project. I'm using VS publish system, and on publish, new files are not published until I include them in the project....
1
vote
2
answers
3k
views
How to know full paths to DLL's from .csproj file?
I wonder if there is some way to know full paths to the dll's that are listed in .csproj file.
The most interesting for me is to resolve paths to default dll's like System.Xml.dll, System.Data.dll ...
0
votes
1
answer
4k
views
Is there a way to fix the imported project error for Microsoft.CSharp.targets, other than changing the reserved property to $(MSBuildBinPath)?
So I am getting the error:
The imported project
"C:\Microsoft.CSharp.targets" was not
found. Confirm that the path in the
declaration is correct, and
that the file exists on disk.
When I ...
2
votes
1
answer
1k
views
Visual Studio Shortcut/Alias In .csproj
Within Visual Studio I'm pretty sure there is a way to "alias" a file among several projects. So in other words the actual file lives in only one place within the file system but has multiple ...
1
vote
1
answer
1k
views
Linq to XML, only take elements that have a certain child element
I would like to ask a follow up question to an oldie (but goodie) Reading the list of References from csproj files (though I am not the author of that question).
In my parsing of the csproj files I ...
2
votes
1
answer
513
views
CSProj contains a reference
I put my csproj for my web service in sourcesafe.
Now inside of the text of the csproj there is a line stating that the webservice is located at
localhost/something
is there a way to not store this ...
2
votes
2
answers
3k
views
Precompiling ASP.NET Web application with MSBuild
I have a c# web application project in Visual Studio 2008 that I want to precompile for deployment. After looking at various options, it seems all of them have some issues - perhaps someone could give ...
10
votes
2
answers
9k
views
Error HRESULT E_FAIL when pasting references in Visual Studio
I know this isn't a programming question but it is a programming tool question.
In Visual Studio 2008 Team Edition (version 9.0 with .NET 3.5 SP1) when I copy and paste references from one csproj to ...
0
votes
2
answers
3k
views
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(...
117
votes
7
answers
155k
views
Including content files in .csproj that are outside the project cone
I have a C# project say MyProject.csproj located at "C:\Projects\MyProject\". I also have files that I want copied into the output directory of this project. But, the files are at the location "C:\...
30
votes
3
answers
18k
views
Reading the list of References from csproj files
Does anyone know of a way to programmatically read the list of References in a VS2008 csproj file? MSBuild does not appear to support this functionality. I'm trying to read the nodes by loading the ...
39
votes
2
answers
5k
views
How to make notepad++ treat csproj files as XML automatically?
I often use notepad++ for editing of the csproj files. And I always need to go to the Language menu and select XML in order to get syntax highlighting.
Is it possible to configure notepad++ to treat ...
217
votes
8
answers
106k
views
In a .csproj file, what is <None Include="..."> for?
How is
<None Include="C:\foo.bar" />
different from
<Content Include="C:\foo.bar" />
?
0
votes
2
answers
669
views
Why does my co-worker see a different Project file (*.csproj) using Visual Source Safe
I met a problem which is very strange, my company uses Visual Source Safe
to control version,but I found that my team's different member see the same .csproj file in VSS is not the same, it's very ...
13
votes
6
answers
4k
views
In Visual Studio (2008) is there a way to have a custom dependent file on another custom file?
Instead of a *.cs code behind or beside I'd like to have a *.js file. I'm developing a MVC application an have no need for a code beside because I have controllers, but in certain cases it'd be nice ...
1
vote
2
answers
470
views
Change web project to class library
Is there any way but copying the .cs files?
Changing the .csproj file? But how?
There is a related question, but I'm not satisfied with the answer: link
76
votes
2
answers
53k
views
What use is the Aliases property of assembly references in Visual Studio 8
When I add an assembly reference to a project in Visual Studio 8 the Aliases property, of that reference, is set to "global". What is this property good for and why is it set to global?
MSDN tells ...
17
votes
3
answers
7k
views
Partial .csproj Files
Is it possible to split the information in a .csproj across more than one file? A bit like a project version of the partial class feature.