diff options
author | Jose Miguel Torres <jostor@microsoft.com> | 2019-07-02 15:15:19 +0300 |
---|---|---|
committer | Jose Miguel Torres <jostor@microsoft.com> | 2019-07-13 23:10:04 +0300 |
commit | b1a34f27572b90c6914016c2635ac82ddb6186cf (patch) | |
tree | 6ec527cc5ca873517ba62deba9fe0f3f40b14e03 /main/src/core/MonoDevelop.Core | |
parent | b5e6ffdbdb79caf90f854d56bd353807ec0968f7 (diff) |
[Ide][Core] Adds support for AppendTargetFrameworkToOutputPath
Diffstat (limited to 'main/src/core/MonoDevelop.Core')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectConfiguration.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectConfiguration.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectConfiguration.cs index 764d5d67a3..62c29ad908 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectConfiguration.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectConfiguration.cs @@ -50,8 +50,12 @@ namespace MonoDevelop.Projects { string assembly; string sourcePath; + DotNetCompilerParameters compilationParameters; + public bool AppendTargetFrameworkToOutputPath { get; set; } + public string TargetFrameworkShortName { get; internal set; } = string.Empty; + public DotNetProjectConfiguration (string id): base (id) { } @@ -60,6 +64,8 @@ namespace MonoDevelop.Projects { base.Read (pset); + AppendTargetFrameworkToOutputPath = pset.GetValue<bool> ("AppendTargetFrameworkToOutputPath"); + TargetFrameworkShortName = pset.GetValue ("TargetFramework"); assembly = pset.GetValue ("AssemblyName"); signAssembly = pset.GetValue<bool> ("SignAssembly"); delaySign = pset.GetValue<bool> ("DelaySign"); @@ -79,6 +85,11 @@ namespace MonoDevelop.Projects pset.SetValue ("DelaySign", delaySign, defaultValue:false, mergeToMainGroup:true); pset.SetValue (nameof(PublicSign), PublicSign, defaultValue: false, mergeToMainGroup: true); pset.SetValue ("AssemblyOriginatorKeyFile", assemblyKeyFile, defaultValue:FilePath.Empty, mergeToMainGroup:true); + if (AppendTargetFrameworkToOutputPath) { + pset.RemoveProperty (nameof (AppendTargetFrameworkToOutputPath)); + } else { + pset.SetValue (nameof (AppendTargetFrameworkToOutputPath), false); + } if (compilationParameters != null) compilationParameters.Write (pset); } @@ -189,8 +200,10 @@ namespace MonoDevelop.Projects protected override void OnCopyFrom (ItemConfiguration configuration, bool isRename) { base.OnCopyFrom (configuration, isRename); - DotNetProjectConfiguration conf = (DotNetProjectConfiguration) configuration; - + var conf = (DotNetProjectConfiguration) configuration; + + AppendTargetFrameworkToOutputPath = conf.AppendTargetFrameworkToOutputPath; + TargetFrameworkShortName = conf.TargetFrameworkShortName ?? "unknown"; assembly = conf.assembly; sourcePath = conf.sourcePath; bool notifyParentItem = ParentItem != null; |