Browse Source

Make project conversion from MSBuild 2.0 to 3.5 explicit using a button in the project options.

Remove .NET 1.x compilation support. Remove .NET CF 1.0 compilation support.
Newly created projects for start as MSBuild 3.5 projects.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2728 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
25bc869822
  1. 268
      src/AddIns/BackendBindings/CSharpBinding/Project/Resources/BuildOptions.xfrm
  2. 2
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs
  3. 7
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs
  4. 250
      src/AddIns/BackendBindings/VBNetBinding/Project/Resources/BuildOptions.xfrm
  5. 2
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/BuildOptions.cs
  6. 7
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs
  7. 1
      src/AddIns/DisplayBindings/ResourceEditor/Project/Src/DisplayDefinition.cs
  8. 81
      src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.CSharp.targets
  9. 165
      src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets
  10. 7
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  11. 58
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs
  12. 139
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ConvertToMSBuild35Dialog.Designer.cs
  13. 45
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ConvertToMSBuild35Dialog.cs
  14. 120
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ConvertToMSBuild35Dialog.resx
  15. 51
      src/Main/Base/Project/Src/Project/CompilableProject.cs
  16. 9
      src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs
  17. 4
      src/Main/Base/Project/Src/Project/MSBuildEngine.cs

268
src/AddIns/BackendBindings/CSharpBinding/Project/Resources/BuildOptions.xfrm

