diff options
author | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2011-07-23 23:02:06 +0400 |
---|---|---|
committer | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2011-07-23 23:02:06 +0400 |
commit | 4e11497cd0af9029e3c154797a6f519509f96c67 (patch) | |
tree | c7fc9bb66302dca66223ab464a079d9fa95e4af8 /main | |
parent | 34a1526d9db7261d7de6b81044bdce3f987e252e (diff) |
[Project] Don't automatically "fix" target framework of new project
If the target framework is not supported by the target format, that should
get fixed by converting the format, with a prompt, when serializing.
Automagic "fixing" leads to unexpected results without any warning.
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs index c63b2a43d7..826f8c7f4f 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs @@ -129,9 +129,6 @@ namespace MonoDevelop.Ide.Templates project.Name = pname; if (project is DotNetProject) { - if (policyParent.ParentSolution != null && !policyParent.ParentSolution.FileFormat.CanWrite (item)) - TryFixingFramework (policyParent.ParentSolution.FileFormat, (DotNetProject)project); - foreach (ProjectReference projectReference in references) ((DotNetProject)project).References.Add (projectReference); } @@ -157,21 +154,5 @@ namespace MonoDevelop.Ide.Templates } } } - - public void TryFixingFramework (FileFormat format, DotNetProject item) - { - // If the solution format can't write this project it may be due to an unsupported - // framework. Try finding a compatible framework. - - TargetFramework curFx = item.TargetFramework; - foreach (TargetFramework fx in Runtime.SystemAssemblyService.GetTargetFrameworks ()) { - if (!item.TargetRuntime.IsInstalled (fx)) - continue; - item.TargetFramework = fx; - if (format.CanWrite (item)) - return; - } - item.TargetFramework = curFx; - } } -} +}
\ No newline at end of file |