Browse Source

Fixed SD2-777: Cannot add a new ASP.NET WebForm to a project

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1329 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
8cad311b40
  1. 17
      data/templates/file/CSharp/CSharp.Web.WebControl.xft
  2. 37
      data/templates/file/CSharp/CSharp.Web.WebForm.xft
  3. 23
      data/templates/file/CSharp/CSharp.Web.WebService.xft
  4. 47
      data/templates/project/CSharp/WebpageProject.xpt
  5. 5
      src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj
  6. 5
      src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj
  7. 1
      src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs

17
data/templates/file/CSharp/CSharp.Web.WebControl.xft

@ -21,7 +21,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <Files>
<File name="${Path}\Source\${FileNameWithoutExtension}.cs" language="C#"><![CDATA[${StandardHeader.C#} <File name="${Path}/${FileNameWithoutExtension}.cs" dependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#}
using System; using System;
using System.Web; using System.Web;
@ -32,12 +32,9 @@ using System.Web.UI.HtmlControls;
namespace ${StandardNamespace} namespace ${StandardNamespace}
{ {
//**************************************************************************
#region Class ${ClassName}
/// <summary> /// <summary>
/// Description of ${ClassName} /// Description of ${ClassName}
/// </summary> /// </summary>
public class ${ClassName} : Control public class ${ClassName} : Control
{ {
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@ -75,22 +72,12 @@ namespace ${StandardNamespace}
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region Render #region Render
override protected override void Render(HtmlTextWriter Writer)
protected void Render(HtmlTextWriter Writer)
{ {
Writer.Write( "${ClassName} Control" ); Writer.Write( "${ClassName} Control" );
} }
#endregion #endregion
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region More...
#endregion
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region More...
#endregion
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
} }
#endregion
//**************************************************************************
} }
]]></File> ]]></File>

37
data/templates/file/CSharp/CSharp.Web.WebForm.xft

@ -21,7 +21,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <Files>
<File name="${Path}\Source\${FileNameWithoutExtension}.cs" language="C#"><![CDATA[${StandardHeader.C#} <File name="${Path}/${FileName}.cs" dependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#}
using System; using System;
using System.Collections; using System.Collections;
@ -120,35 +120,28 @@ namespace ${StandardNamespace}
} }
]]></File> ]]></File>
<File name="${FullName}" language="HTML"><![CDATA[<%@ Page <File name="${FullName}" language="HTML"><![CDATA[<%@ Page
language="c#" Language = "C#"
Codebehind="${FileNameWithoutExtension}.cs" AutoEventWireup = "false"
AutoEventWireup="false" Inherits = "${StandardNamespace}.${ClassName}"
Inherits="${StandardNamespace}.${ClassName}" ValidateRequest = "false"
validateRequest="false" EnableSessionState = "false"
EnableSessionState="false"
debug="true"
trace="false"
%> %>
<!--
<--%@ Register TagPrefix="???" Namespace="${StandardNamespace}" Assembly="${StandardNamespace}" %>
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmls="http://www.w3.org/1999/xhtml"> <html xmls="http://www.w3.org/1999/xhtml">
<Html> <html>
<Head> <head>
<Title>${ClassName}</Title> <title>${ClassName}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <meta HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<LINK href="${StandardNamespace}.css" type="text/css" rel="stylesheet"> <link href="${StandardNamespace}.css" type="text/css" rel="stylesheet">
</Head> </head>
<Body> <body>
<form id="Form_${ClassName}" method="post" runat="server"> <form id="Form_${ClassName}" method="post" runat="server">
<table> <table>
@ -171,7 +164,7 @@ namespace ${StandardNamespace}
<tr> <tr>
<td colspan="2"> <td colspan="2">
<input id="_Button_No" type="submit" value="Oh No!" runat="server"> <input id="_Button_No" type="submit" value="Oh No!" runat="server">
<input id="_Button_Ok" type="submit" value="Ok" runat="server"> <input id="ButtonOk" type="submit" value="Ok" runat="server">
</td> </td>
</tr> </tr>
@ -184,8 +177,8 @@ namespace ${StandardNamespace}
</table> </table>
</form> </form>
</Body> </body>
</Html> </html>
]]> </File> ]]> </File>
</Files> </Files>

