提交 c0bf2788 编写于 作者: K Kevin Ransom (msft) 提交者: GitHub

Add templates (#3402)

上级 7878f6d3
......@@ -6,6 +6,7 @@
<Icon Package="{91A04A73-4F2C-4E7C-AD38-C1A68E7DA05C}" ID="4010" />
<TemplateID>Microsoft.FSharp.AppConfig</TemplateID>
<ProjectType>FSharp</ProjectType>
<SortOrder>60</SortOrder>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>App.config</DefaultName>
</TemplateData>
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\..\src</FSharpSourcesRoot>
<AssemblyName>ResourceFile</AssemblyName>
<TemplateCategory>ItemTemplates</TemplateCategory>
<IsPackage>true</IsPackage>
<GenerateLocalizedTemplates>true</GenerateLocalizedTemplates>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<GeneratePkgDefFile>false</GeneratePkgDefFile>
<IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
<CreateVsixContainer>false</CreateVsixContainer>
<DeployExtension>false</DeployExtension>
<DeployVSTemplates>false</DeployVSTemplates>
<CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
<ProjectGuid>{0385564F-07B4-4264-AB8A-17C393E9140C}</ProjectGuid>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<TargetDotnetProfile Condition="'$(TargetDotnetProfile)' == ''">net40</TargetDotnetProfile>
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName)</OutputPath>
</PropertyGroup>
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.Common.props" />
<ItemGroup>
<VSTemplate Include="Template\Resource.vstemplate" />
</ItemGroup>
<ItemGroup>
<TemplateFiles Include="Template\Resource.resx" />
<TemplateFiles Include="Template\Resource.vstemplate" />
</ItemGroup>
<Import Project="$(FSharpSourcesRoot)\..\vsintegration\src\FSharp.tools.targets" />
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
<Target Name="CoreCompile" />
<Target Name="CopyFilesToOutputDirectory" AfterTargets="CoreCompile">
<Copy SourceFiles="@(TemplateFiles)" DestinationFiles="@(TemplateFiles->'$(OutDir)$(TemplateCategory)\$(AssemblyName)\%(Filename)%(Extension)')" />
</Target>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
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">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</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.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:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name Package="{91A04A73-4F2C-4E7C-AD38-C1A68E7DA05C}" ID="5053" />
<Description Package="{91A04A73-4F2C-4E7C-AD38-C1A68E7DA05C}" ID="5054" />
<Icon Package="{91A04A73-4F2C-4E7C-AD38-C1A68E7DA05C}" ID="4017" />
<TemplateID>Microsoft.FSharp.Resource</TemplateID>
<ProjectType>FSharp</ProjectType>
<SortOrder>40</SortOrder>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>Resource.resx</DefaultName>
</TemplateData>
<TemplateContent>
<ProjectItem OpenInEditor="false">Resource.resx</ProjectItem>
<CustomParameters>
<CustomParameter Name="$itemproperties$" Value="CustomTool" />
<CustomParameter Name="$CustomTool$" Value="ResXFileCodeGenerator" />
</CustomParameters>
</TemplateContent>
<WizardExtension>
<Assembly>Microsoft.VisualStudio.Editors, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<FullClassName>Microsoft.VisualStudio.Editors.ResourceEditor.ResxItemWizard</FullClassName>
</WizardExtension>
</VSTemplate>
......@@ -6,7 +6,7 @@
<Icon Package="{91A04A73-4F2C-4E7C-AD38-C1A68E7DA05C}" ID="4006" />
<TemplateID>Microsoft.FSharp.ScriptFile</TemplateID>
<ProjectType>FSharp</ProjectType>
<SortOrder>30</SortOrder>
<SortOrder>20</SortOrder>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>Script.fsx</DefaultName>
</TemplateData>
......
......@@ -6,7 +6,7 @@
<Icon Package="{91A04A73-4F2C-4E7C-AD38-C1A68E7DA05C}" ID="4007" />
<TemplateID>Microsoft.FSharp.SignatureFile</TemplateID>
<ProjectType>FSharp</ProjectType>
<SortOrder>50</SortOrder>
<SortOrder>30</SortOrder>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>File.fsi</DefaultName>
</TemplateData>
......
......@@ -6,6 +6,7 @@
<Icon Package="{91A04A73-4F2C-4E7C-AD38-C1A68E7DA05C}" ID="4009" />
<TemplateID>Microsoft.FSharp.TextFile</TemplateID>
<ProjectType>FSharp</ProjectType>
<SortOrder>50</SortOrder>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>TextFile.txt</DefaultName>
</TemplateData>
......
......@@ -6,6 +6,7 @@
<Icon Package="{91A04A73-4F2C-4E7C-AD38-C1A68E7DA05C}" ID="4011" />
<TemplateID>Microsoft.FSharp.XMLFile</TemplateID>
<ProjectType>FSharp</ProjectType>
<SortOrder>70</SortOrder>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<DefaultName>XMLFile.xml</DefaultName>
</TemplateData>
......
......@@ -223,6 +223,14 @@
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\..\vsintegration\ItemTemplates\ResourceFile\ResourceFile.csproj">
<Project>{0385564F-07B4-4264-AB8A-17C393E9140C}</Project>
<Name>ResourceFile</Name>
<VSIXSubPath>ItemTemplates</VSIXSubPath>
<IncludeOutputGroupsInVSIX>TemplateProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\..\vsintegration\ItemTemplates\ScriptFile\ScriptFile.csproj">
<Project>{a333b85a-dc23-49b6-9797-b89a7951e92d}</Project>
<Name>ScriptFile</Name>
......
......@@ -222,6 +222,14 @@
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\..\vsintegration\ItemTemplates\ResourceFile\ResourceFile.csproj">
<Project>{0385564F-07B4-4264-AB8A-17C393E9140C}</Project>
<Name>ResourceFile</Name>
<VSIXSubPath>ItemTemplates</VSIXSubPath>
<IncludeOutputGroupsInVSIX>TemplateProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\..\vsintegration\ItemTemplates\ScriptFile\ScriptFile.csproj">
<Project>{a333b85a-dc23-49b6-9797-b89a7951e92d}</Project>
<Name>ScriptFile</Name>
......
......@@ -11,6 +11,7 @@
<ProjectFiles Include="ItemTemplates\SignatureFile\SignatureFile.csproj" />
<ProjectFiles Include="ItemTemplates\TextFile\TextFile.csproj" />
<ProjectFiles Include="ItemTemplates\XMLFile\XMLFile.csproj" />
<ProjectFiles Include="ItemTemplates\ResourceFile\ResourceFile.csproj" />
</ItemGroup>
<Import Project="..\src\root.traversal.targets"/>
......
......@@ -275,6 +275,9 @@
<data name="4016" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Data_Entity.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="4017" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\FSharpResources.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="4100" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\ProjectNode.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
......@@ -437,6 +440,12 @@
<data name="5052" xml:space="preserve">
<value>A project for creating an F# library (.dll) that can run on .NET Framework 4.5, Windows Store, Windows Phone 8.1, Windows Phone Silverlight 8, Xamarin.iOS, Xamarin.Android and Xamarin.iOS(Classic). Profile 259</value>
</data>
<data name="5053" xml:space="preserve">
<value>Resources File</value>
</data>
<data name="5054" xml:space="preserve">
<value>A file for storing resources</value>
</data>
<data name="6000" xml:space="preserve">
<value>F# Tools</value>
</data>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册