csproj

How to search csproj file for a string thru code ?

I want to search csproj file for a particular string through code. How can I do it ? Thanks. ...

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 their thoughts on this: The project is under source control and also contains a lot of files that are excluded from project. Web Deploym...

<Subtype>Designer</Subtype> Added then removed by Visual Studio on load/unload

Anyone see this before? I have a large Visual Studio project that keeps adding [Subtype] Designer[/Subtype] to my .vcproj then removing it on the next open and close of the project. There is only one class defined in StoredImageControl.cs. Anyone know how to shut this off as it is really messing up my revision control. This is befor...

How to validate OS Version in .csproj File??

Hi All, How can i check the OS Version in .csproj file ? My project requires to be opened in VS2K5 as well as MonoDevelop IDE (in windows/linux). While running the project i'm using few settings in Monodevelop IDE. Its not a problem with VS2k5, but there is a problem in Windows Monodevelop IDE and Linux MonoDevelop IDE. So If I'm abl...

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 info in the csproj so users can move this web service where ever they want? ...

Can TeamCity's .NET NUnitaddin process csproj files?

To cut to the chase, can the TeamCity .NET NUnitLauncher process Microsoft csproj files? I ask this question because of the following. I have a NANT build script. In this script I have a number of tests which use nunit-console.exe (which ships with NUnit v2.5.2). An example of a test in my Nant build file is: <target name="x.Commons....

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 need to select all Compile elements that have Link element as a child. I first attempted to extend the answer to the linked question as fol...

How to embed an XSLT file in a .NET project to be included in the output .exe?

Hi everyone, I have a simple C# Console App that reads in an XML file specified the the user, runs an XSLT transformation on it, and outputs the results. When I distribute my app to users, I want to distribute a single .EXE file. My source code consists of 3 files: the .csproj file, the .cs code file, and a .xslt stylesheet. How can ...

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 references within two or more .csproj files. Short of opening the .csproj and creating such an alias, how would I do this within Visual Studio? ...

Easy way to add multiple existing .csproj to a Visual Studio Solution?

I've checked out a branch of C# code from source control. It contains maybe 50 projects in various folders. There's no existing .sln file to be found. I intended to create a blank solution to add existing solutions. The UI only lets me do this one project at a time. Is there something I'm missing? I'd like to specify a list of *.cspr...

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 run this command: %WINDIR%\Microsoft.NET\Framework\v2.0.50727\msbuild.exe MyProject.csproj /target:publish I found others stating that...

How to add content from a target in a csproj file ?

Hi all, I would like to add content to my web application depending on the configuration. I have declared the target in the initials target and the target looks like this : <Target Name="ApplicationNameDefinition" Outputs="$(MashupName)"> <MSBuild.ExtensionPack.Framework.TextString TaskAction="StartsWith" String1="$(ConfigurationName...

How to know full paths to DLL's from .csproj file?

Hi, 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 and etc. In the .csproj file there are only lines with short names: <Reference Include="System.Xml.Linq"> <RequiredTargetFramework>3....

Error doing an MSBuild on a CLR Storedprocedure project on Build Server

Hi, When building a CLR Storedprocedure Project using MSBuild on our build server (Team City) we're getting the following error: error MSB4019: The imported project "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\SqlServer.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists o...

productversion tab in csproj file changed when i build soultion

my solution is in vs 2003 and using many projects and when i have taken latest from source safe(perforce) and build the project it has given some library not finding error i.e. some porjects which are used in the solution are missing because those assemblies are not at those particular location. so in all csproj files where the hard cod...

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. I would like to auto include all files in specified directory. Is there a way to specify wich directories should be auto-included in cspr...

XML in the csproj file

Can anyone point me to a schema or a list of properties valid inside the C# csproj file? I've looked, but don't appear to be able to find any documentation on it. ...

MvcBuildViews true with Entity Framework in ASP.NET MVC 2

Hi everybody, In VS 2010, changing true in a MVC2 project's .csproj file causes an error if you are using Entity Framework. Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config 129 I want to build views while I'm debugging, and I also want m...

How can I prevent external MSBuild files from being cached (by Visual Studio) during a project build?

I have a project in my solution which started life as a C# library project. It's got nothing of any interest in it in terms of code, it is merely used as a dependency in the other projects in my solution in order to ensure that it is built first. One of the side-effects of building this project is that a shared AssemblyInfo.cs is created...

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 version as linked files. I've managed to do so successfully like this in the csproj file for the .NET version: <Compile Include="..\MyProj...