CCNet.Build.Common.ProjectReference.ConvertToBinary C# (CSharp) Method

ConvertToBinary() public method

Removes project reference from a project document replacing it with the binary one.
public ConvertToBinary ( TargetFramework framework, string name ) : void
framework TargetFramework
name string
return void
		public void ConvertToBinary(TargetFramework framework, string name)
		{
			var include = String.Format("{0}, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL", name);
			var dotNet = framework.ToString().ToLowerInvariant();
			var hintPath = String.Format(@"..\packages\{0}.1.0.0.0\lib\{1}\{0}.dll", name, dotNet);

			var binary = new XElement(
				Ns + "Reference",
				new XAttribute("Include", include),
				new XElement(Ns + "HintPath", hintPath));

			m_element.AddAfterSelf(binary);
			m_element.Remove();
		}
	}