Browse Source

SharpDevelop now passes properties so that MSBuild accepts them for both the scanning and building steps -> compiling Boo and ILAsm applications and specifying the target Framework version in C# works again.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@644 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
eb93ff4149
  1. 1
      src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj
  2. 8
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/DeclarationViewWindow.cs
  3. 1
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs
  4. 3
      src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/FusionNative.cs
  5. 16
      src/Main/Base/Project/Src/Project/MSBuildEngine.cs

1
src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj

@ -120,7 +120,6 @@
<Name>NRefactoryToBooConverter</Name> <Name>NRefactoryToBooConverter</Name>
<Private>True</Private> <Private>True</Private>
</ProjectReference> </ProjectReference>
<Content Include="PostBuildEvent.bat" />
<ProjectReference Include="..\..\..\..\DisplayBindings\FormDesigner\Project\FormDesigner.csproj"> <ProjectReference Include="..\..\..\..\DisplayBindings\FormDesigner\Project\FormDesigner.csproj">
<Project>{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}</Project> <Project>{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}</Project>
<Name>FormDesigner</Name> <Name>FormDesigner</Name>

8
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/DeclarationViewWindow.cs

@ -48,6 +48,8 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow
} }
} }
public bool HideOnClick;
public DeclarationViewWindow(Form parent) public DeclarationViewWindow(Form parent)
{ {
SetStyle(ControlStyles.Selectable, false); SetStyle(ControlStyles.Selectable, false);
@ -59,6 +61,12 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow
base.CreateHandle(); base.CreateHandle();
} }
protected override void OnClick(EventArgs e)
{
base.OnClick(e);
if (HideOnClick) Hide();
}
public void ShowDeclarationViewWindow() public void ShowDeclarationViewWindow()
{ {
AbstractCompletionWindow.ShowWindowWithoutFocus(this); AbstractCompletionWindow.ShowWindowWithoutFocus(this);

1
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextArea.cs

@ -320,6 +320,7 @@ namespace ICSharpCode.TextEditor
p.Offset(3, 3); p.Offset(3, 3);
toolTip.Location = p; toolTip.Location = p;
toolTip.Description = text; toolTip.Description = text;
toolTip.HideOnClick = true;
toolTip.Show(); toolTip.Show();
} }
oldToolTip = text; oldToolTip = text;

3
src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/FusionNative.cs

@ -8,6 +8,7 @@
using System; using System;
using System.Text; using System.Text;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace MSjogren.GacTool.FusionNative namespace MSjogren.GacTool.FusionNative
{ {
@ -47,7 +48,7 @@ namespace MSjogren.GacTool.FusionNative
uint dwFormat, uint dwFormat,
uint dwFlags, uint dwFlags,
uint dwMaxSize, uint dwMaxSize,
out UCOMIStream ppStream); out IStream ppStream);
void IsNameEqual(IAssemblyName pName); void IsNameEqual(IAssemblyName pName);

16
src/Main/Base/Project/Src/Project/MSBuildEngine.cs

@ -107,22 +107,16 @@ namespace ICSharpCode.SharpDevelop.Project
{ {
LoggingService.Debug("Run MSBuild on " + buildFile); LoggingService.Debug("Run MSBuild on " + buildFile);
// HACK: Workaround for MSBuild bug: Engine engine = new Engine(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory());
// "unknown" MSBuild projects (projects with unknown type id, e.g. IL-projects)
// are looked up by MSBuild if the project files are MSBuild-compatible.
// That lookup method has a bug: it uses the working directory instead of the
// solution directory as base path for the lookup.
Environment.CurrentDirectory = Path.GetDirectoryName(buildFile);
BuildPropertyGroup properties = new BuildPropertyGroup();
foreach (KeyValuePair<string, string> entry in MsBuildProperties) { foreach (KeyValuePair<string, string> entry in MsBuildProperties) {
properties.SetProperty(entry.Key, entry.Value); engine.GlobalProperties.SetProperty(entry.Key, entry.Value);
} }
Engine engine = new Engine(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory());
SharpDevelopLogger logger = new SharpDevelopLogger(this.engine, results); SharpDevelopLogger logger = new SharpDevelopLogger(this.engine, results);
engine.RegisterLogger(logger); engine.RegisterLogger(logger);
engine.BuildProjectFile(buildFile, targets, properties, null); // IMPORTANT: engine.GlobalProperties must be passed here.
// The properties must be available for both the scanning and building steps
engine.BuildProjectFile(buildFile, targets, engine.GlobalProperties);
LoggingService.Debug("MSBuild finished"); LoggingService.Debug("MSBuild finished");
} }

Loading…
Cancel
Save