升级到4.0 Framework,然后降级,现在找不到Linq命名空间?
我刚刚从VS2008升级到VS2010。在此过程中,我允许它将我的 DLL 升级到 4.0。我认为这不是一个好主意,现在我已经放弃了。
在 VS2010 中一切正常,但是当它到达我的 CI 服务器 (CruiseControl.Net) 时,我收到以下错误:
命名空间“System”中不存在类型或命名空间名称“Linq”(您是否缺少程序集参考?
3.5 在服务器上,使用 3.5 的其他项目构建得很好,所以我不认为这是一个框架问题
有人有任何提示吗?
I just upgraded from VS2008 to VS2010. In the process, I allowed it to upgrade my DLL's to 4.0. I've decided that wasn't a good idea and now I've rolled back.
It all works fine in VS2010, but when it hits my CI server (CruiseControl.Net), I get an error of:
The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?
3.5 is on the server, and other projects that use 3.5 build fine, so I don't think it's a framework issue.
Anyone have any hints?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保您有对 System.Core.dll 的引用。
Make sure you have a reference to System.Core.dll.
我确实引用了 System.Core,但事实证明,对于我的一个项目,当我降级时,它没有将这一点添加回我的项目文件中:
其中的关键部分是RequiredTargetFramework。我之所以知道这一点,是因为不仅没有找到 Linq,而且还没有找到 Func<>。和扩展方法属性。
3.5 的东西都缺失了。
I do have a reference to System.Core, but it turned out for one of my projects, when I downgraded, it did not add this bit back into my project file:
The key part there being the RequiredTargetFramework. I was clued into this because it wasn't only Linq that wasn't being found, but also Func<> and Extension method attributes.
It was all 3.5 stuff that was missing.