2017-07-05 35 views
0

私はプロジェクトテンプレートを作成していて、それを「新規プロジェクト」ウィンドウの特定のセクションに配置しています。 MyTemplate.vstemplate xmlのようなファイルがテンプレートフォルダ内にあり、「ProjectType」というエントリがあります。そして、それは適切な値を設定するだけで問題を解決する正しい方法だと思われますが、利用可能なタイプのリストをすべて見つけることはできません。テンプレートを「Visual C#」または「Visual Basic」セクションに配置するのに問題はありませんが、「その他のプロジェクトタイプ」または「Visual Studioソリューション」の下に配置したいと思います。Visual Studio 2015プロジェクトテンプレートタイプ

そして、最大の成果は、拡張と共にテンプレートを設定することです。

アイデアをお寄せいただきありがとうございます。おかげ

csproj内容:

<?xml version="1.0" encoding="utf-8"?> 
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
    <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> 
    <PropertyGroup> 
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 
    <ProjectGuid>{$guid1$}</ProjectGuid> 
    <OutputType>Library</OutputType> 
    <AppDesignerFolder>Properties</AppDesignerFolder> 
    <RootNamespace>$safeprojectname$</RootNamespace> 
    <AssemblyName>$safeprojectname$</AssemblyName> 
    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> 
    <FileAlignment>512</FileAlignment> 
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> 
    </PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 
    <PlatformTarget>AnyCPU</PlatformTarget> 
    <DebugSymbols>true</DebugSymbols> 
    <DebugType>full</DebugType> 
    <Optimize>false</Optimize> 
    <OutputPath>bin\Debug\</OutputPath> 
    <DefineConstants>DEBUG;TRACE</DefineConstants> 
    <ErrorReport>prompt</ErrorReport> 
    <WarningLevel>4</WarningLevel> 
    </PropertyGroup> 
    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 
    <PlatformTarget>AnyCPU</PlatformTarget> 
    <DebugType>pdbonly</DebugType> 
    <Optimize>true</Optimize> 
    <OutputPath>bin\Release\</OutputPath> 
    <DefineConstants>TRACE</DefineConstants> 
    <ErrorReport>prompt</ErrorReport> 
    <WarningLevel>4</WarningLevel> 
    </PropertyGroup> 
    <PropertyGroup> 
    <StartupObject /> 
    </PropertyGroup> 
    <ItemGroup> 
    <Reference Include="System" /> 
    <Reference Include="System.ComponentModel.Composition" /> 
    <Reference Include="System.Core" /> 
    <Reference Include="System.Xml.Linq" /> 
    <Reference Include="System.Data.DataSetExtensions" /> 
    <Reference Include="Microsoft.CSharp" /> 
    <Reference Include="System.Data" /> 
    <Reference Include="System.Net.Http" /> 
    <Reference Include="System.Xml" /> 
    </ItemGroup> 
    <ItemGroup> 
    <Compile Include="ModuleRegistry.cs" /> 
    <Compile Include="Properties\AssemblyInfo.cs" /> 
    </ItemGroup> 
    <ItemGroup> 
    <None Include="App.config" /> 
    </ItemGroup> 
    <ItemGroup /> 
    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 
    <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
     Other similar extension points exist, see Microsoft.Common.targets. 
    <Target Name="BeforeBuild"> 
    </Target> 
    <Target Name="AfterBuild"> 
    </Target> 
    --> 
    <Target Name="TemplateProjectOutputGroup"> 
    </Target> 
</Project> 

答えて

0

は、それはあなたがそのために使用すべきProjectTypeではありません。

編集MyTemplate.vstemplateファイルが含まれており、このようなOutputSubPath値設定csproj:

<VSTemplate Include="MyTemplate.vstemplate"> 
    <OutputSubPath>ELEVATION</OutputSubPath> 
</VSTemplate> 
+0

をしかし、あなたはそれを追加する必要があります 'VSTemplate' –

+0

としてはそのようなエントリが存在しません。 –

+0

それでは、正確にはどこですか? 「」または深く? 「Visual Studio Solutions」セクションに入るにはどのような価値がありますか? –