[英]Cannot save 'AssemblyInfo.cs' as it is not open in the editor
I'm trying to write a piece of code that will add an attribute to a project's AssemblyInfo.cs, but getting this exception:我正在尝试编写一段代码,将一个属性添加到项目的 AssemblyInfo.cs,但出现此异常:
System.Runtime.InteropServices.COMException: 'Cannot save 'C:\Projects\ClassLibrary1\ClassLibrary1\Properties\AssemblyInfo.cs' as it is not open in the editor.'
ClassLibrary1
contains AssemblyInfo.cs
which I'm trying to edit. ClassLibrary1
包含我正在尝试编辑的AssemblyInfo.cs
。 Does anyone know how to fix this problem?有谁知道如何解决这个问题?
找到了解决办法:我用ProjectItem.Open(String)方法强制打开AssemblyInfo.cs
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.