Browse Source

ConsoleProject templates:

- Revert changes to project-wide imports. If we don't use the same imports as Visual Studio, most VB tutorials will fail to work with SharpDevelop.
- Option Strict/Option Explicit should be a project-wide setting and not specified in each file.
- fixed indentation

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2532 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
57eafab058
  1. 12
      data/templates/project/CSharp/ConsoleProject.xpt
  2. 19
      data/templates/project/VBNet/ConsoleProject.xpt

12
data/templates/project/CSharp/ConsoleProject.xpt

@ -1,7 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<Template originator = "Mike Krueger" <Template originator = "Mike Krueger">
created = "06/10/2001"
lastModified = "30/05/2007">
<!-- Template Header --> <!-- Template Header -->
<TemplateConfiguration> <TemplateConfiguration>
@ -21,11 +19,12 @@
<Project language = "C#"> <Project language = "C#">
<ProjectItems> <ProjectItems>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ProjectItems> </ProjectItems>
<Files> <Files>
<File name="Program.cs"><![CDATA[${StandardHeader.C#} <File name="Program.cs"><![CDATA[${StandardHeader.C#}
using System; using System;
using System.IO;
namespace ${StandardNamespace} namespace ${StandardNamespace}
{ {
@ -33,13 +32,12 @@ namespace ${StandardNamespace}
{ {
public static void Main(string[] args) public static void Main(string[] args)
{ {
Console.WriteLine(Path.GetFileName(typeof(Program).Assembly.Location)); Console.WriteLine("Hello World!");
Console.WriteLine();
// TODO: Implement Functionality Here // TODO: Implement Functionality Here
Console.Write("Press any key to continue . . . "); Console.Write("Press any key to continue . . . ");
Console.ReadKey(false); Console.ReadKey();
} }
} }
}]]></File> }]]></File>

19
data/templates/project/VBNet/ConsoleProject.xpt

@ -22,10 +22,15 @@
<Project language = "VBNet"> <Project language = "VBNet">
<ProjectItems> <ProjectItems>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Import Include="Microsoft.VisualBasic" /> <Import Include="Microsoft.VisualBasic" />
<Import Include="System" /> <Import Include="System" />
<Import Include="System.IO" /> <Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
</ProjectItems> </ProjectItems>
<PropertyGroup> <PropertyGroup>
@ -35,18 +40,14 @@
<Files> <Files>
<File name="Program.vb"> <File name="Program.vb">
<![CDATA[${StandardHeader.VBNET} <![CDATA[${StandardHeader.VBNET}
Option Strict On
Option Explicit On
Module Program Module Program
Sub Main() Sub Main()
Console.WriteLine(Path.GetFileName(GetType(Program).Assembly.Location)) Console.WriteLine("Hello World!")
Console.WriteLine()
' TODO: Implement Functionality Here ' TODO: Implement Functionality Here
Console.Write("Press any key to continue . . . ") Console.Write("Press any key to continue . . . ")
Console.ReadKey(false) Console.ReadKey()
End Sub End Sub
End Module End Module
]]></File> ]]></File>

Loading…
Cancel
Save