@ -6,238 +6,246 @@ @@ -6,238 +6,246 @@
<Controls>
<System.Windows.Forms.GroupBox>
<Name value="generalGroupBox" />
<Location value="{X=3,Y=3}" />
<Anchor value="Top, Left, Right" />
<Location value="3, 3" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=504, Height=146}" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.General}" />
<Size value="504, 146" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<Controls>
<System.Windows.Forms.Label>
<Name value="conditionalSymbolsLabel" />
<Location value="{X=6,Y=16}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 16" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=492, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.ConditionalSymbols}" />
<Size value="492, 16" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.ConditionalSymbols}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="conditionalSymbolsTextBox" />
<Location value="{X=6,Y=36}" />
<Size value="{Width=492, Height=21}" />
<TabIndex value="1" />
<Location value="6, 36" />
<Anchor value="Top, Left, Right" />
<Size value="492, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.CheckBox>
<Name value="optimizeCodeCheckBox" />
<Size value="{Width=492, Height=21}" />
<Location value="{X=6,Y=60}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 60" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.OptimizeCode}" />
<TabIndex value="2" />
<Size value="492, 21" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="allowUnsafeCodeCheckBox" />
<Size value="{Width=492, Height=21}" />
<Location value="{X=6,Y=80}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 80" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.AllowUnsafeCode}" />
<TabIndex value="3" />
<Size value="492, 21" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="checkForOverflowCheckBox" />
<Size value="{Width=492, Height=21}" />
<Location value="{X=6,Y=100}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 100" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.CheckForOverflow}" />
<TabIndex value="4" />
<Size value="492, 21" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="noCorlibCheckBox" />
<Size value="{Width=492, Height=21}" />
<Location value="{X=6,Y=120}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 120" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.NoCorlib}" />
<TabIndex value="5" />
<Size value="492, 21" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox>
<Name value="outputGroupBox" />
<Location value="{X=3,Y=152}" />
<Anchor value="Top, Left, Right" />
<Location value="3, 152" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=504, Height=362}" />
<TabIndex value="1" />
<Text value="${res:Dialog.ProjectOptions.Build.Output}" />
<Size value="504, 362" />
<Anchor value="Top, Left, Right" />
<TabIndex value="1" />
<Controls>
<System.Windows.Forms.Button>
<Name value="convertProjectToMSBuild35Button" />
<Location value="316, 107" />
<Text value="Convert project to C# 3.0..." />
<UseVisualStyleBackColor value="True" />
<Size value="173, 23" />
<TabIndex value="12" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Label>
<Name value="outputPathLabel" />
<Location value="{X=12,Y=17}" />
<Anchor value="Top, Left, Right" />
<Location value="12, 17" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=492, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.OutputPath}" />
<Size value="492, 16" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="3" />
<Text value="${res:Dialog.ProjectOptions.Build.OutputPath}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="outputPathTextBox" />
<Location value="{X=12,Y=37}" />
<Size value="{Width=448, Height=21}" />
<TabIndex value="4" />
<Location value="12, 37" />
<Anchor value="Top, Left, Right" />
<Size value="448, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Button>
<Name value="outputPathBrowseButton" />
<Location value="{X=464,Y=37}" />
<Anchor value="Top, Right" />
<Location value="464, 37" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=40, Height=21}" />
<TabIndex value="5" />
<Text value="..." />
<Size value="40, 21" />
<Anchor value="Top, Right" />
<TabIndex value="5" />
</System.Windows.Forms.Button>
<System.Windows.Forms.CheckBox>
<Name value="xmlDocumentationCheckBox" />
<Size value="{Width=154, Height=21}" />
<Location value="{X=12,Y=61}" />
<Location value="12, 61" />
<Text value="${res:Dialog.ProjectOptions.Build.XmlDocumentationFile}" />
<TabIndex value="6" />
<Size value="154, 21" />
<UseCompatibleTextRendering value="True" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.TextBox>
<Name value="xmlDocumentationTextBox" />
<Location value="{X=170,Y=61}" />
<Size value="{Width=333, Height=21}" />
<TabIndex value="7" />
<Location value="170, 61" />
<Anchor value="Top, Left, Right" />
<Size value="333, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="debugInfoLabel" />
<Location value="{X=12,Y=85}" />
<Location value="12, 85" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=154, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.DebugInfo}" />
<Size value="154, 16" />
<TextAlign value="MiddleRight" />
<TabIndex value="8" />
<Text value="${res:Dialog.ProjectOptions.Build.DebugInfo}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="debugInfoComboBox" />
<Location value="{X=170,Y=85}" />
<TabIndex value="9" />
<Size value="{Width=140, Height=21}" />
<Location value="170, 85" />
<Size value="140, 21" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="targetFrameworkLabel" />
<Location value="{X=12,Y=109}" />
<Location value="12, 109" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=154, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.TargetFramework}" />
<Size value="154, 16" />
<TextAlign value="MiddleRight" />
<TabIndex value="10" />
<Text value="${res:Dialog.ProjectOptions.Build.TargetFramework}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="targetFrameworkComboBox" />
<Location value="{X=170,Y=109}" />
<TabIndex value="11" />
<Size value="{Width=140, Height=21}" />
<Location value="170, 109" />
<Size value="140, 21" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.GroupBox>
<Name value="advancedOutputGroupBox" />
<Location value="{X=6,Y=136}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 136" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=492, Height=220}" />
<TabIndex value="9" />
<Text value="${res:Dialog.ProjectOptions.Build.Advanced}" />
<Size value="492, 220" />
<Anchor value="Top, Left, Right" />
<TabIndex value="9" />
<Controls>
<System.Windows.Forms.Panel>
<Name value="platformSpecificOptionsPanel" />
<Location value="{X=6,Y=14}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=480, Height=121}" />
<Location value="6, 14" />
<TabIndex value="9" />
<Size value="480, 121" />
<Anchor value="Top, Left, Right" />
<Controls>
<System.Windows.Forms.Label>
<Name value="generateSerializationAssemblyLabel" />
<Location value="{X=3,Y=23}" />
<Location value="3, 23" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=180, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.GenerateSerializationAssembly}" />
<Size value="180, 16" />
<TextAlign value="MiddleRight" />
<TabIndex value="1" />
<Text value="${res:Dialog.ProjectOptions.Build.GenerateSerializationAssembly}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="dllBaseAddressTextBox" />
<Location value="{X=189,Y=95}" />
<Size value="{Width=140, Height=21}" />
<TabIndex value="8" />
<Location value="189, 95" />
<Size value="140, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="dllBaseAddressLabel" />
<Location value="{X=3,Y=95}" />
<Location value="3, 95" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=180, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.DLLBaseAddress}" />
<Size value="180, 16" />
<TextAlign value="MiddleRight" />
<TabIndex value="7" />
<Text value="${res:Dialog.ProjectOptions.Build.DLLBaseAddress}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="registerCOMInteropCheckBox" />
<Size value="{Width=300, Height=21}" />
<Location value="{X=177,Y=1}" />
<Anchor value="Top, Left, Right" />
<Location value="177, 1" />
<Text value="${res:Dialog.ProjectOptions.Build.RegisterForCOM}" />
<TabIndex value="0" />
<Size value="300, 21" />
<UseCompatibleTextRendering value="True" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.ComboBox>
<Name value="fileAlignmentComboBox" />
<Location value="{X=189,Y=71}" />
<TabIndex value="6" />
<Size value="{Width=180, Height=21}" />
<Location value="189, 71" />
<Size value="180, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="fileAlignmentLabel" />
<Location value="{X=3,Y=71}" />
<Location value="3, 71" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=180, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.FileAlignment}" />
<Size value="180, 16" />
<TextAlign value="MiddleRight" />
<TabIndex value="5" />
<Text value="${res:Dialog.ProjectOptions.Build.FileAlignment}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="targetCpuComboBox" />
<Location value="{X=189,Y=47}" />
<TabIndex value="4" />
<Size value="{Width=180, Height=21}" />
<Location value="189, 47" />
<Size value="180, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="targetCpuLabel" />
<Location value="{X=3,Y=47}" />
<Location value="3, 47" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=180, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.TargetCPU}" />
<Size value="180, 16" />
<TextAlign value="MiddleRight" />
<TabIndex value="3" />
<Text value="${res:Dialog.ProjectOptions.Build.TargetCPU}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="generateSerializationAssemblyComboBox" />
<Location value="{X=189,Y=23}" />
<TabIndex value="2" />
<Size value="{Width=180, Height=21}" />
<Location value="189, 23" />
<Size value="180, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
@ -245,55 +253,55 @@ @@ -245,55 +253,55 @@
</System.Windows.Forms.Panel>
<System.Windows.Forms.Label>
<Name value="baseIntermediateOutputPathLabel" />
<Location value="{X=6,Y=134}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 134" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=480, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.BaseIntermediateOutputPath}" />
<Size value="480, 16" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.Build.BaseIntermediateOutputPath}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="baseIntermediateOutputPathTextBox" />
<Location value="{X=6,Y=153}" />
<Size value="{Width=429, Height=21}" />
<TabIndex value="1" />
<Location value="6, 153" />
<Anchor value="Top, Left, Right" />
<Size value="429, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Button>
<Name value="baseIntermediateOutputPathBrowseButton" />
<Location value="{X=446,Y=153}" />
<Anchor value="Top, Right" />
<Location value="446, 153" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=40, Height=21}" />
<TabIndex value="2" />
<Text value="..." />
<Size value="40, 21" />
<Anchor value="Top, Right" />
<TabIndex value="2" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Label>
<Name value="intermediateOutputPathLabel" />
<Location value="{X=6,Y=177}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 177" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=480, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.IntermediateOutputPath}" />
<Size value="480, 16" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.Build.IntermediateOutputPath}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="intermediateOutputPathTextBox" />
<Location value="{X=6,Y=193}" />
<Size value="{Width=429, Height=21}" />
<TabIndex value="1" />
<Location value="6, 193" />
<Anchor value="Top, Left, Right" />
<Size value="429, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Button>
<Name value="intermediateOutputPathBrowseButton" />
<Location value="{X=446,Y=192}" />
<Anchor value="Top, Right" />
<Location value="446, 192" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=40, Height=21}" />
<TabIndex value="2" />
<Text value="..." />
<Size value="40, 21" />
<Anchor value="Top, Right" />
<TabIndex value="2" />
</System.Windows.Forms.Button>
</Controls>
</System.Windows.Forms.GroupBox>
@ -301,90 +309,90 @@ @@ -301,90 +309,90 @@
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox>
<Name value="warningsGroupBox" />
<Location value="{X=3,Y=518}" />
<Anchor value="Top, Left, Right" />
<Location value="3, 518" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=504, Height=66}" />
<TabIndex value="2" />
<Text value="${res:Dialog.ProjectOptions.Build.ErrorsAndWarnings}" />
<Size value="504, 66" />
<Anchor value="Top, Left, Right" />
<TabIndex value="2" />
<Controls>
<System.Windows.Forms.Label>
<Name value="warningLevelLabel" />
<Location value="{X=6,Y=16}" />
<Location value="6, 16" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=154, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.WarningLevel}" />
<Size value="154, 16" />
<TextAlign value="MiddleRight" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.Build.WarningLevel}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="warningLevelComboBox" />
<Location value="{X=164,Y=16}" />
<TabIndex value="1" />
<Size value="{Width=60, Height=21}" />
<Location value="164, 16" />
<Size value="60, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="suppressWarningsLabel" />
<Location value="{X=6,Y=40}" />
<Location value="6, 40" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=154, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.SuppressWarnings}" />
<Size value="154, 16" />
<TextAlign value="MiddleRight" />
<TabIndex value="2" />
<Text value="${res:Dialog.ProjectOptions.Build.SuppressWarnings}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="suppressWarningsTextBox" />
<Location value="{X=164,Y=40}" />
<Size value="{Width=333, Height=21}" />
<TabIndex value="3" />
<Location value="164, 40" />
<Anchor value="Top, Left, Right" />
<Size value="333, 20" />
</System.Windows.Forms.TextBox>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox>
<Name value="treatWarningsAsErrorsGroupBox" />
<Location value="{X=3,Y=588}" />
<Anchor value="Top, Left, Right" />
<Location value="3, 588" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=504, Height=92}" />
<TabIndex value="3" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors}" />
<Size value="504, 92" />
<Anchor value="Top, Left, Right" />
<TabIndex value="3" />
<Controls>
<System.Windows.Forms.RadioButton>
<Name value="noneRadioButton" />
<Location value="{X=6,Y=20}" />
<Location value="6, 20" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=154, Height=21}" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.None}" />
<Size value="154, 21" />
<TabIndex value="0" />
</System.Windows.Forms.RadioButton>
<System.Windows.Forms.RadioButton>
<Name value="specificWarningsRadioButton" />
<Location value="{X=6,Y=42}" />
<Location value="6, 42" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=154, Height=21}" />
<TabIndex value="1" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.Specific}" />
<Size value="154, 21" />
<TabIndex value="1" />
</System.Windows.Forms.RadioButton>
<System.Windows.Forms.RadioButton>
<Name value="allRadioButton" />
<Location value="{X=6,Y=65}" />
<Location value="6, 65" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=154, Height=21}" />
<TabIndex value="3" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.All}" />
<Size value="154, 21" />
<TabIndex value="3" />
</System.Windows.Forms.RadioButton>
<System.Windows.Forms.TextBox>
<Name value="specificWarningsTextBox" />
<Location value="{X=164,Y=42}" />
<Size value="{Width=334, Height=21}" />
<TabIndex value="2" />
<Location value="164, 42" />
<Anchor value="Top, Left, Right" />
<Size value="334, 20" />
</System.Windows.Forms.TextBox>
</Controls>
</System.Windows.Forms.GroupBox>
</Controls>
</System.Windows.Forms.UserControl>
</Components>
</Components>

2
src/AddIns/BackendBindings/CSharpBinding/Project/Src/OptionPanels/BuildOptions.cs

@ -24,7 +24,7 @@ namespace CSharpBinding.OptionPanels @@ -24,7 +24,7 @@ namespace CSharpBinding.OptionPanels
InitOutputPath();
InitXmlDoc();
InitTargetFramework(CSharpProject.DefaultTargetsFile,
@"$(SharpDevelopBinPath)\SharpDevelop.Build.CSharp.targets");
CSharpProject.ExtendedTargetsFile);
ConfigurationGuiBinding b;

7
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs

