Click or drag to resize

ProjectAddAssemblyReference Method (String, String, String, Boolean, String, Boolean)

Add an assembly reference by name.
The optional parameters basically mirror settings used in the '.csproj' file. The name is normally the file name of the assembly without the extension (short name), or can be a "display name" which includes a version number and other optional values. If the assembly is not in the project's output directory or the GAC, it will require a hint-path, which can be either relative or absolute, and should include the file name and extension to be compatible with the standard '.csproj' files. You can also use a path on the name itself, but standard '.csproj' files use the hint-path instead.

Namespace:  Nova.CodeDOM
Assembly:  Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax
C#
public void AddAssemblyReference(
	string name,
	string alias,
	string requiredTargetFrameworkVersion,
	bool isHidden = false,
	string hintPath = null,
	bool specificVersion = false
)

Parameters

name
Type: SystemString
The short name or display name of the assembly.
alias
Type: SystemString
The alias for the referenced assembly, if any.
requiredTargetFrameworkVersion
Type: SystemString
The required target framework version for the assembly (only used for framework assemblies).
isHidden (Optional)
Type: SystemBoolean
True if the assembly reference should be hidden in the UI.
hintPath (Optional)
Type: SystemString
The full path, including the file name, of where the assembly is expected to be (not required if the assembly is in the GAC).
specificVersion (Optional)
Type: SystemBoolean
True if the specific version specified in the display name should be used.
See Also