Browse Source

Merge branch 'master' of github.com:icsharpcode/SharpDevelop

pull/474/head
Peter Forstmeier 11 years ago
parent
commit
c4305104e6
  1. 2
      README.md
  2. 6
      doc/Dependencies.html
  3. 3
      src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.Designer.cs
  4. 2
      src/AddIns/Debugger/Debugger.Core/Eval.cs
  5. 30
      src/AddIns/Debugger/Debugger.Core/Process.cs
  6. 2
      src/AddIns/Debugger/Debugger.Tests/Tests/ControlFlow_Stepping.cs
  7. 5
      src/AddIns/DisplayBindings/HexEditor/Project/Src/Editor.cs
  8. 2
      src/AddIns/DisplayBindings/ILSpyAddIn/ILSpySymbolSource.cs
  9. 3
      src/AddIns/DisplayBindings/IconEditor/EditorPanel.Designer.cs
  10. 9
      src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchAndReplaceDialog.cs
  11. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeActions/ConvertForeachToForAction.cs
  12. 7
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeActions/CreateOverloadWithoutParameterAction.cs
  13. 18
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs
  14. 7
      src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCatchClauseIssue.cs
  15. 2
      src/Libraries/NRefactory/ICSharpCode.NRefactory.Xml/DocumentationElement.cs
  16. 3
      src/Main/Base/Project/ICSharpCode.SharpDevelop.addin
  17. 160
      src/Main/Base/Project/Project/TargetFrameworks/TargetFramework.cs
  18. 2
      src/Main/Base/Project/Resources/CommonAboutDialog.xfrm
  19. 2
      src/Main/Base/Project/Resources/NewFileDialog.xfrm
  20. 2
      src/Main/Base/Project/Resources/NewFileWithNameDialog.xfrm
  21. 6
      src/Main/Base/Project/Util/DotnetDetection.cs
  22. 1
      src/Main/Base/Project/Util/Versions.cs
  23. 2
      src/Main/ICSharpCode.Core.WinForms/MessageService/CustomDialog.cs
  24. 3
      src/Main/SharpDevelop/Logging/ExceptionBox.cs
  25. 3
      src/Main/SharpDevelop/Parser/AssemblyParserService.cs
  26. 1
      src/Main/SharpDevelop/Project/Solution.cs
  27. 6
      src/Main/SharpDevelop/Startup/SplashScreen.cs
  28. 12
      src/Main/SharpDevelop/Templates/Project/ProjectDescriptor.cs
  29. 4
      src/Main/SharpDevelop/app.template.config

2
README.md