@ -59,6 +59,7 @@ namespace CSharpBinding @@ -59,6 +59,7 @@ namespace CSharpBinding
}
public const string DefaultTargetsFile = @"$(MSBuildBinPath)\Microsoft.CSharp.Targets";
public const string ExtendedTargetsFile = @"$(SharpDevelopBinPath)\SharpDevelop.Build.CSharp.targets";
protected override void Create(ProjectCreateInformation information)
{
@ -95,5 +96,11 @@ namespace CSharpBinding @@ -95,5 +96,11 @@ namespace CSharpBinding
base.StartBuild(options, feedbackSink);
}
}
public override void ConvertToMSBuild35(bool changeTargetFrameworkToNet35)
{
base.ConvertToMSBuild35(changeTargetFrameworkToNet35);
ConvertToMSBuild35(changeTargetFrameworkToNet35, DefaultTargetsFile, ExtendedTargetsFile);
}
}
}

250
src/AddIns/BackendBindings/VBNetBinding/Project/Resources/BuildOptions.xfrm

@ -6,360 +6,368 @@ @@ -6,360 +6,368 @@
<Controls>
<System.Windows.Forms.GroupBox>
<Name value="generalGroupBox" />
<Location value="{X=3,Y=3}" />
<Location value="3, 3" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.General}" />
<Size value="521, 152" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=521, Height=152}" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.General}" />
<Controls>
<System.Windows.Forms.ComboBox>
<Name value="optionCompareComboBox" />
<Location value="{X=317,Y=125}" />
<TabIndex value="7" />
<Size value="{Width=132, Height=21}" />
<Location value="317, 125" />
<Size value="132, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.ComboBox>
<Name value="optionStrictComboBox" />
<Location value="{X=179,Y=125}" />
<TabIndex value="6" />
<Size value="{Width=132, Height=21}" />
<Location value="179, 125" />
<Size value="132, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.ComboBox>
<Name value="optionExplicitComboBox" />
<Location value="{X=13,Y=125}" />
<TabIndex value="5" />
<Size value="{Width=160, Height=21}" />
<Location value="13, 125" />
<Size value="160, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label10" />
<Location value="{X=6,Y=111}" />
<Size value="{Width=218, Height=23}" />
<TabIndex value="4" />
<Location value="6, 111" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.VBOptionsDefaultValues}" />
<Size value="218, 23" />
<TabIndex value="4" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="removeOverflowCheckBox" />
<Size value="{Width=502, Height=24}" />
<Location value="{X=12,Y=84}" />
<Location value="12, 84" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.RemoveOverflowChecks}" />
<TabIndex value="3" />
<Size value="502, 24" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.Label>
<Name value="label1" />
<Location value="{X=6,Y=17}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=470, Height=16}" />
<Location value="6, 17" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.ConditionalSymbols}" />
<Size value="470, 16" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.ConditionalSymbols}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="conditionalSymbolsTextBox" />
<Location value="{X=13,Y=36}" />
<Size value="{Width=502, Height=21}" />
<TabIndex value="1" />
<Location value="13, 36" />
<Anchor value="Top, Left, Right" />
<Size value="502, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.CheckBox>
<Name value="optimizeCodeCheckBox" />
<Size value="{Width=502, Height=24}" />
<Location value="{X=13,Y=64}" />
<AccessibleRole value="None" />
<Anchor value="Top, Left, Right" />
<Location value="13, 64" />
<Text value="${res:Dialog.ProjectOptions.BuildOptions.OptimizeCode}" />
<TabIndex value="2" />
<Size value="502, 24" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox>
<Name value="groupBox3" />
<Location value="{X=3,Y=161}" />
<Location value="3, 161" />
<Text value="${res:Dialog.ProjectOptions.Build.Output}" />
<Size value="521, 363" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=521, Height=363}" />
<TabIndex value="1" />
<Text value="${res:Dialog.ProjectOptions.Build.Output}" />
<Controls>
<System.Windows.Forms.Button>
<Name value="convertProjectToMSBuild35Button" />
<Location value="291, 113" />
<Text value="Convert project to VB 9..." />
<UseVisualStyleBackColor value="True" />
<Size value="179, 23" />
<TabIndex value="10" />
</System.Windows.Forms.Button>
<System.Windows.Forms.GroupBox>
<Name value="advancedOutputGroupBox" />
<Location value="{X=6,Y=142}" />
<Location value="6, 142" />
<Text value="${res:Dialog.ProjectOptions.Build.Advanced}" />
<Size value="505, 215" />
<Anchor value="Top, Bottom, Left, Right" />
<Size value="{Width=505, Height=215}" />
<TabIndex value="9" />
<Text value="${res:Dialog.ProjectOptions.Build.Advanced}" />
<Controls>
<System.Windows.Forms.Panel>
<Name value="platformSpecificOptionsPanel" />
<Location value="{X=7,Y=17}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=492, Height=106}" />
<Location value="7, 17" />
<TabIndex value="7" />
<Size value="492, 106" />
<Anchor value="Top, Left, Right" />
<Controls>
<System.Windows.Forms.Label>
<Name value="label2" />
<Location value="{X=3,Y=27}" />
<Size value="{Width=181, Height=20}" />
<Location value="3, 27" />
<Text value="${res:Dialog.ProjectOptions.Build.GenerateSerializationAssembly}" />
<Size value="181, 20" />
<TextAlign value="MiddleRight" />
<TabIndex value="1" />
<Text value="${res:Dialog.ProjectOptions.Build.GenerateSerializationAssembly}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="targetCpuComboBox" />
<Location value="{X=190,Y=55}" />
<TabIndex value="4" />
<Size value="{Width=171, Height=21}" />
<Location value="190, 55" />
<Size value="171, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.ComboBox>
<Name value="generateSerializationAssemblyComboBox" />
<Location value="{X=190,Y=28}" />
<TabIndex value="2" />
<Size value="{Width=171, Height=21}" />
<Location value="190, 28" />
<Size value="171, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label9" />
<Location value="{X=3,Y=53}" />
<Size value="{Width=181, Height=23}" />
<Location value="3, 53" />
<Text value="${res:Dialog.ProjectOptions.Build.TargetCPU}" />
<Size value="181, 23" />
<TextAlign value="MiddleRight" />
<TabIndex value="3" />
<Text value="${res:Dialog.ProjectOptions.Build.TargetCPU}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="registerCOMInteropCheckBox" />
<Size value="{Width=320, Height=20}" />
<Location value="{X=172,Y=2}" />
<Anchor value="Top, Left, Right" />
<Location value="172, 2" />
<Text value="${res:Dialog.ProjectOptions.Build.RegisterForCOM}" />
<TabIndex value="0" />
<Size value="320, 20" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.TextBox>
<Name value="dllBaseAddressTextBox" />
<Location value="{X=190,Y=80}" />
<Size value="{Width=171, Height=21}" />
<TabIndex value="6" />
<Location value="190, 80" />
<Size value="171, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label8" />
<Location value="{X=4,Y=80}" />
<Size value="{Width=180, Height=23}" />
<Location value="4, 80" />
<Text value="${res:Dialog.ProjectOptions.Build.DLLBaseAddress}" />
<Size value="180, 23" />
<TextAlign value="MiddleRight" />
<TabIndex value="5" />
<Text value="${res:Dialog.ProjectOptions.Build.DLLBaseAddress}" />
</System.Windows.Forms.Label>
</Controls>
</System.Windows.Forms.Panel>
<System.Windows.Forms.Label>
<Name value="baseIntermediateOutputPathLabel" />
<Location value="{X=6,Y=129}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 129" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=480, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.BaseIntermediateOutputPath}" />
<Size value="480, 16" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.Build.BaseIntermediateOutputPath}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="baseIntermediateOutputPathTextBox" />
<Location value="{X=7,Y=148}" />
<Size value="{Width=429, Height=21}" />
<TabIndex value="1" />
<Location value="7, 148" />
<Anchor value="Top, Left, Right" />
<Size value="429, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Button>
<Name value="baseIntermediateOutputPathBrowseButton" />
<Location value="{X=447,Y=148}" />
<Anchor value="Top, Right" />
<Location value="447, 148" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=40, Height=21}" />
<TabIndex value="2" />
<Text value="..." />
<Size value="40, 21" />
<Anchor value="Top, Right" />
<TabIndex value="2" />
</System.Windows.Forms.Button>
<System.Windows.Forms.Label>
<Name value="intermediateOutputPathLabel" />
<Location value="{X=6,Y=172}" />
<Anchor value="Top, Left, Right" />
<Location value="6, 172" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=480, Height=16}" />
<Text value="${res:Dialog.ProjectOptions.Build.IntermediateOutputPath}" />
<Size value="480, 16" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.Build.IntermediateOutputPath}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="intermediateOutputPathTextBox" />
<Location value="{X=6,Y=188}" />
<Size value="{Width=429, Height=21}" />
<TabIndex value="1" />
<Location value="6, 188" />
<Anchor value="Top, Left, Right" />
<Size value="429, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Button>
<Name value="intermediateOutputPathBrowseButton" />
<Location value="{X=446,Y=187}" />
<Anchor value="Top, Right" />
<Location value="446, 187" />
<UseCompatibleTextRendering value="True" />
<Size value="{Width=40, Height=21}" />
<TabIndex value="2" />
<Text value="..." />
<Size value="40, 21" />
<Anchor value="Top, Right" />
<TabIndex value="2" />
</System.Windows.Forms.Button>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.ComboBox>
<Name value="targetFrameworkComboBox" />
<Location value="{X=164,Y=115}" />
<TabIndex value="8" />
<Size value="{Width=121, Height=21}" />
<Location value="164, 115" />
<Size value="121, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="targetFrameworkLabel" />
<Location value="{X=13,Y=115}" />
<Size value="{Width=150, Height=20}" />
<TabIndex value="7" />
<Location value="13, 115" />
<Text value="${res:Dialog.ProjectOptions.Build.TargetFramework}" />
<Size value="150, 20" />
<TabIndex value="7" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="debugInfoComboBox" />
<Location value="{X=164,Y=88}" />
<TabIndex value="6" />
<Size value="{Width=121, Height=21}" />
<Location value="164, 88" />
<Size value="121, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="debugInfoLabel" />
<Location value="{X=13,Y=88}" />
<Size value="{Width=145, Height=23}" />
<Location value="13, 88" />
<Text value="${res:Dialog.ProjectOptions.Build.DebugInfo}" />
<Size value="145, 23" />
<TextAlign value="MiddleRight" />
<TabIndex value="5" />
<Text value="${res:Dialog.ProjectOptions.Build.DebugInfo}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.CheckBox>
<Name value="xmlDocumentationCheckBox" />
<Size value="{Width=151, Height=20}" />
<Location value="{X=13,Y=63}" />
<Location value="13, 63" />
<Text value="${res:Dialog.ProjectOptions.Build.XmlDocumentationFile}" />
<TabIndex value="3" />
<Size value="151, 20" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.TextBox>
<Name value="xmlDocumentationTextBox" />
<Location value="{X=164,Y=62}" />
<Size value="{Width=351, Height=21}" />
<TabIndex value="4" />
<Location value="164, 62" />
<Anchor value="Top, Left, Right" />
<Size value="351, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label5" />
<Location value="{X=6,Y=17}" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=505, Height=16}" />
<Location value="6, 17" />
<Text value="${res:Dialog.ProjectOptions.Build.OutputPath}" />
<Size value="505, 16" />
<TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.Build.OutputPath}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.TextBox>
<Name value="outputPathTextBox" />
<Location value="{X=13,Y=36}" />
<Size value="{Width=457, Height=21}" />
<TabIndex value="1" />
<Location value="13, 36" />
<Anchor value="Top, Left, Right" />
<Size value="457, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Button>
<Name value="outputPathBrowseButton" />
<Location value="{X=475,Y=36}" />
<Location value="475, 36" />
<Text value="..." />
<Size value="40, 21" />
<Anchor value="Top, Right" />
<Size value="{Width=40, Height=21}" />
<TabIndex value="2" />
<Text value="..." />
</System.Windows.Forms.Button>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox>
<Name value="treatWarningsAsErrorsGroupBox" />
<Location value="{X=3,Y=612}" />
<Location value="3, 612" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors}" />
<Size value="521, 100" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=521, Height=100}" />
<TabIndex value="3" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors}" />
<Controls>
<System.Windows.Forms.TextBox>
<Name value="specificWarningsTextBox" />
<Location value="{X=136,Y=44}" />
<Size value="{Width=377, Height=21}" />
<TabIndex value="2" />
<Location value="136, 44" />
<Anchor value="Top, Left, Right" />
<Size value="377, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.RadioButton>
<Name value="allRadioButton" />
<Location value="{X=8,Y=68}" />
<Size value="{Width=128, Height=24}" />
<TabIndex value="3" />
<Location value="8, 68" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.All}" />
<Size value="128, 24" />
<TabIndex value="3" />
</System.Windows.Forms.RadioButton>
<System.Windows.Forms.RadioButton>
<Name value="specificWarningsRadioButton" />
<Location value="{X=8,Y=44}" />
<Size value="{Width=128, Height=24}" />
<TabIndex value="1" />
<Location value="8, 44" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.Specific}" />
<Size value="128, 24" />
<TabIndex value="1" />
</System.Windows.Forms.RadioButton>
<System.Windows.Forms.RadioButton>
<Name value="noneRadioButton" />
<Location value="{X=8,Y=20}" />
<Size value="{Width=128, Height=24}" />
<TabIndex value="0" />
<Location value="8, 20" />
<Text value="${res:Dialog.ProjectOptions.Build.TreatWarningsAsErrors.None}" />
<Size value="128, 24" />
<TabIndex value="0" />
</System.Windows.Forms.RadioButton>
</Controls>
</System.Windows.Forms.GroupBox>
<System.Windows.Forms.GroupBox>
<Name value="warningsGroupBox" />
<Location value="{X=3,Y=526}" />
<Location value="3, 526" />
<Text value="${res:Dialog.ProjectOptions.Build.ErrorsAndWarnings}" />
<Size value="521, 80" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=521, Height=80}" />
<TabIndex value="2" />
<Text value="${res:Dialog.ProjectOptions.Build.ErrorsAndWarnings}" />
<Controls>
<System.Windows.Forms.TextBox>
<Name value="suppressWarningsTextBox" />
<Location value="{X=164,Y=44}" />
<Size value="{Width=349, Height=21}" />
<TabIndex value="3" />
<Location value="164, 44" />
<Anchor value="Top, Left, Right" />
<Size value="349, 20" />
</System.Windows.Forms.TextBox>
<System.Windows.Forms.Label>
<Name value="label4" />
<Location value="{X=4,Y=44}" />
<Size value="{Width=154, Height=23}" />
<Location value="4, 44" />
<Text value="${res:Dialog.ProjectOptions.Build.SuppressWarnings}" />
<Size value="154, 23" />
<TextAlign value="MiddleRight" />
<TabIndex value="2" />
<Text value="${res:Dialog.ProjectOptions.Build.SuppressWarnings}" />
</System.Windows.Forms.Label>
<System.Windows.Forms.ComboBox>
<Name value="warningLevelComboBox" />
<Location value="{X=164,Y=20}" />
<TabIndex value="1" />
<Size value="{Width=60, Height=21}" />
<Location value="164, 20" />
<Size value="60, 21" />
<FormattingEnabled value="True" />
<DropDownStyle value="DropDownList" />
</System.Windows.Forms.ComboBox>
<System.Windows.Forms.Label>
<Name value="label3" />
<Location value="{X=4,Y=20}" />
<Size value="{Width=154, Height=23}" />
<Location value="4, 20" />
<Text value="${res:Dialog.ProjectOptions.Build.WarningLevel}" />
<Size value="154, 23" />
<TextAlign value="MiddleRight" />
<TabIndex value="0" />
<Text value="${res:Dialog.ProjectOptions.Build.WarningLevel}" />
</System.Windows.Forms.Label>
</Controls>
</System.Windows.Forms.GroupBox>
</Controls>
</System.Windows.Forms.UserControl>
</Components>
</Components>

