简体   繁体   English

更改Visual Studio 2015扩展中项目中文件ProjectItem的内容吗?

[英]Change the contents of a file ProjectItem within a Project in a Visual Studio 2015 Extension?

How do I change the contents of a file/ ProjectItem within a given Project ? 如何更改给定Project文件/ ProjectItem的内容? I would like to replace all of its contents with a string. 我想用字符串替换其所有内容。

there is have a resolution of this question? 有没有解决这个问题的方法?

I want to make some changes in ProjectItem (CS file) by using VSIX package, and an only single way to do this that I see right now - it's read this file by FullPath , make changes, and then save changes. 我想通过使用VSIX包对ProjectItem (CS文件)进行一些更改,这是我现在看到的唯一的一种方法-它是通过FullPath读取此文件的,进行更改,然后保存更改。 I know that in ProjectItem have FileCodeModel property, but it is null. 我知道在ProjectItem具有FileCodeModel属性,但是它为null。

暂无
暂无

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

相关问题 Visual Studio扩展:从文件名或ProjectItem获取语言/文件类型 - Visual Studio extension: get language / file type from file name or ProjectItem 从Visual Studio扩展中找出ProjectItem的源控件状态 - Find out the source control state of a ProjectItem from a Visual Studio extension 从Visual Studio扩展中的ProjectItem获取Roslyn SemanticModel - Getting Roslyn SemanticModel from ProjectItem in Visual Studio extension 扩展Visual Studio根据文件路径获取ProjectItem或IVsHierarchy - Extending Visual Studio getting ProjectItem or IVsHierarchy based on file path 如何在Visual Studio 2015中预览资源文件内容? - How to preview resource file contents in Visual Studio 2015? 更改Visual Studio 2015社区的内置项目模板 - Change the built-in project templates of Visual Studio 2015 Community 在 Visual Studio 中获取文件的内容而无需从扩展中打开文件 - Getting the contents of a file in Visual Studio without opening the file from an extension Visual Studio 2015 WinForms项目中的“无法复制文件”生成错误 - “Unable to copy file” build error in Visual Studio 2015 WinForms project Visual Studio 2010:如何通过编辑器扩展在项目中创建和/或更新特定文件? - Visual Studio 2010: How do I create and/or update a specific file within a Project from an Editor Extension? Visual Studio 2015,没有 Visual Studio 扩展的 postgresql 的 create.edmx 文件 - Visual Studio 2015, create .edmx file for postgresql without visual studio extension
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM