是什么告诉Visual Studio哪些项目模板可用于向项目添加项目? [英] What tells Visual Studio which item templates to make available for adding an item to a project?

查看:140
本文介绍了是什么告诉Visual Studio哪些项目模板可用于向项目添加项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望项目中的Add-> View ...上下文菜单项可以作为类库开始,就像在一个以MVC 4项目开始的项目中一样。我已经给了.csproj文件一个粗略的阅读,但我没有看到任何说法,这是一个MVC项目,那么VS怎么知道这个?

I would like to have the Add->View... context menu item available in a project that starts out as a class library, just as it is available in a project that starts out as an MVC 4 project. I have given the .csproj file a cursory read through, but I don''t see anything saying, "This is an MVC project", so how does VS know this?

推荐答案

我不确定我理解您的问题,但所有VS模板都存储在Visual Studio目录中。您可以创建自己的或修改现有的(请参阅我的有关Visual C ++ Express的文章)。但是,如果您拥有Visual Studio的完整版本,则可以从现有项目中创建新模板。





VS不知道它是什么类型的项目,它只有一组要编译的文件和一组用于链接对象或将它们组合成库或DLL的命令。此信息保存在 .csproj 文件中,然后 msbuild 使用该文件生成实际的编译/ linker / lib命令。

[/ edit]
I''m not sure I understand your question, but all the VS templates are stored in the Visual Studio directories. You can create your own or modify the existing ones (see my article about Visual C++ Express). However, if you have the full version of Visual Studio you can create new templates from existing projects.

[edit]
VS does not know what type of project it is, it just has a set of files to be compiled and a set of commands to link the objects or combine them into a library or DLL. This information is held in the .csproj file which is then used by msbuild to generate the actual compilation/linker/ lib commands.
[/edit]


这篇关于是什么告诉Visual Studio哪些项目模板可用于向项目添加项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