2
src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/BuildOptions.cs

@ -51,7 +51,7 @@ namespace VBNetBinding.OptionPanels @@ -51,7 +51,7 @@ namespace VBNetBinding.OptionPanels
InitOutputPath();
InitXmlDoc();
InitTargetFramework(VBNetProject.DefaultTargetsFile,
@"$(SharpDevelopBinPath)\SharpDevelop.Build.VisualBasic.targets");
VBNetProject.ExtendedTargetsFile);
InitDebugInfo();
InitAdvanced();

7
src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs

@ -57,6 +57,7 @@ namespace VBNetBinding @@ -57,6 +57,7 @@ namespace VBNetBinding
}
public const string DefaultTargetsFile = @"$(MSBuildBinPath)\Microsoft.VisualBasic.Targets";
public const string ExtendedTargetsFile = @"$(SharpDevelopBinPath)\SharpDevelop.Build.VisualBasic.targets";
public VBNetProject(ProjectCreateInformation info)
: base(info.Solution)
@ -117,5 +118,11 @@ namespace VBNetBinding @@ -117,5 +118,11 @@ namespace VBNetBinding
base.StartBuild(options, feedbackSink);
}
}
public override void ConvertToMSBuild35(bool changeTargetFrameworkToNet35)
{
base.ConvertToMSBuild35(changeTargetFrameworkToNet35);
ConvertToMSBuild35(changeTargetFrameworkToNet35, DefaultTargetsFile, ExtendedTargetsFile);
}
}
}

