Custom ASP.NET MVC 4 project template puts solution file in project
directory?
I have created a custom project template for ASP.NET MVC 4 but when I use
the template the solution file, .nuget folder and packages.config ends up
in the same directory as the web project. I guess this is some setting in
either the ProjectTemplate.csproj och in the *.vstemplate file?
This is the content of my ProjectTemplate.csproj
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == ''
">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DEC78F42-230B-45C3-A932-72D05500075B}</ProjectGuid>
<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>$safeprojectname$</RootNamespace>
<AssemblyName>$safeprojectname$</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
</PropertyGroup>
and this is my *.vstemplate file
<TemplateData>
<Name>CommonProject</Name>
<Description>An ASP.NET MVC 4 project template</Description>
<Icon></Icon>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>Web</ProjectSubType>
<TemplateGroupID>Web</TemplateGroupID>
<TemplateID>8e9f1b5e-75a2-4bf1-8d1c-ab03c2c4d828</TemplateID>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>CommonProject</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<PromptForSaveOnCreation>true</PromptForSaveOnCreation>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<RequiredFrameworkVersion>4.0</RequiredFrameworkVersion>
</TemplateData>
Any ideas what's missing in my template to get the behaviour I want?
No comments:
Post a Comment