在新计算机上编译时出现奇怪的警告并缺少 _Accessor
我最近不得不重新安装我的开发计算机,包括重新安装 VS2010。据我所知,我按照以前的方式重新安装了所有内容。但是,当我编译项目时,我收到一堆以下形式的错误:
C:\Work\CaseTrakker_v5\CaseTrakker_v5_5\Tests\CaseTrakkerCore.ComponentModel.Test\ComponentModel\NotifyPropertyChangeBaseTest.cs(100,63): error CS0246: The type或找不到命名空间名称“NotifyPropertyChangeBaseRef_Accessor”(您是否缺少 using 指令或程序集引用?)
另外(可能相关)我的解决方案中的大多数项目都会收到此警告:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets(287,9): warning CS1691:“2008”不是有效的警告编号
我有另一台开发计算机,具有相同版本的 Visual Studio 和相同的源代码(从版本控制中获取),并且所有内容都可以顺利编译。
显然,我在安装时做错了,但我已经用尽了我能想到的一切。我真的不想(再次)返回并从头开始重新安装所有内容。
有什么想法吗?
大卫·穆林
I had to resurface my development computer recently, including reinstalling VS2010. So far as I can tell, I reinstalled everything the same as previously. However, when I compile my project I get a bunch of errors of the form:
C:\Work\CaseTrakker_v5\CaseTrakker_v5_5\Tests\CaseTrakkerCore.ComponentModel.Test\ComponentModel\NotifyPropertyChangeBaseTest.cs(100,63): error CS0246: The type or namespace name 'NotifyPropertyChangeBaseRef_Accessor' could not be found (are you missing a using directive or an assembly reference?)
Also (and possibly related) I get this warning for most projects in my solution:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.CSharp.targets(287,9): warning CS1691: '2008' is not a valid warning number
I have another development machine with the same version of Visual Studio, and the same source code (fetched from version control), and everything compiles without incident.
Clearly, I have done something wrong with the installation, but I've exhausted everything I can think of. I'd really rather not have to go back and reinstall everything from scratch (again).
Any ideas?
David Mullin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此帖子是将这种行为归咎于 StyleCop (R#)。可能在您的项目或解决方案中输入了一些无法再解决的信息。您安装了 StyleCop 或 Resharper 吗?重新铺装后目前是否已安装?
This post is blaming StyleCop (R#) for this behavior. Is problably entered some information in your projects or solutions that cannot be resolved anymore. Did you have installed StyleCop or Resharper? And is it installed currently after resurfacing?
因此,事实证明,我在重新安装计算机时忽略了一个重要步骤 - 我没有安装 VS 2010 SP1。我这样做了,两个问题都消失了。
感谢您的关注。
大卫·穆林
So, it turns out that there was one important step that I omitted when resurfacing my machine - I didn't install VS 2010 SP1. I did this, and both issues went away.
Thanks for the attention.
David Mullin