1
src/AddIns/DisplayBindings/ResourceEditor/Project/Src/DisplayDefinition.cs

@ -55,6 +55,7 @@ namespace ResourceEditor @@ -55,6 +55,7 @@ namespace ResourceEditor
public ResourceEditWrapper(OpenedFile file)
{
this.TabPageText = "Resource editor";
base.UserControl = resourceEditor;
resourceEditor.ResourceList.Changed += new EventHandler(SetDirty);
this.Files.Add(file);

81
src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.CSharp.targets

@ -4,89 +4,44 @@ @@ -4,89 +4,44 @@
<PropertyGroup>
<!--
Save original target framework version because we'll need to change it
to work around a problem in Microsoft's C# targets
-->
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v2.0</TargetFrameworkVersion>
<SharpDevelopTargetFrameworkVersion>$(TargetFrameworkVersion)</SharpDevelopTargetFrameworkVersion>
<SharpDevelopTargetFrameworkClass>unknown</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<PropertyGroup Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'v1.0') or ($(SharpDevelopTargetFrameworkVersion) == 'v1.1') ">
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<!-- TargetFrameworkVersion must be v1.0 both for .NET 1.0 and .NET 1.1 - otherwise Microsoft.CSharp.targets adds invalid NoWarn entries -->
<CscToolPath Condition="'$(SharpDevelopTargetFrameworkVersion)' == 'v1.0'">$(SystemRoot)\Microsoft.NET\Framework\v1.0.3705</CscToolPath>
<CscToolPath Condition="'$(SharpDevelopTargetFrameworkVersion)' == 'v1.1'">$(SystemRoot)\Microsoft.NET\Framework\v1.1.4322</CscToolPath>
<UseHostCompilerIfAvailable>false</UseHostCompilerIfAvailable>
<ErrorReport/>
<PlatformTarget/>
<SharpDevelopTargetFrameworkClass>v1</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<PropertyGroup Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'v2.0' or '$(SharpDevelopTargetFrameworkVersion)' == '') ">
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<PropertyGroup Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'v2.0' or '$(SharpDevelopTargetFrameworkVersion)' == 'v3.0' or '$(SharpDevelopTargetFrameworkVersion)' == 'v3.5') ">
<SharpDevelopTargetFrameworkClass>v2</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<PropertyGroup Condition=" '$(SharpDevelopTargetFrameworkVersion)' == 'CF 1.0' ">
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<SharpDevelopUseCompactFramework>true</SharpDevelopUseCompactFramework>
<SharpDevelopTargetFrameworkClass>CF</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<PropertyGroup Condition=" '$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0' ">
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<SharpDevelopUseCompactFramework>true</SharpDevelopUseCompactFramework>
<SharpDevelopTargetFrameworkClass>CF</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<PropertyGroup Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'Mono v1.1') or ('$(SharpDevelopTargetFrameworkVersion)' == 'Mono v2.0') ">
<SharpDevelopTargetFrameworkClass>Mono</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<Target Name="Build" Condition="'$(SharpDevelopTargetFrameworkClass)' == 'unknown'">
<!-- Show an error when CF is not installed, or when the target framework is unknown. -->
<Target Name="Build">
<Error Text="'$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets' cannot be found." Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0') and (!Exists('$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets')) "/>
<Error Text="Unknown target framework version '$(SharpDevelopTargetFrameworkVersion)'."/>
</Target>
<!-- Use Microsoft's C# standard targets -->
<Import Condition=" ('$(SharpDevelopTargetFrameworkClass)' == 'v1') or ('$(SharpDevelopTargetFrameworkClass)' == 'v2') "
Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="Rebuild">
<Error Text="'$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets' cannot be found." Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0') and (!Exists('$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets')) "/>
<Error Text="Unknown target framework version '$(SharpDevelopTargetFrameworkVersion)'."/>
</Target>
<!-- Override properties created by Microsoft.CSharp.targets -->
<PropertyGroup Condition=" '$(SharpDevelopTargetFrameworkClass)' == 'v1' ">
<AssemblySearchPaths>
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
{AssemblyFolders};
$(OutputPath);
{GAC}
</AssemblySearchPaths>
<TargetFrameworkDirectory>$(CscToolPath)</TargetFrameworkDirectory>
</PropertyGroup>
<Target Name="Clean">
<Error Text="'$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets' cannot be found." Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0') and (!Exists('$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets')) "/>
<Error Text="Unknown target framework version '$(SharpDevelopTargetFrameworkVersion)'."/>
</Target>
<ItemGroup Condition=" '$(SharpDevelopTargetFrameworkClass)' == 'v1' ">
<TargetFrameworkDirectoryItem Include="$(CscToolPath)">
<InProject>false</InProject>
</TargetFrameworkDirectoryItem>
</ItemGroup>
<!-- Use Microsoft's C# standard targets -->
<Import Condition=" ('$(SharpDevelopTargetFrameworkClass)' == 'v2') "
Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- GetFrameworkPaths overwrites TargetFrameworkDirectory, so modify it -->
<!-- to be inactive if SharpDevelopUse1xCompiler is set. -->
<Target Name="GetFrameworkPaths" DependsOnTargets="$(GetFrameworkPathsDependsOn)" Condition=" ('$(SharpDevelopTargetFrameworkClass)' == 'v1') or ('$(SharpDevelopTargetFrameworkClass)' == 'v2') ">
<Error Condition=" ('$(SharpDevelopTargetFrameworkClass)' == 'v1') And !Exists('$(CscToolPath)\Csc.exe') "
Text="Could not find the C# compiler in $(CscToolPath)."/>
<GetFrameworkPath Condition=" '$(SharpDevelopTargetFrameworkClass)' != 'v1' ">
<Output TaskParameter="Path" PropertyName="TargetFrameworkDirectory"/>
<Output TaskParameter="Path" ItemName="TargetFrameworkDirectoryItem"/>
</GetFrameworkPath>
<GetFrameworkSDKPath Condition=" '$(SharpDevelopTargetFrameworkClass)' != 'v1' ">
<Output TaskParameter="Path" PropertyName="TargetFrameworkSDKDirectory"/>
<Output TaskParameter="Path" ItemName="TargetFrameworkSDKDirectoryItem"/>
</GetFrameworkSDKPath>
</Target>
<!-- Mono imports -->
<Import Condition=" '$(TargetFrameworkVersion)' == 'Mono v1.1' " Project="$(SharpDevelopBinPath)\SharpDevelop.Build.Mono.Mcs.targets"/>
<Import Condition=" '$(TargetFrameworkVersion)' == 'Mono v2.0' " Project="$(SharpDevelopBinPath)\SharpDevelop.Build.Mono.Gmcs.targets"/>
@ -107,8 +62,6 @@ @@ -107,8 +62,6 @@
</ItemGroup>
<!-- Compact framework imports -->
<Import Condition=" '$(SharpDevelopTargetFrameworkVersion)' == 'CF 1.0' "
Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets"/>
<Import Condition=" '$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0' "
<Import Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0') and (Exists('$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets')) "
Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets"/>
</Project>