@ -29,7 +29,7 @@ If you want to contribute see ["Joining the team"](https://github.com/icsharpcod @@ -29,7 +29,7 @@ If you want to contribute see ["Joining the team"](https://github.com/icsharpcod
- [Microsoft Build Tools 2013](http://www.microsoft.com/en-us/download/details.aspx?id=40760)
- [.NET 3.5 SP1](http://www.microsoft.com/en-au/download/details.aspx?id=22)
- [.NET 4.5 SDK](http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx) (part of Windows SDK 8.0)
- [Windows SDK 7.1](http://www.microsoft.com/downloads/details.aspx?familyid=6B6C21D2-2006-4AFA-9702-529FA782D63B) (?? not sure if this still is necessary...)
- [Windows SDK 7.1](http://www.microsoft.com/downloads/details.aspx?familyid=6B6C21D2-2006-4AFA-9702-529FA782D63B)
- [Windows SDK 7.0](http://www.microsoft.com/en-us/download/details.aspx?id=3138) (optional; C++ compiler needed for profiler)
- [Windows PowerShell](http://www.microsoft.com/en-us/download/details.aspx?id=34595)
- If you have cloned the SD git repository: git must be available on your PATH

6
doc/Dependencies.html

@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
<ul>
<li>
<a href="http://www.microsoft.com/en-us/download/details.aspx?id=40772">Microsoft .NET Framework 4.5.1 Developer Pack</a> for .NET 4.5 code completion documentation
<a href="http://www.microsoft.com/en-us/download/details.aspx?id=42637">Microsoft .NET Framework 4.5.2 Developer Pack</a> for .NET 4.5 code completion documentation
</li>
<li>
<a href="http://www.microsoft.com/downloads/details.aspx?familyid=6B6C21D2-2006-4AFA-9702-529FA782D63B&amp;displaylang=en">Microsoft Windows SDK for Windows 7 and .NET Framework 4</a> (strongly recommended!)
@ -47,6 +47,10 @@ @@ -47,6 +47,10 @@
<th>Target platform</th>
<th>Reference Assemblies</th>
<tr>
<tr>
<td>.NET Framework 4.5.2</td>
<td><a href="http://www.microsoft.com/en-us/download/details.aspx?id=42637">Microsoft .NET Framework 4.5.2 Developer Pack</a></td>
</tr>
<tr>
<td>.NET Framework 4.5.1</td>
<td><a href="http://www.microsoft.com/en-us/download/details.aspx?id=40772">Microsoft .NET Framework 4.5.1 Developer Pack</a></td>

3
src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.Designer.cs generated

@ -47,6 +47,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -47,6 +47,7 @@ namespace ICSharpCode.SharpDevelop.Services
this.pictureBox.Size = new System.Drawing.Size(48, 52);
this.pictureBox.TabIndex = 0;
this.pictureBox.TabStop = false;
this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
//
// lblExceptionText
//
@ -113,6 +114,8 @@ namespace ICSharpCode.SharpDevelop.Services @@ -113,6 +114,8 @@ namespace ICSharpCode.SharpDevelop.Services
//
// DebuggeeExceptionForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.ClientSize = new System.Drawing.Size(642, 399);
this.Controls.Add(this.btnContinue);
this.Controls.Add(this.btnBreak);

2
src/AddIns/Debugger/Debugger.Core/Eval.cs

@ -78,7 +78,7 @@ namespace Debugger @@ -78,7 +78,7 @@ namespace Debugger
case EvalState.Evaluating: throw new GetValueException("Evaluating...");
case EvalState.EvaluatedSuccessfully: return result;
case EvalState.EvaluatedException: return result;
case EvalState.EvaluatedNoResult: throw new DebuggerException("Evaluation did not return any value.");
case EvalState.EvaluatedNoResult: throw new GetValueException("no result");
case EvalState.EvaluatedTimeOut: throw new GetValueException("Timeout");
default: throw new DebuggerException("Unknown state");
}

30
src/AddIns/Debugger/Debugger.Core/Process.cs

@ -20,6 +20,7 @@ using System; @@ -20,6 +20,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using ICSharpCode.NRefactory.TypeSystem;
using Debugger.Interop.CorDebug;
using Debugger.Interop.CorSym;
@ -480,17 +481,26 @@ namespace Debugger @@ -480,17 +481,26 @@ namespace Debugger
{
AssertPaused();
if (threadToRun != null) {
corProcess.SetAllThreadsDebugState(CorDebugThreadState.THREAD_SUSPEND, null);
threadToRun.CorThread.SetDebugState(CorDebugThreadState.THREAD_RUN);
} else {
corProcess.SetAllThreadsDebugState(CorDebugThreadState.THREAD_RUN, null);
}
NotifyResumed(action);
corProcess.Continue(0);
// this.TraceMessage("Continue");
try {
if (threadToRun != null) {
corProcess.SetAllThreadsDebugState(CorDebugThreadState.THREAD_SUSPEND, null);
threadToRun.CorThread.SetDebugState(CorDebugThreadState.THREAD_RUN);
} else {
corProcess.SetAllThreadsDebugState(CorDebugThreadState.THREAD_RUN, null);
}
NotifyResumed(action);
corProcess.Continue(0);
// this.TraceMessage("Continue");
} catch (COMException ex) {
if (ex.HResult == unchecked((int)0x80131301)) {
// Process was terminated. (Exception from HRESULT: 0x80131301)
// This occurs if a process is killed (e.g. console window of console application closed)
// while the application is doing something involving debugger callbacks (Debug.WriteLine calls, or throwing+handling exceptions).
// I think we can safely ignore this error.
}
}
if (action == DebuggeeStateAction.Clear) {
OnResumed();
}

2
src/AddIns/Debugger/Debugger.Tests/Tests/ControlFlow_Stepping.cs

@ -129,7 +129,7 @@ namespace Debugger.Tests { @@ -129,7 +129,7 @@ namespace Debugger.Tests {
public partial class DebuggerTests
{
[NUnit.Framework.Test]
[NUnit.Framework.Test, NUnit.Framework.Ignore("Broken on .NET 4.5.2 due to #472")]
public void ControlFlow_Stepping()
{
StartTest();

5
src/AddIns/DisplayBindings/HexEditor/Project/Src/Editor.cs

@ -115,7 +115,10 @@ namespace HexEditor @@ -115,7 +115,10 @@ namespace HexEditor
selection = new SelectionManager(ref buffer);
undoStack = new UndoManager();
insertmode = true;
underscorewidth = MeasureStringWidth(this.CreateGraphics(), "_", Settings.DataFont);
using (var g = this.CreateGraphics()) {
VScrollBar.Width = (int)(VScrollBar.Width * (g.DpiX / 96f));
underscorewidth = MeasureStringWidth(g, "_", Settings.DataFont);
}
underscorewidth3 = underscorewidth * 3;
fontheight = GetFontHeight(Settings.DataFont);
selregion = new Rectangle[] {};

2
src/AddIns/DisplayBindings/ILSpyAddIn/ILSpySymbolSource.cs

@ -96,7 +96,7 @@ namespace ICSharpCode.ILSpyAddIn @@ -96,7 +96,7 @@ namespace ICSharpCode.ILSpyAddIn
var file = GetSymbols(method);
if (file == null || !file.DebugSymbols.ContainsKey(id))
return null;
return Enumerable.Empty<ILLocalVariable>();
var symbols = file.DebugSymbols[id];

3
src/AddIns/DisplayBindings/IconEditor/EditorPanel.Designer.cs generated

@ -137,7 +137,8 @@ namespace ICSharpCode.IconEditor @@ -137,7 +137,8 @@ namespace ICSharpCode.IconEditor
//
// EditorPanel
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.Controls.Add(this.table);
this.Controls.Add(this.panel2);
this.Name = "EditorPanel";

9
src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchAndReplaceDialog.cs

@ -64,6 +64,7 @@ namespace SearchAndReplace @@ -64,6 +64,7 @@ namespace SearchAndReplace
public SearchAndReplaceDialog(SearchAndReplaceMode searchAndReplaceMode)
{
SuspendLayout();
this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
this.ShowInTaskbar = false;
this.TopMost = false;
@ -94,6 +95,10 @@ namespace SearchAndReplace @@ -94,6 +95,10 @@ namespace SearchAndReplace
Controls.Add(toolStrip);
RightToLeftConverter.ConvertRecursive(this);
this.AutoScaleMode = AutoScaleMode.Dpi;
this.AutoScaleDimensions = new SizeF(96, 96);
ResumeLayout();
SetSearchAndReplaceMode();
FormLocationHelper.Apply(this, "ICSharpCode.SharpDevelop.Gui.SearchAndReplaceDialog.Location", false);
@ -144,12 +149,16 @@ namespace SearchAndReplace @@ -144,12 +149,16 @@ namespace SearchAndReplace
void SetSearchAndReplaceMode()
{
SuspendLayout();
searchAndReplacePanel.SearchAndReplaceMode = searchButton.Checked ? SearchAndReplaceMode.Search : SearchAndReplaceMode.Replace;
this.AutoScaleMode = AutoScaleMode.Dpi;
this.AutoScaleDimensions = new SizeF(96, 96);
if (searchButton.Checked) {
this.ClientSize = new Size(430, 335);
} else {
this.ClientSize = new Size(430, 385);
}
ResumeLayout();
}
/// <summary>

2
src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeActions/ConvertForeachToForAction.cs

@ -67,7 +67,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring @@ -67,7 +67,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
bool hasIndexAccess;
var foreachStatement = GetForeachStatement(context, out hasIndexAccess);
if (foreachStatement == null || foreachStatement.EmbeddedStatement == null)
if (foreachStatement == null || foreachStatement.EmbeddedStatement.IsNull)
yield break;
var state = context.GetResolverStateBefore (foreachStatement.EmbeddedStatement);
string name = GetName(state, VariableNames);

7
src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeActions/CreateOverloadWithoutParameterAction.cs

@ -53,7 +53,12 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring @@ -53,7 +53,12 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
return null;
// find existing method
var method = (IMethod)((MemberResolveResult)context.Resolve (methodDecl)).Member;
var resolveResult = context.Resolve(methodDecl) as MemberResolveResult;
if (resolveResult == null)
return null;
var method = resolveResult.Member as IMethod;
if (method == null)
return null;
var parameters = new List<IParameter> (method.Parameters.Where (param => param.Name != node.Name));
if (method.DeclaringType.GetMethods (
m => m.Name == method.Name && m.TypeParameters.Count == method.TypeParameters.Count)

18
src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/UnreachableCodeIssue.cs

@ -133,6 +133,18 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring @@ -133,6 +133,18 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
if (statement == null || !AddStatement(statement))
base.VisitChildren(node);
}
static TextLocation GetPrevEnd(AstNode node)
{
var prev = node.GetPrevNode(n => !(n is NewLineNode));
return prev != null ? prev.EndLocation : node.StartLocation;
}
static TextLocation GetNextStart(AstNode node)
{
var next = node.GetNextNode(n => !(n is NewLineNode));
return next != null ? next.StartLocation : node.EndLocation;
}
bool AddStatement(Statement statement)
{
@ -147,7 +159,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring @@ -147,7 +159,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
}
var prevEnd = statement.GetPrevNode(n => !(n is NewLineNode)).EndLocation;
var prevEnd = GetPrevEnd(statement);
TextLocation start;
TextLocation end;
@ -159,12 +171,12 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring @@ -159,12 +171,12 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
collectedStatements.Add(statement);
visitor.unreachableNodes.Add(statement);
collectedStatements.Add(ife.ElseToken);
end = ife.ElseToken.GetNextNode(n => !(n is NewLineNode)).StartLocation;
end = GetNextStart(ife.ElseToken);
} else if (statement.Role == IfElseStatement.FalseRole) {
var ife = (IfElseStatement)statement.Parent;
start = ife.ElseToken.StartLocation;
collectedStatements.Add(ife.ElseToken);
prevEnd = ife.ElseToken.GetPrevNode(n => !(n is NewLineNode)).EndLocation;
prevEnd = GetPrevEnd(ife.ElseToken);
collectedStatements.Add(statement);
visitor.unreachableNodes.Add(statement);
end = statement.EndLocation;

7
src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Synced/RedundanciesInCode/RedundantCatchClauseIssue.cs

@ -146,8 +146,11 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring @@ -146,8 +146,11 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring
if (nextClause != null) {
if (nextClause.Type.IsNull && !IsThrowsClause(nextClause))
return false;
if (!IsThrowsClause(nextClause) && type.GetDefinition ().IsDerivedFrom (ctx.Resolve (nextClause.Type).Type.GetDefinition ()))
return false;
if (!IsThrowsClause(nextClause)) {
var typeDef = type.GetDefinition();
if (typeDef == null || typeDef.IsDerivedFrom(ctx.Resolve(nextClause.Type).Type.GetDefinition()))
return false;
}
}
n = n.NextSibling;
}

2
src/Libraries/NRefactory/ICSharpCode.NRefactory.Xml/DocumentationElement.cs

@ -39,6 +39,8 @@ namespace ICSharpCode.NRefactory.Xml @@ -39,6 +39,8 @@ namespace ICSharpCode.NRefactory.Xml
/// </summary>
public static XmlDocumentationElement Get(IEntity entity, bool inheritDocIfMissing = true)
{
if (entity == null)
return null;
var documentationComment = entity.Documentation;
if (documentationComment != null) {
return Create(documentationComment, entity);

3
src/Main/Base/Project/ICSharpCode.SharpDevelop.addin

@ -2081,7 +2081,7 @@ @@ -2081,7 +2081,7 @@
class = "ICSharpCode.SharpDevelop.Editor.Commands.IndentSelection" />
<MenuItem id = "Reformat"
label = "Reformat"
shortcut = "Control|Alt|F"
shortcut = "Control|Shift|I"
class = "ICSharpCode.SharpDevelop.Editor.Commands.ReformatSelection" />
</Path>
@ -2451,5 +2451,6 @@ @@ -2451,5 +2451,6 @@
<Static class="ICSharpCode.SharpDevelop.Project.TargetFramework" member="Net40Client" />
<Static class="ICSharpCode.SharpDevelop.Project.TargetFramework" member="Net45" />
<Static class="ICSharpCode.SharpDevelop.Project.TargetFramework" member="Net451" />
<Static class="ICSharpCode.SharpDevelop.Project.TargetFramework" member="Net452" />
</Path>
</AddIn>

160
src/Main/Base/Project/Project/TargetFrameworks/TargetFramework.cs

@ -37,6 +37,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -37,6 +37,7 @@ namespace ICSharpCode.SharpDevelop.Project
public static readonly TargetFramework Net40Client = new DotNet4xClient(Versions.V4_0, RedistLists.Net40Client, DotnetDetection.IsDotnet40Installed);
public static readonly TargetFramework Net45 = new DotNet4x(Versions.V4_5, RedistLists.Net45, DotnetDetection.IsDotnet45Installed);
public static readonly TargetFramework Net451 = new DotNet4x(Versions.V4_5_1, RedistLists.Net45, DotnetDetection.IsDotnet451Installed);
public static readonly TargetFramework Net452 = new DotNet4x(Versions.V4_5_2, RedistLists.Net45, DotnetDetection.IsDotnet452Installed);
/// <summary>
/// Retrieves a target framework by a 'name'.
@ -230,163 +231,4 @@ namespace ICSharpCode.SharpDevelop.Project @@ -230,163 +231,4 @@ namespace ICSharpCode.SharpDevelop.Project
return DisplayName;
}
}
/*
public class TargetFramework
{
public readonly static TargetFramework Net20 = new TargetFramework("v2.0", ".NET Framework 2.0") {
SupportedRuntimeVersion = "v2.0.50727",
MinimumMSBuildVersion = new Version(2, 0),
// .NET 2.0/3.0/3.5 can only be used if .NET 3.5 SP1 is installed
IsAvailable = DotnetDetection.IsDotnet35SP1Installed
};
public readonly static TargetFramework Net30 = new TargetFramework("v3.0", ".NET Framework 3.0") {
SupportedRuntimeVersion = "v2.0.50727",
BasedOn = Net20,
MinimumMSBuildVersion = new Version(3, 5)
};
public readonly static TargetFramework Net35 = new TargetFramework("v3.5", ".NET Framework 3.5") {
SupportedRuntimeVersion = "v2.0.50727",
BasedOn = Net30,
MinimumMSBuildVersion = new Version(3, 5)
};
public readonly static TargetFramework Net35Client = new ClientProfileTargetFramework(Net35) {
RequiresAppConfigEntry = true
};
public readonly static TargetFramework Net40 = new TargetFramework("v4.0", ".NET Framework 4.0") {
BasedOn = Net35,
MinimumMSBuildVersion = new Version(4, 0),
SupportedSku = ".NETFramework,Version=v4.0",
RequiresAppConfigEntry = true,
IsAvailable = DotnetDetection.IsDotnet40Installed
};
public readonly static TargetFramework Net40Client = new ClientProfileTargetFramework(Net40) {
BasedOn = Net35Client
};
public readonly static TargetFramework Net45 = new TargetFramework("v4.5", ".NET Framework 4.5") {
BasedOn = Net40,
MinimumMSBuildVersion = new Version(4, 0),
SupportedRuntimeVersion = "v4.0",
SupportedSku = ".NETFramework,Version=v4.5",
RequiresAppConfigEntry = true,
IsAvailable = DotnetDetection.IsDotnet45Installed
};
public readonly static TargetFramework Net451 = new TargetFramework("v4.5.1", ".NET Framework 4.5.1") {
BasedOn = Net45,
MinimumMSBuildVersion = new Version(4, 0),
SupportedRuntimeVersion = "v4.0",
SupportedSku = ".NETFramework,Version=v4.5.1",
RequiresAppConfigEntry = true,
IsAvailable = DotnetDetection.IsDotnet451Installed
};
public readonly static TargetFramework[] TargetFrameworks = {
Net451, Net45, Net40, Net40Client, Net35, Net35Client, Net30, Net20
};
public readonly static TargetFramework DefaultTargetFramework = Net40Client;
public static TargetFramework GetByName(string name)
{
foreach (TargetFramework tf in TargetFrameworks) {
if (tf.Name == name)
return tf;
}
throw new ArgumentException("No target framework '" + name + "' exists");
}
string name, displayName;
public TargetFramework(string name, string displayName)
{
this.name = name;
this.displayName = displayName;
this.SupportedRuntimeVersion = name;
this.IsAvailable = delegate {
if (this.BasedOn != null)
return this.BasedOn.IsAvailable();
else
return true;
};
}
public string Name {
get { return name; }
}
public string DisplayName {
get { return displayName; }
}
/// <summary>
/// Function that determines if this target framework is available.
/// </summary>
public Func<bool> IsAvailable { get; set; }
/// <summary>
/// Supported runtime version string for app.config
/// </summary>
public string SupportedRuntimeVersion { get; set; }
/// <summary>
/// Supported SKU string for app.config.
/// </summary>
public string SupportedSku { get; set; }
/// <summary>
/// Specifies whether this target framework requires an explicit app.config entry.
/// </summary>
public bool RequiresAppConfigEntry { get; set; }
/// <summary>
/// Gets the minimum MSBuild version required to build projects with this target framework.
/// </summary>
public Version MinimumMSBuildVersion { get; set; }
/// <summary>
/// Gets the previous release of this target framework.
/// </summary>
public TargetFramework BasedOn { get; set; }
public virtual bool IsCompatibleWith(CompilerVersion compilerVersion)
{
return MinimumMSBuildVersion <= compilerVersion.MSBuildVersion;
}
public bool IsBasedOn(TargetFramework potentialBase)
{
TargetFramework tmp = this;
while (tmp != null) {
if (tmp == potentialBase)
return true;
tmp = tmp.BasedOn;
}
return false;
}
public override string ToString()
{
return DisplayName;
}
}
public class ClientProfileTargetFramework : TargetFramework
{
public TargetFramework FullFramework { get; private set; }
public ClientProfileTargetFramework(TargetFramework fullFramework)
: base(fullFramework.Name + "Client", fullFramework.DisplayName + " Client Profile")
{
this.FullFramework = fullFramework;
this.SupportedRuntimeVersion = fullFramework.SupportedRuntimeVersion;
this.MinimumMSBuildVersion = fullFramework.MinimumMSBuildVersion;
this.IsAvailable = fullFramework.IsAvailable;
if (fullFramework.SupportedSku != null)
this.SupportedSku = fullFramework.SupportedSku + ",Profile=Client";
else
this.SupportedSku = "Client";
}
}*/
}

2
src/Main/Base/Project/Resources/CommonAboutDialog.xfrm

@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
<StartPosition value = "CenterScreen"/>
<AcceptButton value = "okButton"/>
<CancelButton value = "okButton"/>
<AutoScaleMode value = "Dpi"/>
<AutoScaleDimensions value = "{Width=96, Height=96}"/>
<Controls>

2
src/Main/Base/Project/Resources/NewFileDialog.xfrm

@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
<MinimizeBox value="False" />
<MinimumSize value="350, 190" />
<MaximizeBox value="False" />
<AutoScaleMode value="Dpi" />
<AutoScaleDimensions value="{Width=96, Height=96}" />
<ShowInTaskbar value="False" />
<Text value="${res:Dialog.NewFile.DialogName}" />
<ClientSize value="{Width=510, Height=366}" />

2
src/Main/Base/Project/Resources/NewFileWithNameDialog.xfrm

@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
<MinimumSize value="350, 200" />
<MinimizeBox value="False" />
<MaximizeBox value="False" />
<AutoScaleMode value="Dpi" />
<AutoScaleDimensions value="{Width=96, Height=96}" />
<ShowInTaskbar value="False" />
<Text value="${res:Dialog.NewFile.DialogName}" />
<ClientSize value="{Width=542, Height=372}" />

6
src/Main/Base/Project/Util/DotnetDetection.cs

@ -61,6 +61,12 @@ namespace ICSharpCode.SharpDevelop @@ -61,6 +61,12 @@ namespace ICSharpCode.SharpDevelop
return GetDotnet4Release() >= 378675;
}
public static bool IsDotnet452Installed()
{
// 379893 is .NET 4.5.2 on my Win7 machine
return GetDotnet4Release() >= 379893;
}
static int? GetDotnet4Release()
{
using (var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full")) {

1
src/Main/Base/Project/Util/Versions.cs

@ -31,5 +31,6 @@ namespace ICSharpCode.SharpDevelop @@ -31,5 +31,6 @@ namespace ICSharpCode.SharpDevelop
public static readonly Version V4_0 = new Version(4, 0);
public static readonly Version V4_5 = new Version(4, 5);
public static readonly Version V4_5_1 = new Version(4, 5, 1);
public static readonly Version V4_5_2 = new Version(4, 5, 2);
}
}

2
src/Main/ICSharpCode.Core.WinForms/MessageService/CustomDialog.cs

@ -155,6 +155,8 @@ namespace ICSharpCode.Core.WinForms @@ -155,6 +155,8 @@ namespace ICSharpCode.Core.WinForms
this.KeyPreview = true;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "CustomDialog";
this.AutoScaleMode = AutoScaleMode.Dpi;
this.AutoScaleDimensions = new SizeF(96, 96);
}
}
}

3
src/Main/SharpDevelop/Logging/ExceptionBox.cs

@ -333,11 +333,14 @@ namespace ICSharpCode.SharpDevelop.Logging @@ -333,11 +333,14 @@ namespace ICSharpCode.SharpDevelop.Logging
this.pictureBox.Location = new System.Drawing.Point(0, 0);
this.pictureBox.Name = "pictureBox";
this.pictureBox.Size = new System.Drawing.Size(224, 464);
this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox.TabIndex = 0;
this.pictureBox.TabStop = false;
//
// ExceptionBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(688, 453);
this.Controls.Add(this.closeButton);
this.Controls.Add(this.label3);

3
src/Main/SharpDevelop/Parser/AssemblyParserService.cs

@ -235,7 +235,8 @@ namespace ICSharpCode.SharpDevelop.Parser @@ -235,7 +235,8 @@ namespace ICSharpCode.SharpDevelop.Parser
break;
case TargetRuntime.Net_4_0:
default:
xmlFileName = LookupLocalizedXmlDoc(Path.Combine(referenceAssembliesPath, @".NETFramework\v4.5.1", name))
xmlFileName = LookupLocalizedXmlDoc(Path.Combine(referenceAssembliesPath, @".NETFramework\v4.5.2", name))
?? LookupLocalizedXmlDoc(Path.Combine(referenceAssembliesPath, @".NETFramework\v4.5.1", name))
?? LookupLocalizedXmlDoc(Path.Combine(referenceAssembliesPath, @".NETFramework\v4.5", name))
?? LookupLocalizedXmlDoc(Path.Combine(referenceAssembliesPath, @".NETFramework\v4.0", name))
?? LookupLocalizedXmlDoc(Path.Combine(frameworkPath, "v4.0.30319", name));

1
src/Main/SharpDevelop/Project/Solution.cs

@ -325,6 +325,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -325,6 +325,7 @@ namespace ICSharpCode.SharpDevelop.Project
sdSettings.Save(sdSettingsFileName);
}
} catch (IOException) {
} catch (UnauthorizedAccessException) {
// ignore errors writing to extra properties
}
}

6
src/Main/SharpDevelop/Startup/SplashScreen.cs

@ -104,8 +104,10 @@ namespace ICSharpCode.SharpDevelop.Startup @@ -104,8 +104,10 @@ namespace ICSharpCode.SharpDevelop.Startup
}
string param = arg.Substring(markerLength);
// work around .NET "feature" that causes trouble with /addindir:"c:\temp\"
// http://www.mobzystems.com/code/bugingetcommandlineargs.aspx
// The SharpDevelop AddIn project template uses /addindir:"c:\temp\"
// but that actually means the last quote is escaped.
// This HACK makes this work anyways by replacing the trailing quote
// with a backslash:
if (param.EndsWith("\"", StringComparison.Ordinal))
param = param.Substring(0, param.Length - 1) + "\\";
parameterList.Add(param);

12
src/Main/SharpDevelop/Templates/Project/ProjectDescriptor.cs

@ -426,15 +426,9 @@ namespace ICSharpCode.SharpDevelop.Templates @@ -426,15 +426,9 @@ namespace ICSharpCode.SharpDevelop.Templates
}
#endregion
#region Create Project
try {
info.InitializeTypeSystem = false;
project = languageinfo.CreateProject(info);
} catch (ProjectLoadException ex) {
MessageService.ShowError(ex.Message);
return false;
}
#endregion
// Create Project
info.InitializeTypeSystem = false;
project = languageinfo.CreateProject(info);
#region Create Project Items, Imports and Files
// Add Project items

4
src/Main/SharpDevelop/app.template.config

@ -85,6 +85,10 @@ @@ -85,6 +85,10 @@
<!-- Use this setting to disable the code completion cache. Code completion will still be
available, but take longer to load and use more RAM. -->
<!-- <add key="domPersistencePath" value="none" /> -->
<!-- Tell WinForms to resize some components based on system DPI.
Only has an effect with .NET 4.5.2 or higher. -->
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
<log4net>
<!-- Writes to the console. The console is only visible in debug builds of SharpDevelop. -->

Loading…
Cancel
Save