本文介绍了拖放和杂项文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照以下步骤创建了一个自定义项目: http://msdn.microsoft.com/zh-cn/library/cc512961(VS.90).aspx

I created a custom project by following this:  http://msdn.microsoft.com/en-us/library/cc512961(VS.90).aspx

它可以正常工作.但是,它不允许我在解决方案资源管理器中的不同文件夹之间拖放项目,也不能在";添加新项"对话.请帮忙.

It works fine. But it does not allow me to drag and drop items between different folders in the solution explorere and also it does not show the miscllenious files lilke xml, txt etc. in the "Add New Item" dialog. please help.

推荐答案

> 对于您的第一个问题,我将尝试咨询该问题,请耐心等待.

> 对于第二个问题,您需要部署繁琐的文件项目模板.
现在以文本文件为例.

For your second question, you need to deploy the miscllenious file item templates.
Now I will take Text file for example.

1. >                            打开C:\ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ ItemTemplates \ CSharp \ General \ 1033,然后找到TextFile.zip.

1.   Open C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\General\1033, then find TextFile.zip.

2. >                           在C:\ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ ItemTemplates中创建一个文件夹,将其命名为SimpleProject.

2.   Create a folder in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates, name it SimpleProject.

3. >                             将TextFile.zip复制到新创建的文件夹SimpleProject中.

3.   Copy TextFile.zip to your new created folder SimpleProject.

4. >                             解压缩TextFile.zip,然后编辑TextFile.vstemplate,更改ProjectType节点,如下所示.

4.   Unzip the TextFile.zip, and then edit the TextFile.vstemplate, Change the ProjectType Node, it should look like below.

< ProjectType > SimpleProject </ ProjectType >

<ProjectType>SimpleProject</ProjectType>

     然后将TextFile.vstemplate和TextFile.txt压缩为TextFile.zip.用新的压缩后的TextFile.zip替换旧的TextFile.zip.

     Then Zip the TextFile.vstemplate and TextFile.txt to TextFile.zip. Replace the old TextFile.zip with the new zipped TextFile.zip.

如果要将项目模板添加到实验配置单元,只需将​​实验配置单元重置为 安装模板.

If you want to add the item template to experimental hive, you just need to reset the experimental hive to install the template.

如果要将Item模板添加到常规IDE中,则应调用devenv/installvstemplates和devenv /setup安装模板.

If you want to add the Item template to your normal IDE, you should call devenv /installvstemplates and devenv /setup to install the template.

完成我提到的步骤后,您会发现TextFile出现在添加新项"对话框中.

谢谢

Chao

 


这篇关于拖放和杂项文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 09:05