165
src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets

@ -4,155 +4,42 @@ @@ -4,155 +4,42 @@
<PropertyGroup>
<!--
Save original target framework version because we'll need to change it
to work around a problem in Microsoft's C# targets
-->
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v2.0</TargetFrameworkVersion>
<SharpDevelopTargetFrameworkVersion>$(TargetFrameworkVersion)</SharpDevelopTargetFrameworkVersion>
<SharpDevelopTargetFrameworkClass>unknown</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v1.0' ">
<VbcToolPath>$(SystemRoot)\Microsoft.NET\Framework\v1.0.3705</VbcToolPath>
<SharpDevelopUse1xCompiler>true</SharpDevelopUse1xCompiler>
<SharpDevelopUseMicrosoftFramework>true</SharpDevelopUseMicrosoftFramework>
<PropertyGroup Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'v2.0' or '$(SharpDevelopTargetFrameworkVersion)' == 'v3.0' or '$(SharpDevelopTargetFrameworkVersion)' == 'v3.5') ">
<SharpDevelopTargetFrameworkClass>v2</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v1.1' ">
<VbcToolPath>$(SystemRoot)\Microsoft.NET\Framework\v1.1.4322</VbcToolPath>
<SharpDevelopUse1xCompiler>true</SharpDevelopUse1xCompiler>
<SharpDevelopUseMicrosoftFramework>true</SharpDevelopUseMicrosoftFramework>
<!-- Work around MsBuild problem: Microsoft.VisualBasic.targets adds NoWarn entries that -->
<!-- don't exist in v1.1 when version is set to anything else than v1.0 -->
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(SharpDevelopUse1xCompiler)' == 'true' ">
<UseHostCompilerIfAvailable>false</UseHostCompilerIfAvailable>
<PlatformTarget/>
</PropertyGroup>
<PropertyGroup Condition=" ('$(TargetFrameworkVersion)' == 'v2.0') or ('$(TargetFrameworkVersion)' == '') ">
<PropertyGroup Condition=" '$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0' ">
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<SharpDevelopUseMicrosoftFramework>true</SharpDevelopUseMicrosoftFramework>
<SharpDevelopTargetFrameworkClass>CF</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'CF 1.0' ">
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<SharpDevelopUseCompactFramework>true</SharpDevelopUseCompactFramework>
<PropertyGroup Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'Mono v1.1') or ('$(SharpDevelopTargetFrameworkVersion)' == 'Mono v2.0') ">
<SharpDevelopTargetFrameworkClass>Mono</SharpDevelopTargetFrameworkClass>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'CF 2.0' ">
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<SharpDevelopUseCompactFramework>true</SharpDevelopUseCompactFramework>
</PropertyGroup>
<!-- Use Microsoft's VB standard targets -->
<Import Condition=" '$(SharpDevelopUseMicrosoftFramework)' == 'true' " Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<!-- Override properties created by Microsoft.VisualBasic.targets -->
<PropertyGroup Condition=" '$(SharpDevelopUse1xCompiler)' == 'true' ">
<AssemblySearchPaths>
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
{AssemblyFolders};
$(OutputPath);
{GAC}
</AssemblySearchPaths>
<TargetFrameworkDirectory>$(VbcToolPath)</TargetFrameworkDirectory>
</PropertyGroup>
<!-- Show an error when CF is not installed, or when the target framework is unknown. -->
<Target Name="Build">
<Error Text="'$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets' cannot be found." Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0') and (!Exists('$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets')) "/>
<Error Text="Unknown target framework version '$(SharpDevelopTargetFrameworkVersion)'."/>
</Target>
<ItemGroup Condition=" '$(SharpDevelopUse1xCompiler)' == 'true' ">
<TargetFrameworkDirectoryItem Include="$(VbcToolPath)">
<InProject>false</InProject>
</TargetFrameworkDirectoryItem>
</ItemGroup>
<Target Name="Rebuild">
<Error Text="'$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets' cannot be found." Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0') and (!Exists('$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets')) "/>
<Error Text="Unknown target framework version '$(SharpDevelopTargetFrameworkVersion)'."/>
</Target>
<!-- GetFrameworkPaths overwrites TargetFrameworkDirectory, so modify it -->
<!-- to be inactive if SharpDevelopUse1xCompiler is set. -->
<Target Name="GetFrameworkPaths" DependsOnTargets="$(GetFrameworkPathsDependsOn)" Condition=" '$(SharpDevelopUseMicrosoftFramework)' == 'true' ">
<Error Condition=" ('$(SharpDevelopUse1xCompiler)' == 'true') And !Exists('$(VbcToolPath)\Vbc.exe') "
Text="Could not find the VB.NET compiler in $(VbcToolPath)."/>
<GetFrameworkPath Condition=" '$(SharpDevelopUse1xCompiler)' != 'true' ">
<Output TaskParameter="Path" PropertyName="TargetFrameworkDirectory"/>
<Output TaskParameter="Path" ItemName="TargetFrameworkDirectoryItem"/>
</GetFrameworkPath>
<GetFrameworkSDKPath Condition=" '$(SharpDevelopUse1xCompiler)' != 'true' ">
<Output TaskParameter="Path" PropertyName="TargetFrameworkSDKDirectory"/>
<Output TaskParameter="Path" ItemName="TargetFrameworkSDKDirectoryItem"/>
</GetFrameworkSDKPath>
<Target Name="Clean">
<Error Text="'$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets' cannot be found." Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0') and (!Exists('$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets')) "/>
<Error Text="Unknown target framework version '$(SharpDevelopTargetFrameworkVersion)'."/>
</Target>
<!-- Redefine the Vbc target and set noconfig to false - preventing the Vbc
task from passing the noconfig argument to the Vbc 1.1 compiler which does not
support it -->
<Target
Name="CoreCompile"
Inputs="$(MSBuildAllProjects);
@(Compile);
@(ManifestResourceWithNoCulture);
$(ApplicationIcon);
$(AssemblyOriginatorKeyFile);
@(ManifestNonResxWithNoCultureOnDisk);
@(ReferencePath);
@(CompiledLicenseFile);
@(EmbeddedDocumentation);
@(CustomAdditionalCompileInputs)"
Outputs="@(DocFileItem);
@(IntermediateAssembly);
$(NonExistentFile);
@(CustomAdditionalCompileOutputs)"
DependsOnTargets="$(CoreCompileDependsOn)"
Condition=" '$(SharpDevelopUseMicrosoftFramework)' == 'true' "
>
<Vbc
AdditionalLibPaths="$(AdditionalLibPaths)"
AddModules="@(AddModules)"
BaseAddress="$(BaseAddress)"
CodePage="$(CodePage)"
DebugType="$(DebugType)"
DefineConstants="$(FinalDefineConstants)"
DelaySign="$(DelaySign)"
DisabledWarnings="$(NoWarn)"
DocumentationFile="@(DocFileItem)"
EmitDebugInformation="$(DebugSymbols)"
ErrorReport="$(ErrorReport)"
FileAlignment="$(FileAlignment)"
GenerateDocumentation="$(GenerateDocumentation)"
Imports="@(Import)"
KeyContainer="$(KeyContainerName)"
KeyFile="$(KeyOriginatorFile)"
MainEntryPoint="$(StartupObject)"
NoConfig="false"
NoStandardLib="$(NoStdLib)"
NoWarnings="$(_NoWarnings)"
Optimize="$(Optimize)"
OptionCompare="$(OptionCompare)"
OptionExplicit="$(OptionExplicit)"
OptionStrict="$(OptionStrict)"
OptionStrictType="$(OptionStrictType)"
OutputAssembly="@(IntermediateAssembly)"
Platform="$(PlatformTarget)"
References="@(ReferencePath)"
RemoveIntegerChecks="$(RemoveIntegerChecks)"
Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
ResponseFiles="$(CompilerResponseFile)"
RootNamespace="$(RootNamespace)"
SdkPath="$(FrameworkPathOverride)"
Sources="@(Compile)"
TargetCompactFramework="$(TargetCompactFramework)"
TargetType="$(OutputType)"
ToolPath="$(VbcToolPath)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
Utf8Output="$(Utf8Output)"
Verbosity="$(VbcVerbosity)"
WarningsAsErrors="$(WarningsAsErrors)"
WarningsNotAsErrors="$(WarningsNotAsErrors)"
Win32Icon="$(ApplicationIcon)"
Win32Resource="$(Win32Resource)"
/>
</Target>
<!-- Use Microsoft's VB standard targets -->
<Import Condition=" '$(SharpDevelopTargetFrameworkClass)' == 'v2' " Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<!-- Mono imports -->
<Import Condition=" '$(TargetFrameworkVersion)' == 'Mono v1.1' " Project="$(SharpDevelopBinPath)\SharpDevelop.Build.Mono.Mbas.targets"/>
@ -161,7 +48,7 @@ @@ -161,7 +48,7 @@
<!-- Compact framework property adjustments: -->
<!-- When StdLib is not set, set it to true and add reference to mscorlib -->
<!-- Set PlatformFamilyName and PlatformID if required -->
<PropertyGroup Condition=" '$(SharpDevelopUseCompactFramework)' == 'true' ">
<PropertyGroup Condition=" '$(SharpDevelopTargetFrameworkClass)' == 'CF' ">
<PlatformFamilyName Condition=" '$(PlatformFamilyName)' == '' ">PocketPC</PlatformFamilyName>
<PlatformID Condition=" '$(PlatformID)' == '' ">WinCE</PlatformID>
@ -174,8 +61,6 @@ @@ -174,8 +61,6 @@
</ItemGroup>
<!-- Compact framework imports -->
<Import Condition=" ('$(TargetFrameworkVersion)' == 'v1.0') And ('$(SharpDevelopUseCompactFramework)' == 'true') "
Project="$(MSBuildBinPath)\Microsoft.CompactFramework.VisualBasic.v1.targets"/>
<Import Condition=" ('$(TargetFrameworkVersion)' == 'v2.0') And ('$(SharpDevelopUseCompactFramework)' == 'true') "
<Import Condition=" ('$(SharpDevelopTargetFrameworkVersion)' == 'CF 2.0') and (Exists('$(MSBuildBinPath)\Microsoft.CompactFramework.VisualBasic.targets')) "
Project="$(MSBuildBinPath)\Microsoft.CompactFramework.VisualBasic.targets"/>
</Project>