23
data/templates/file/CSharp/CSharp.Web.WebService.xft

@ -21,7 +21,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <Files>
<File name="${Path}\Source\${FileNameWithoutExtension}.cs" language="C#"><![CDATA[${StandardHeader.C#} <File name="${Path}/${FileNameWithoutExtension}.cs" dependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#}
using System; using System;
using System.Web.Services; using System.Web.Services;
@ -39,40 +39,21 @@ namespace ${StandardNamespace}
] ]
public class ${ClassName} : WebService public class ${ClassName} : WebService
{ {
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region Data
#endregion
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region Constructor
public ${ClassName}() public ${ClassName}()
{ {
} }
#endregion
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region Status
[WebMethod] [WebMethod]
public string Status() public string Status()
{ {
string s = string.Format("Time: {0}", DateTime.Now); string s = string.Format("Time: {0}", DateTime.Now);
return s; return s;
} }
#endregion
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region More...
#endregion
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region More...
#endregion
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
} }
} }
]]></File> ]]></File>
<File name="${FullName}"><![CDATA[ <File name="${FullName}"><![CDATA[
<%@ WebService Class="${StandardNamespace}.${ClassName}" Language="C#" Debug="true" %> <%@ WebService Class="${StandardNamespace}.${ClassName}" Language="C#" %>
]]> </File> ]]> </File>

47
data/templates/project/CSharp/WebpageProject.xpt

