简体   繁体   English

用于项目文件编辑的Visual Studio加载项(csproj)

[英]Add-in for Visual Studio for project file editing (csproj)

Do you know an add-in for visual studio which adds properties for C# projects? 你知道visual studio的加载项,它为C#项目增加了属性吗? csproj file format is very powerful but only small amount of options can be changed through the standard properties page. csproj文件格式非常强大,但只能通过标准属性页面更改少量选项。 For instance, I want to have several configurations and each of them should include it's own references. 例如,我想要有几个配置,每个配置都应该包含它自己的引用。 Or I just want to change the type of project from winforms to wpf or other one. 或者我只想将项目类型从winforms更改为wpf或其他类型。 In order to do stuff like that developer has to edit csproj by hands in text editor instead of using properties. 为了做这样的事情,开发人员必须在文本编辑器中手动编辑csproj而不是使用属性。 If you know that such add-in doesn't exist, do you think that it could be popular on codeplex? 如果你知道这样的加载项不存在,你认为它可能在codeplex上流行吗? or only small amount of developers realy need it? 或者只有少量开发人员需要它? what is your opinion? 你有什么意见?

How is it going? 最近好吗?

To edit project files inside of Visual Studio I use PowerCommands , but those things you can change "using properties" are those in Project Menu -> [Project Name] Properties. 要编辑Visual Studio内部的项目文件,我使用PowerCommands ,但您可以“使用属性”更改的项目是项目菜单 - > [项目名称]属性。 What PowerCommands does (among other things...) is allow you to easily edit the XML of a project opened inside Visual Studio so you get all the benefits of using Visual Studio to edit XML. PowerCommands的功能(除其他外...)允许您轻松编辑在Visual Studio中打开的项目的XML,以便您获得使用Visual Studio编辑XML的所有好处。 Makes sense? 说得通?

XML is hierarchical, so hardly you can fit it comfortably on a property list better than on a text editor. XML是分层的,所以很难让你在文本编辑器上更好地适应它。

About "I want to have several configurations and each of them should include it's own references", try creating templates for your projects, take a look there: Visual Studio Templates . 关于“我想要有几个配置,每个配置应包含它自己的引用”,尝试为您的项目创建模板,看一下: Visual Studio模板

So... you are looking for addins at codeplex? 那么......你在codeplex寻找插件? why not take a look at http://visualstudiogallery.msdn.microsoft.com there are free and paid addins, an some form codeplex too. 为什么不看看http://visualstudiogallery.msdn.microsoft.com有免费和付费的插件,也有一些形式的codeplex。 While you are on it, look for "Productivity Power Tools", "VSCommands 2010", "AllMargins" and "VS10x Code Map". 当您使用它时,请查找“Productivity Power Tools”,“VSCommands 2010”,“AllMargins”和“VS10x Code Map”。 I use them all, and they are certainly worth a look. 我全部使用它们,它们当然值得一看。 [Hmmm... I also use CodeRush, you can get CodeRush Xpress for free from http://www.devexpress.com ;)] [嗯......我也使用CodeRush,你可以从http://www.devexpress.com免费获得CodeRush Xpress;)]

Hope of being of help. 希望得到帮助。

A little late to the table but I wanted to remove VSCommands 2010 because all I use it for really is the edit project file and I don't like to just have extensions hanging around if I am not using them. 有点晚了,但我想删除VSCommands 2010,因为我使用它的确是编辑项目文件,如果我不使用它们,我不喜欢只有扩展。 I discovered from this blog: 我在这篇博客中发现:

http://blogs.msdn.com/b/habibh/archive/2009/07/01/the-quickest-way-to-edit-a-visual-studio-project-file.aspx http://blogs.msdn.com/b/habibh/archive/2009/07/01/the-quickest-way-to-edit-a-visual-studio-project-file.aspx

"There is a quick and easy way of editing your Visual Studio project file. When a project is "unloaded", either because you explicitly chose to unload the project using the "Unload Project" command or Visual Studio failed to load the project for some reason (eg project upgrade failed), you can right click on the project in Solution Explorer and select the "Edit " command, as shown below." “有一种快速简便的方法可以编辑Visual Studio项目文件。当项目被”卸载“时,要么是因为您明确选择使用”卸载项目“命令卸载项目,要么Visual Studio无法为某些项目加载项目原因(例如项目升级失败),您可以在解决方案资源管理器中右键单击项目并选择“编辑”命令,如下所示。“

It works like a charm! 它就像一个魅力!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Visual Studio 中添加对 .csproj 文件的项目引用? - How to add a project reference to a .csproj file in Visual Studio? 如何在Visual Studio加载项中获取文件的项目名称? - How to get project name of file in visual studio add-in? Visual Studio 2005外接程序项目模板 - Visual Studio 2005 Add-in Project Template 是否有Visual Studio加载项的配置类型文件? - Is there a config type file for Visual Studio Add-In? 无法使用 .csproj 文件在 Visual Studio 2022 中设置启动项目 - Unable to set startup project in Visual Studio 2022 with a .csproj file 使用EnvDTE API从Visual Studio加载项内部以编程方式将文件添加为C#项目中的链接 - Programmaticaly add file as a link in C# project from inside visual studio add-in using EnvDTE API 是否可以将自定义属性添加到Visual Studio使用的.csproj文件中 - Is it possible to add custom properties to a .csproj file use by Visual Studio $(TargetDir)对于Visual Studio 2017中的Microsoft Word加载项项目为空 - $(TargetDir) empty for Microsoft Word Add-In project in Visual Studio 2017 如何从Visual Studio加载项获取项目目录 - How to get the project directory from a Visual Studio Add-in Visual Studio和加载项卸载 - Visual Studio and add-in unloading
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM