diff --git a/data/templates/file/CSharp/CSharp.WPFFlowDocument.xft b/data/templates/file/CSharp/CSharp.WPFFlowDocument.xft
index f586f08787..2a85fbd699 100644
--- a/data/templates/file/CSharp/CSharp.WPFFlowDocument.xft
+++ b/data/templates/file/CSharp/CSharp.WPFFlowDocument.xft
@@ -11,6 +11,18 @@
${res:Templates.File.WinFXFlowDocument.Name}
+
+
+ 3.0
+
+
+ 3.0
+
+
+ 3.0
+
+
+
+
+
+
+
+
+]]>
+
+
+
+
+
+
diff --git a/data/templates/file/VBNet/VBNet.WPFPage.xft b/data/templates/file/VBNet/VBNet.WPFPage.xft
new file mode 100644
index 0000000000..3bb8b53b9c
--- /dev/null
+++ b/data/templates/file/VBNet/VBNet.WPFPage.xft
@@ -0,0 +1,70 @@
+
+
+
+
+
+ ${res:Templates.File.WinFXPage.Name}
+
+
+
+ 3.0
+
+
+ 3.0
+
+
+ 3.0
+
+
+
+
+
+
+
+
+
+]]>
+
+ ''' Interaction logic for ${FileName}
+ '''
+ Public Partial Class ${ClassName} Inherits Page
+ Public Sub New()
+ InitializeComponent()
+ End Sub
+ End Class
+End Namespace]]>
+
+
+
+
+
+
diff --git a/data/templates/file/VBNet/VBNet.WPFPageFunction.xft b/data/templates/file/VBNet/VBNet.WPFPageFunction.xft
new file mode 100644
index 0000000000..dc11e4b809
--- /dev/null
+++ b/data/templates/file/VBNet/VBNet.WPFPageFunction.xft
@@ -0,0 +1,99 @@
+
+
+
+
+
+ ${res:Templates.File.WinFXPageFunction.Name}
+
+
+
+ 3.0
+
+
+ 3.0
+
+
+ 3.0
+
+
+
+
+
+
+
+
+
+]]>
+
+ ''' Interaction logic for ${FileName}
+ '''
+
+ Public Partial Class ${FileNameWithoutExtension}
+ Inherits PageFunction(Of String)
+
+ Public Sub New()
+ InitializeComponent()
+ End Sub
+
+ ' The OnLoaded handler can be run automatically when the class is loaded. To use it, add Loaded="OnLoaded" to the attributes of the root element of the .xaml file and uncomment the following line.
+ ' Private Sub OnLoaded(sender As Object, e As RoutedEventArgs)
+ ' End Sub
+ '
+ ' Sample Finish Handler
+ ' Private Sub OnClickDone(sender As Object, e As RoutedEventArgs)
+ ' OnFinish(New ReturnEventArgs(Of String)("The return value"))
+ ' End Sub
+
+ ' To launch this page function, put this code in the launching page.
+ ' Dim pageFunction As New ${FileNameWithoutExtension}()
+ ' pageFunction.[Return] += New ReturnEventHandler(Of String)(OnFileNameWithoutExtensionReturned)
+ ' _NavWin.Navigate(pageFunction)
+ '
+ ' This handler goes in the launching page.
+ ' Public Sub On${FileNameWithoutExtension}Returned(sender As Object, e As ReturnEventArgs(Of String))
+ ' Console.WriteLine("${FileNameWithoutExtension} returned: " & e.Result)
+ ' End Sub
+
+
+ End Class
+End Namespace]]>
+
+
+
+
+
+
diff --git a/data/templates/file/VBNet/VBNet.WPFResourceDictionary.xft b/data/templates/file/VBNet/VBNet.WPFResourceDictionary.xft
new file mode 100644
index 0000000000..188c662202
--- /dev/null
+++ b/data/templates/file/VBNet/VBNet.WPFResourceDictionary.xft
@@ -0,0 +1,46 @@
+
+
+
+
+
+ ${res:Templates.File.WinFXResourceDictionary.Name}
+
+
+
+ 3.0
+
+
+ 3.0
+
+
+ 3.0
+
+
+
+
+
+
+
+]]>
+
+
+
+
+
+
diff --git a/data/templates/file/VBNet/VBNet.WPFUserControl.xft b/data/templates/file/VBNet/VBNet.WPFUserControl.xft
new file mode 100644
index 0000000000..6990c80a4a
--- /dev/null
+++ b/data/templates/file/VBNet/VBNet.WPFUserControl.xft
@@ -0,0 +1,69 @@
+
+
+
+
+
+ ${res:Templates.File.WinFXUserControl.Description}
+
+
+
+ 3.0
+
+
+ 3.0
+
+
+ 3.0
+
+
+
+
+
+
+
+
+
+]]>
+
+ ''' Interaction logic for ${FileName}
+ '''
+ Public Partial Class ${ClassName} Inherits UserControl
+ Public Sub New()
+ InitializeComponent()
+ End Sub
+ End Class
+End Namespace]]>
+
+
+
+
+
+
diff --git a/data/templates/file/VBNet/VBNet.WPFWindow.xft b/data/templates/file/VBNet/VBNet.WPFWindow.xft
new file mode 100644
index 0000000000..1443479ae4
--- /dev/null
+++ b/data/templates/file/VBNet/VBNet.WPFWindow.xft
@@ -0,0 +1,70 @@
+
+
+
+
+
+ ${res:Templates.File.WinFXWindow.Description}
+
+
+
+ 3.0
+
+
+ 3.0
+
+
+ 3.0
+
+
+
+
+
+
+
+
+
+]]>
+
+ ' Interaction logic for ${FileName}
+ '
+ Public Partial Class ${ClassName} Inherits Window
+ Public Sub New()
+ InitializeComponent()
+ End Sub
+ End Class
+End Namespace]]>
+
+
+
+
+
+
diff --git a/data/templates/file/VBNet/VBNet.Web.WebControl.xft b/data/templates/file/VBNet/VBNet.Web.WebControl.xft
new file mode 100644
index 0000000000..01b77996f0
--- /dev/null
+++ b/data/templates/file/VBNet/VBNet.Web.WebControl.xft
@@ -0,0 +1,79 @@
+
+
+
+
+
+ ${res:Templates.File.WebControl.Description}
+
+
+
+ ''' Description of ${ClassName}
+ '''
+ Public Class ${ClassName}
+ Inherits Control
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Data"
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Constructor"
+
+ Public Sub New()
+ AddHandler Init, New EventHandler(AddressOf OnInit)
+ AddHandler Load, New EventHandler(AddressOf OnLoad)
+ End Sub
+
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "OnInit"
+
+ Private Overloads Sub OnInit(sender As Object, e As EventArgs)
+ End Sub
+
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "OnLoad"
+
+ Private Overloads Sub OnLoad(sender As Object, e As EventArgs)
+ End Sub
+
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Properties"
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Render"
+
+ Protected Overrides Sub Render(Writer As HtmlTextWriter)
+ Writer.Write("${ClassName} Control")
+ End Sub
+ #End Region
+ End Class
+End Namespace]]>
+
+
+
+
+
diff --git a/data/templates/file/VBNet/VBNet.Web.WebForm.xft b/data/templates/file/VBNet/VBNet.Web.WebForm.xft
new file mode 100644
index 0000000000..eaf17bd520
--- /dev/null
+++ b/data/templates/file/VBNet/VBNet.Web.WebForm.xft
@@ -0,0 +1,175 @@
+
+
+
+
+
+ ${res:Templates.File.WebForm.Description}
+
+
+
+ ''' Description of ${ClassName}
+ '''
+ Public Class ${ClassName}
+ Inherits Page
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Data"
+
+ Protected _Button_Ok As HtmlInputButton
+ Protected _Input_Name As HtmlInputText
+
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Page Init & Exit (Open/Close DB connections here...)"
+
+ Protected Sub PageInit(sender As Object, e As System.EventArgs)
+ End Sub
+ '----------------------------------------------------------------------
+ Protected Sub PageExit(sender As Object, e As System.EventArgs)
+ End Sub
+
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Page Load"
+ Private Sub Page_Load(sender As Object, e As System.EventArgs)
+ Response.Write("Hello #Develop
")
+ '------------------------------------------------------------------
+ If IsPostBack Then
+ End If
+ '------------------------------------------------------------------
+ End Sub
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Click_Button_OK"
+
+ '----------------------------------------------------------------------
+ Protected Sub Click_Button_Ok(sender As Object, e As System.EventArgs)
+ Response.Write(_Button_Ok.Value & " was cklicked!
")
+ End Sub
+
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Change_Input_Name"
+
+ '----------------------------------------------------------------------
+ Protected Sub Changed_Input_Name(sender As Object, e As System.EventArgs)
+ Response.Write(_Input_Name.Value & " has changed!
")
+ End Sub
+
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Add more events here..."
+
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ #Region "Initialize Component"
+
+ Protected Overrides Sub OnInit(e As EventArgs)
+ InitializeComponent()
+ MyBase.OnInit(e)
+ End Sub
+ '----------------------------------------------------------------------
+ Private Sub InitializeComponent()
+ '------------------------------------------------------------------
+ AddHandler Me.Load, New System.EventHandler(AddressOf Page_Load)
+ AddHandler Me.Init, New System.EventHandler(AddressOf PageInit)
+ AddHandler Me.Unload, New System.EventHandler(AddressOf PageExit)
+ '------------------------------------------------------------------
+ AddHandler _Button_Ok.ServerClick, New EventHandler(AddressOf Click_Button_Ok)
+ AddHandler _Input_Name.ServerChange, New EventHandler(AddressOf Changed_Input_Name)
+ '------------------------------------------------------------------
+ End Sub
+ #End Region
+ '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+ End Class
+End Namespace]]>
+
+
+
+
+
+ ${ClassName}
+
+
+
+
+
+
+
+
+
+
+
+
+]]>
+
+
+
+
+
diff --git a/data/templates/file/VBNet/VBNet.Web.WebService.xft b/data/templates/file/VBNet/VBNet.Web.WebService.xft
new file mode 100644
index 0000000000..b8b5c35a7c
--- /dev/null
+++ b/data/templates/file/VBNet/VBNet.Web.WebService.xft
@@ -0,0 +1,62 @@
+
+
+
+
+
+ ${res:Templates.File.WebService.Description}
+
+
+
+ /// Description of ${ClassName}
+ ///
+ [WebService
+ ( Name = "${ClassName}",
+ Description = "${ClassName}",
+ Namespace = "http://www.${ClassName}.example"
+ )
+ ]
+ public class ${ClassName} : WebService
+ {
+ public ${ClassName}()
+ {
+ }
+
+ [WebMethod]
+ public string Status()
+ {
+ string s = string.Format("Time: {0}", DateTime.Now);
+ return s;
+ }
+ }
+}
+]]>
+
+
+]]>
+
+
+
+
+
diff --git a/src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs b/src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs
index d8bcfcb711..8d72b12899 100644
--- a/src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs
+++ b/src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs
@@ -9,8 +9,9 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
using System.Xml;
-
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
@@ -270,6 +271,10 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
throw new InvalidDataException("Reference without 'include' attribute!");
ReferenceProjectItem item = new ReferenceProjectItem(null, reference.GetAttribute("include"));
item.SetMetadata("HintPath", reference.GetAttribute("hintPath"));
+ var requiredTargetFramework = reference.GetElementsByTagName("RequiredTargetFramework").OfType().FirstOrDefault();
+ if (requiredTargetFramework != null) {
+ item.SetMetadata("RequiredTargetFramework", requiredTargetFramework.Value);
+ }
requiredAssemblyReferences.Add(item);
}
}