开发者

Adding an folder to a multiple project Visual Studio 2010 Template

开发者 https://www.devze.com 2023-02-17 23:31 出处:网络
I\'ve been working on a full vertical stack template for Visual Studio (It\'s on Github if you\'d like to help out:https://github.com/Adron/infrastructure

I've been working on a full vertical stack template for Visual Studio (It's on Github if you'd like to help out: https://github.com/Adron/infrastructure

My problem is, I have not been able to add a folder for assemblies in the root of the solution. The individual project templates (which I have three in the overall parent solution template) have many individual elements, such as files and folders. But when I try to add anything like that to the parent template it reports that it is not valid in this XML schema/file.

My current solution XML file looks like this:

<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="ProjectGroup">
  <TemplateData>
    <Name>ASP.NET MVC 3 + Razor + Machine.Specifications Infrastructure Solution</Name>
    <Description>This Visual Studio Template provides the following pieces for getting a kick start when building well designed web sites using good patterns.</Description>
    <EnableEditOfLocationField>true</EnableEditOfLocationField>
    <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
    <ProvideDefaultName>true</ProvideDefaultName>
    <Icon>Icon.ico</Icon>
    开发者_如何学Go<ProjectType>CSharp</ProjectType>
    <SortOrder>1000</SortOrder>
    <CreateNewFolder>true</CreateNewFolder>
    <DefaultName>Infrastructure</DefaultName>
    <LocationField>Enabled</LocationField>
    <PreviewImage>Preview.png</PreviewImage>
  </TemplateData>
  <TemplateContent>
    <ProjectCollection>
      <ProjectTemplateLink ProjectName="Infrastructure.Web">Web\MyTemplate.vstemplate</ProjectTemplateLink>
      <ProjectTemplateLink ProjectName="Infrastructure.Specifications">Specifications\MyTemplate.vstemplate</ProjectTemplateLink>
      <ProjectTemplateLink ProjectName="Infrastructure.Data">Data\MyTemplate.vstemplate</ProjectTemplateLink>
    </ProjectCollection>
  </TemplateContent>
</VSTemplate>

Any ideas on how to add folders or individual assets? Thanks...


Here's part of my solution that includes Solution Items:

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8C6F0281-2022-4F98-A856-590C5FE26BC1}"
    ProjectSection(SolutionItems) = preProject
        ..\Build.bat = ..\Build.bat
        ..\Build.proj = ..\Build.proj
        ..\ClickToBuild.bat = ..\ClickToBuild.bat
        ..\DeployStage.bat = ..\DeployStage.bat
        LocalTestRun.testrunconfig = LocalTestRun.testrunconfig
        Performance1.psess = Performance1.psess
    EndProjectSection
EndProject

Does that help any?

0

精彩评论

暂无评论...
验证码 换一张
取 消