@ -15,7 +15,8 @@
<!-- Actions --> <!-- Actions -->
<Actions> <Actions>
<Open filename = ".\Source\Main.cs"/> <Open filename = ".\Default.aspx"/>
<Open filename = ".\Default.aspx.cs"/>
</Actions> </Actions>
<Combine name = "${ProjectName}" directory = "."> <Combine name = "${ProjectName}" directory = ".">
@ -41,7 +42,7 @@
<Files> <Files>
<!--*************************************************************************--> <!--*************************************************************************-->
<File name=".\Source\Main.cs"><![CDATA[${StandardHeader.C#} <File name=".\Default.aspx.cs" dependentUpon="Default.aspx"><![CDATA[${StandardHeader.C#}
using System; using System;
using System.Collections; using System.Collections;
@ -59,7 +60,7 @@ namespace ${StandardNamespace}
/// <summary> /// <summary>
/// Description of MainForm. /// Description of MainForm.
/// </summary> /// </summary>
public class Main : Page public class Default : Page
{ {
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region Data #region Data
@ -138,7 +139,7 @@ namespace ${StandardNamespace}
} }
}]]></File> }]]></File>
<!--*************************************************************************--> <!--*************************************************************************-->
<File name=".\Source\AssemblyInfo.cs"> <File name=".\AssemblyInfo.cs">
<![CDATA[using System.Reflection; <![CDATA[using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -170,11 +171,11 @@ using System.Runtime.CompilerServices;
<!--*************************************************************************--> <!--*************************************************************************-->
<File name="Global.asax" language="HTML"> <File name="Global.asax" language="HTML">
<![CDATA[<%@ Application Codebehind="Global.cs" <![CDATA[<%@ Application Codebehind="Global.cs"
Inherits="${ProjectName}.Global" Inherits="${StandardNamespace}.Global"
%> %>
]]></File> ]]></File>
<!--*************************************************************************--> <!--*************************************************************************-->
<File name=".\Source\Global.cs"> <File name=".\Global.asax.cs" dependentUpon="Global.asax">
<![CDATA[ <![CDATA[
using System; using System;
using System.Collections; using System.Collections;
@ -258,36 +259,30 @@ namespace ${StandardNamespace}
} }
]]></File> ]]></File>
<!--*************************************************************************--> <!--*************************************************************************-->
<File name="Main.aspx" language="HTML"><![CDATA[<%@ Page <File name="Default.aspx" language="HTML"><![CDATA[<%@ Page
language="c#" Language = "C#"
Codebehind="Main.cs" AutoEventWireup = "false"
AutoEventWireup="false" Inherits = "${StandardNamespace}.Default"
Inherits="${ProjectName}.Main" ValidateRequest = "false"
validateRequest="false" EnableSessionState = "false"
EnableSessionState="false"
debug="true"
trace="false"
%> %>
<!--
<--%@ Register TagPrefix="???" Namespace="${StandardNamespace}" Assembly="${StandardNamespace}" %>
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmls="http://www.w3.org/1999/xhtml"> <html xmls="http://www.w3.org/1999/xhtml">
<Html> <html>
<Head> <head>
<title>Main</title> <title>${ClassName}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <meta HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<LINK href="${ProjectName}.css" type="text/css" rel="stylesheet">
</Head> <link href="${StandardNamespace}.css" type="text/css" rel="stylesheet">
<Body>
</head>
<body>
<form id="Form1" method="post" runat="server"> <form id="Form1" method="post" runat="server">
<!-- Site Code goes here! --> <!-- Site Code goes here! -->
<table> <table>
@ -327,7 +322,7 @@ namespace ${StandardNamespace}
</Html> </Html>
]]></File> ]]></File>
<!--*************************************************************************--> <!--*************************************************************************-->
<File name="${ProjectName}.css" language="HTML"> <File name="${StandardNamespace}.css" language="HTML">
<![CDATA[/*----------------------------------------------*/ <![CDATA[/*----------------------------------------------*/
BODY BODY
{ font-family: Verdana, Arial; { font-family: Verdana, Arial;

5
src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj

@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectType>Local</ProjectType> <ProjectType>Local</ProjectType>
<ProductVersion>8.0.50215</ProductVersion> <ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}</ProjectGuid> <ProjectGuid>{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -27,6 +27,7 @@
<NoStdLib>false</NoStdLib> <NoStdLib>false</NoStdLib>
<RemoveIntegerChecks>false</RemoveIntegerChecks> <RemoveIntegerChecks>false</RemoveIntegerChecks>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRules>-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Maintainability#CA1502;-Microsoft.Maintainability#CA1501;-Microsoft.Maintainability#CA1500;-Microsoft.Naming#CA1718;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1705;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1706;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1807;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1816;-Microsoft.Performance#CA1817;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1818;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Usage#CA2209;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2215;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA2202;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2241;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230</CodeAnalysisRules>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@ -251,4 +252,4 @@
<Folder Include="Configuration\" /> <Folder Include="Configuration\" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project> </Project>

5
src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50215</ProductVersion> <ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}</ProjectGuid> <ProjectGuid>{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}</ProjectGuid>
<AssemblyName>ICSharpCode.TextEditor</AssemblyName> <AssemblyName>ICSharpCode.TextEditor</AssemblyName>
@ -28,6 +28,7 @@
<OutputPath>..\..\..\..\bin\</OutputPath> <OutputPath>..\..\..\..\bin\</OutputPath>
<DefineConstants>DEBUG</DefineConstants> <DefineConstants>DEBUG</DefineConstants>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<CodeAnalysisRules>-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Naming#CA1718;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1705;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1706;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1807;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1816;-Microsoft.Performance#CA1817;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1818;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Usage#CA2209;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2215;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA2202;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2241;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230</CodeAnalysisRules>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>True</Optimize> <Optimize>True</Optimize>
@ -199,4 +200,4 @@
<Compile Include="Src\Gui\ToolTipRequestEventArgs.cs" /> <Compile Include="Src\Gui\ToolTipRequestEventArgs.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project> </Project>

1
src/Main/Base/Project/Src/Gui/Dialogs/NewFileDialog.cs

@ -383,6 +383,7 @@ namespace ICSharpCode.SharpDevelop.Gui
return; return;
} }
if (Path.IsPathRooted(parsedFileName)) { if (Path.IsPathRooted(parsedFileName)) {
Directory.CreateDirectory(Path.GetDirectoryName(parsedFileName));
window.ViewContent.Save(parsedFileName); window.ViewContent.Save(parsedFileName);
} }
} }

Loading…
Cancel
Save