From 08a54ec77098d4756397633a32e4f7876ad2e206 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 21 Mar 2012 15:57:04 +0100 Subject: [PATCH] Expose the setting in the SharpDevelop UI. --- data/resources/StringResources.resx | 10 ++++++++++ .../Project/Items/ProjectReferenceProjectItem.cs | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/data/resources/StringResources.resx b/data/resources/StringResources.resx index 7a42cfc587..363b3b0163 100644 --- a/data/resources/StringResources.resx +++ b/data/resources/StringResources.resx @@ -4236,6 +4236,16 @@ Only letters, digits, space, '.' or '_' are allowed. The public key token Assembly reference's public key token property description + + Reference assembly + 'Reference' is a verb in this case. +This string appears in the property pad when a project reference is selected in the projects pad. +It is a boolean option that defaults to true. +If set to false, this reference specifies only a build-order dependency and does not cause the assembly to be referenced. + + + If set to false, this reference specifies only a build-order dependency and does not cause the assembly to be referenced. + Specific Version Reference property name indicating if the reference is to a specific version diff --git a/src/Main/Base/Project/Src/Project/Items/ProjectReferenceProjectItem.cs b/src/Main/Base/Project/Src/Project/Items/ProjectReferenceProjectItem.cs index 804611317d..31a810bc16 100644 --- a/src/Main/Base/Project/Src/Project/Items/ProjectReferenceProjectItem.cs +++ b/src/Main/Base/Project/Src/Project/Items/ProjectReferenceProjectItem.cs @@ -5,6 +5,7 @@ using System; using System.ComponentModel; using System.IO; using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Gui; namespace ICSharpCode.SharpDevelop.Project { @@ -41,6 +42,21 @@ namespace ICSharpCode.SharpDevelop.Project } } + [DefaultValue(true)] + [LocalizedProperty("${res:ICSharpCode.SharpDevelop.Internal.Project.ProjectReference.ReferenceOutputAssembly}", + Description = "${res:ICSharpCode.SharpDevelop.Internal.Project.ProjectReference.ReferenceOutputAssembly.Description}")] + public bool ReferenceOutputAssembly { + get { + return GetEvaluatedMetadata("ReferenceOutputAssembly", true); + } + set { + if (value) + RemoveMetadata("ReferenceOutputAssembly"); + else + SetEvaluatedMetadata("ReferenceOutputAssembly", "false"); + } + } + public override string ShortName { get { return Path.GetFileNameWithoutExtension(Include); } }