7
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -71,6 +71,10 @@ @@ -71,6 +71,10 @@
<Compile Include="Src\Gui\Dialogs\OpenWithDialog.Designer.cs">
<DependentUpon>OpenWithDialog.cs</DependentUpon>
</Compile>
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\ConvertToMSBuild35Dialog.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\ConvertToMSBuild35Dialog.Designer.cs">
<DependentUpon>ConvertToMSBuild35Dialog.cs</DependentUpon>
</Compile>
<Compile Include="Src\Gui\Dialogs\SolutionConfiguration\AddNewConfigurationDialog.cs" />
<Compile Include="Src\Gui\Dialogs\SolutionConfiguration\AddNewConfigurationDialog.Designer.cs">
<DependentUpon>AddNewConfigurationDialog.cs</DependentUpon>
@ -691,6 +695,9 @@ @@ -691,6 +695,9 @@
<Compile Include="Src\Internal\Templates\TemplateLoadException.cs" />
<Compile Include="Src\Util\UnclosableStream.cs" />
<EmbeddedResource Include="Resources\DefaultManifest.manifest" />
<EmbeddedResource Include="Src\Gui\Dialogs\OptionPanels\ProjectOptions\ConvertToMSBuild35Dialog.resx">
<DependentUpon>ConvertToMSBuild35Dialog.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj">

58
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AbstractBuildOptions.cs

@ -226,17 +226,34 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -226,17 +226,34 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
}
}
MethodInvoker reinitializeTargetFramework;
protected void InitTargetFramework(string defaultTargets, string extendedTargets)
{
Button convertProjectToMSBuild35Button = (Button)ControlDictionary["convertProjectToMSBuild35Button"];
ComboBox targetFrameworkComboBox = (ComboBox)ControlDictionary["targetFrameworkComboBox"];
if (convertProjectToMSBuild35Button != null) {
if (project.MinimumSolutionVersion == 9) {
// VS05 project
targetFrameworkComboBox.Enabled = false;
reinitializeTargetFramework = delegate { InitTargetFramework(defaultTargets, extendedTargets); };
convertProjectToMSBuild35Button.Click += OnConvertProjectToMSBuild35ButtonClick;
return;
} else {
// VS08 project
targetFrameworkComboBox.Enabled = true;
convertProjectToMSBuild35Button.Visible = false;
}
}
const string TargetFrameworkProperty = "TargetFrameworkVersion";
ConfigurationGuiBinding targetFrameworkBinding;
targetFrameworkBinding = helper.BindStringEnum("targetFrameworkComboBox", TargetFrameworkProperty,
"",
new StringPair("", "C# 2.0 / .NET 2.0"),
new StringPair("v2.0", "C# 3.0 / .NET 2.0"),
new StringPair("v3.0", "C# 3.0 / .NET 3.0"),
new StringPair("v3.5", "C# 3.0 / .NET 3.5"),
new StringPair("CF 1.0", "Compact Framework 1.0"),
"v2.0",
new StringPair("v2.0", ".NET 2.0"),
new StringPair("v3.0", ".NET 3.0"),
new StringPair("v3.5", ".NET 3.5"),
new StringPair("CF 2.0", "Compact Framework 2.0"),
new StringPair("Mono v1.1", "Mono 1.1"),
new StringPair("Mono v2.0", "Mono 2.0"));
@ -245,25 +262,15 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -245,25 +262,15 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
MSBuildBasedProject project = helper.Project;
// Test if SharpDevelop-Build extensions are needed
bool needExtensions = false;
// Test if MSBuild 3.5 is required
bool needMSBuild35 = false;
foreach (MSBuild.BuildProperty p in project.GetAllProperties(TargetFrameworkProperty)) {
if (p.IsImported == false) {
if (p.Value.StartsWith("CF") || p.Value.StartsWith("Mono")) {
needExtensions = true;
} else if (p.Value.StartsWith("v")) {
needMSBuild35 = true;
}
}
}
string newToolsVersion = needMSBuild35 ? "3.5" : "2.0";
if (project.MSBuildProject.DefaultToolsVersion != newToolsVersion) {
project.MSBuildProject.DefaultToolsVersion = newToolsVersion;
project.ParentSolution.Save();
}
foreach (MSBuild.Import import in project.MSBuildProject.Imports) {
if (needExtensions) {
if (defaultTargets.Equals(import.ProjectPath, StringComparison.InvariantCultureIgnoreCase)) {
@ -281,5 +288,24 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -281,5 +288,24 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
}
};
}
void OnConvertProjectToMSBuild35ButtonClick(object sender, EventArgs e)
{
using (ConvertToMSBuild35Dialog dlg = new ConvertToMSBuild35Dialog(project.Language + " newversion")) {
if (dlg.ShowDialog() == DialogResult.OK) {
if (dlg.ConvertAllProjects) {
foreach (IProject p in ProjectService.OpenSolution.Projects) {
MSBuildBasedProject msbp = p as MSBuildBasedProject;
if (msbp != null)
msbp.ConvertToMSBuild35(dlg.ChangeTargetFramework);
}
} else {
project.ConvertToMSBuild35(dlg.ChangeTargetFramework);
}
ProjectService.SaveSolution();
reinitializeTargetFramework();
}
}
}
}
}

