12 changed files with 178 additions and 18 deletions
@ -0,0 +1,31 @@ |
|||||||
|
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||||
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Runtime.Serialization; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop.Project |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// This exception occurs when upgrading a project fails.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable] |
||||||
|
public class ProjectUpgradeException : Exception |
||||||
|
{ |
||||||
|
public ProjectUpgradeException() : base() |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
public ProjectUpgradeException(string message) : base(message) |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
public ProjectUpgradeException(string message, Exception innerException) : base(message, innerException) |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
protected ProjectUpgradeException(SerializationInfo info, StreamingContext context) : base(info, context) |
||||||
|
{ |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||||
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||||
|
|
||||||
|
using System; |
||||||
|
using Microsoft.Win32; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop |
||||||
|
{ |
||||||
|
public class DotnetDetection |
||||||
|
{ |
||||||
|
public static bool IsDotnet35SP1Installed() |
||||||
|
{ |
||||||
|
using (var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5")) { |
||||||
|
return key != null && (key.GetValue("SP") as int?) >= 1; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public static bool IsDotnet40Installed() |
||||||
|
{ |
||||||
|
return true; // required for SD to run
|
||||||
|
} |
||||||
|
|
||||||
|
public static bool IsDotnet45Installed() |
||||||
|
{ |
||||||
|
Version dotnet45Beta = new Version(4, 0, 30319, 17379); |
||||||
|
return Environment.Version >= dotnet45Beta; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue