In Visual Studio (2008) is there a way to have a custom dependent file on another custom file?

There is VSCommands add-in which allow you to configure dependant files directly from IDE Link updated, previous was http://mokosh.co.uk/vscommands FYI: When VSCommands is installed, just select all the files you want to be Dependant and the root file, then Right Click -> Group Items… and VSCommands will ask which of the files you would like … Read more

How do I use Powershell to add/remove references to a csproj?

I think the problem is that your XML file has a default namespace xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″. This causes problems with XPath. So you XPath //ProjectReference will return 0 nodes. There are two ways to solve this: Use a namespace manager. Use namespace agnostic XPath. Here’s is how you could use a namespace manager: $nsmgr = New-Object System.Xml.XmlNamespaceManager … Read more

.csproj multiple hint paths for an assembly

The simplest way since only ONE HintPath can be used is to use the all-so-nice Condition attribute like this: <Reference Include=”TheAssembly”> <HintPath Condition=”Exists(‘..\My\Assembly\Path’)”>..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\My\Assembly\Path’)”>..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\My\Assembly\Path’)”>..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\My\Assembly\Path’)”>..\..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\..\My\Assembly\Path’)”>..\..\..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\..\..\My\Assembly\Path’)”>..\..\..\..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\..\..\..\My\Assembly\Path’)”>..\..\..\..\..\..\..\My\Assembly\Path\TheAssembly.dll</HintPath> etc… </Reference> So the answer to the question would be this: <Reference Include=”assembly”> <HintPath Condition=”Exists(‘..\..\csharp\bin’)”>..\..\csharp\bin\assembly.dll</HintPath> <HintPath Condition=”Exists(‘..\..\..\..\foo\sdk\csharp\bin’)”>..\..\..\..\foo\sdk\csharp\bin\assembly.dll</HintPath> </Reference> If multiple … Read more

How to edit .csproj file

The CSPROJ file, saved in XML format, stores all the references for your project including your compilation options. There is also an SLN file, which stores information about projects that make up your solution. If you are using Visual Studio and you have the need to view or edit your CSPROJ file, while in Visual … Read more

Visual Studio project type guids

Here’s a list of project type GUIDs: 8BB2217D-0F2D-49D1-97BC-3654ED321F3B ASP.NET 5 603C0E0B-DB56-11DC-BE95-000D561079B0 ASP.NET MVC 1 F85E285D-A4E0-4152-9332-AB1D724D3325 ASP.NET MVC 2 E53F8FEA-EAE0-44A6-8774-FFD645390401 ASP.NET MVC 3 E3E379DF-F4C6-4180-9B81-6769533ABE47 ASP.NET MVC 4 349C5851-65DF-11DA-9384-00065B846F21 ASP.NET MVC 5 / Web Application FAE04EC0-301F-11D3-BF4B-00C04F79EFBC C# 9A19103F-16F7-4668-BE54-9A1E7A4F7556 C# (forces use of SDK project system) 8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942 C++ 13B669BE-BB05-4DDF-9536-439F39A36129 CPS barebones project A9ACE9BB-CECE-4E62-9AA4-C7E7C5BD2124 Database 4F174C21-8C12-11D0-8340-0000F80270F8 Database C8D11400-126E-41CD-887F-60BD40844F9E Database … Read more