139
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ConvertToMSBuild35Dialog.Designer.cs generated

@ -0,0 +1,139 @@ @@ -0,0 +1,139 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{
partial class ConvertToMSBuild35Dialog
{
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.convertAllProjectsCheckBox = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.changeTargetFrameworkCheckBox = new System.Windows.Forms.CheckBox();
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(270, 72);
this.label1.TabIndex = 0;
this.label1.Text = "This will upgrade your project to use MSBuild 3.5 and the ${LANG} compiler.\r\nAfte" +
"r the conversion, the project will no longer open in SharpDevelop 2.x.";
//
// convertAllProjectsCheckBox
//
this.convertAllProjectsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.convertAllProjectsCheckBox.Location = new System.Drawing.Point(12, 84);
this.convertAllProjectsCheckBox.Name = "convertAllProjectsCheckBox";
this.convertAllProjectsCheckBox.Size = new System.Drawing.Size(270, 24);
this.convertAllProjectsCheckBox.TabIndex = 1;
this.convertAllProjectsCheckBox.Text = "Convert &all projects in the solution";
this.convertAllProjectsCheckBox.UseVisualStyleBackColor = true;
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label2.Location = new System.Drawing.Point(12, 124);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(270, 48);
this.label2.TabIndex = 2;
this.label2.Text = "Converting the project does not change the target framework. If you want to use t" +
"he .NET 3.5 features, select the following option:";
//
// changeTargetFrameworkCheckBox
//
this.changeTargetFrameworkCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.changeTargetFrameworkCheckBox.Location = new System.Drawing.Point(12, 175);
this.changeTargetFrameworkCheckBox.Name = "changeTargetFrameworkCheckBox";
this.changeTargetFrameworkCheckBox.Size = new System.Drawing.Size(270, 24);
this.changeTargetFrameworkCheckBox.TabIndex = 3;
this.changeTargetFrameworkCheckBox.Text = "Change target framework to .NET 3.5";
this.changeTargetFrameworkCheckBox.UseVisualStyleBackColor = true;
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(126, 215);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 4;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
//
// cancelButton
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(207, 215);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 5;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
//
// ConvertToMSBuild35Dialog
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(294, 250);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.Controls.Add(this.changeTargetFrameworkCheckBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.convertAllProjectsCheckBox);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ConvertToMSBuild35Dialog";
this.Text = "Convert Project";
this.ResumeLayout(false);
}
private System.Windows.Forms.CheckBox changeTargetFrameworkCheckBox;
private System.Windows.Forms.CheckBox convertAllProjectsCheckBox;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
}
}

45
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ConvertToMSBuild35Dialog.cs

@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Drawing;
using System.Windows.Forms;
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
{
/// <summary>
/// Displays information about the conversion to MSBuild 3.5 and allows to choose whether
/// all projects should be converted/whether the target framework should be changed.
/// </summary>
public partial class ConvertToMSBuild35Dialog : Form
{
public ConvertToMSBuild35Dialog(string newLanguageVersion)
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
}
public bool ForceConvertAllProjects {
get { return !convertAllProjectsCheckBox.Enabled; }
set {
convertAllProjectsCheckBox.Enabled = !value;
if (value)
convertAllProjectsCheckBox.Checked = true;
}
}
public bool ChangeTargetFramework {
get { return changeTargetFrameworkCheckBox.Checked; }
}
public bool ConvertAllProjects {
get { return convertAllProjectsCheckBox.Checked; }
}
}
}

120
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ConvertToMSBuild35Dialog.resx

@ -0,0 +1,120 @@ @@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

51
src/Main/Base/Project/Src/Project/CompilableProject.cs

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
// </file>
using System;
using System.Linq;
using System.IO;
using System.ComponentModel;
using ICSharpCode.Core;
@ -342,5 +343,55 @@ namespace ICSharpCode.SharpDevelop.Project @@ -342,5 +343,55 @@ namespace ICSharpCode.SharpDevelop.Project
return base.GetDefaultItemType(fileName);
}
}
protected void ConvertToMSBuild35(bool changeTargetFrameworkToNet35, string DefaultTargetsFile, string ExtendedTargetsFile)
{
lock (SyncRoot) {
var winFxImport = MSBuildProject.Imports.Cast<Microsoft.Build.BuildEngine.Import>()
.Where(import => !import.IsImported)
.FirstOrDefault(import => string.Equals(import.ProjectPath, "$(MSBuildBinPath)\\Microsoft.WinFX.targets", StringComparison.OrdinalIgnoreCase));
if (winFxImport != null) {
MSBuildProject.Imports.RemoveImport(winFxImport);
}
bool needsExtensions = false;
if (changeTargetFrameworkToNet35) {
SetProperty(null, null, "TargetFrameworkVersion", "v3.5", PropertyStorageLocations.Base, true);
ReferenceProjectItem rpi = new ReferenceProjectItem(this, "System.Core");
rpi.SetMetadata("RequiredTargetFramework", "3.5");
ProjectService.AddProjectItem(this, rpi);
} else {
foreach (string config in ConfigurationNames) {
foreach (string platform in PlatformNames) {
PropertyStorageLocations loc;
string targetFrameworkVersion = GetProperty(config, platform, "TargetFrameworkVersion", out loc);
if (string.IsNullOrEmpty(targetFrameworkVersion))
targetFrameworkVersion = "v2.0";
switch (targetFrameworkVersion) {
case "CF 1.0":
targetFrameworkVersion = "CF 2.0";
break;
case "v1.0":
case "v1.1":
targetFrameworkVersion = "v2.0";
break;
}
if (targetFrameworkVersion == "v2.0" && winFxImport != null)
targetFrameworkVersion = "v3.0";
if (targetFrameworkVersion.StartsWith("CF") || targetFrameworkVersion.StartsWith("Mono"))
needsExtensions = true;
SetProperty(config, platform, "TargetFrameworkVersion", targetFrameworkVersion, loc, true);
}
}
}
if (!needsExtensions) {
foreach (Microsoft.Build.BuildEngine.Import import in MSBuildProject.Imports) {
if (ExtendedTargetsFile.Equals(import.ProjectPath, StringComparison.InvariantCultureIgnoreCase)) {
MSBuildInternals.SetImportProjectPath(this, import, DefaultTargetsFile);
break;
}
}
}
}
}
}
}

9
src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs

@ -76,6 +76,13 @@ namespace ICSharpCode.SharpDevelop.Project @@ -76,6 +76,13 @@ namespace ICSharpCode.SharpDevelop.Project
}
}
public virtual void ConvertToMSBuild35(bool changeTargetFrameworkToNet35)
{
lock (SyncRoot) {
project.DefaultToolsVersion = "3.5";
}
}
public override void ResolveAssemblyReferences()
{
MSBuildInternals.ResolveAssemblyReferences(this, null);
@ -140,6 +147,8 @@ namespace ICSharpCode.SharpDevelop.Project @@ -140,6 +147,8 @@ namespace ICSharpCode.SharpDevelop.Project
Name = information.ProjectName;
FileName = information.OutputProjectFileName;
project.DefaultToolsVersion = "3.5";
base.IdGuid = "{" + Guid.NewGuid().ToString().ToUpperInvariant() + "}";
MSBuild.BuildPropertyGroup group = project.AddNewPropertyGroup(false);
group.AddNewProperty(ProjectGuidPropertyName, IdGuid, true);

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

@ -364,6 +364,10 @@ namespace ICSharpCode.SharpDevelop.Project @@ -364,6 +364,10 @@ namespace ICSharpCode.SharpDevelop.Project
}
if (isShortFileName && !File.Exists(file)) {
file = "";
} else if (FileUtility.IsBaseDirectory(FileUtility.NETFrameworkInstallRoot, file)
|| FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, file))
{
file = "";
}
}
FlushCurrentError();

Loading…
Cancel
Save