[英]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.