gpt4 book ai didi

visual-studio-2010 - 将文件夹添加到多项目 Visual Studio 2010 模板

转载 作者:行者123 更新时间:2023-12-04 12:56:13 24 4
gpt4 key购买 nike

我一直在为 Visual Studio 开发一个完整的垂直堆栈模板(如果你想帮忙,它在 Github 上:https://github.com/Adron/infrastructure

我的问题是,我无法在解决方案的根目录中为程序集添加文件夹。单独的项目模板(我在整个父解决方案模板中有三个)具有许多单独的元素,例如文件和文件夹。但是当我尝试将类似的内容添加到父模板时,它报告它在此 XML 模式/文件中无效。

我当前的解决方案 XML 文件如下所示:

<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>
<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>

关于如何添加文件夹或单个 Assets 的任何想法?谢谢...

最佳答案

这是我的解决方案的一部分,其中包括解决方案项:

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

这有帮助吗?

关于visual-studio-2010 - 将文件夹添加到多项目 Visual Studio 2010 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5379558/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com