对 mscorlib 参考感到好奇
我对不同项目模板中的 mscorlib
引用感到好奇。
当我创建 WPF 项目时,我在引用文件夹中找不到 mscorlib
文件。我认为它是默认引用的。
当我创建Silverlight项目时,我可以在文件夹中找到它。它链接到 Silverlight 框架。然后我尝试删除它,当然无法编译。然后我尝试再次将此程序集重新添加到引用中;它无法添加,也无法再编译。很奇怪。
当我创建 MonoDroid 项目时,我仍然可以找到 mscorlib
引用。但是当我删除这个引用后,该项目仍然可以编译;但我不确定它是否运行良好。
有谁知道是什么原因导致这种行为?
谢谢, 霍华德
I am curious as to the mscorlib
reference in different project templates.
When I create a WPF project, I cannot find the mscorlib
file in the reference folder. I think it is referenced by default.
When I create a Silverlight project, I can find it in the folder. It links to the Silverlight framework. Then I tried to delete it and of course it cannot be compiled. Then I tried to re-add this assembly to the reference again; it cannot be added and cannot be compiled anymore. It's weird.
When I create a MonoDroid project, I can still find the mscorlib
reference. But after I deleted this reference, the project still can be compiled; but I'm not sure if it runs fine.
Does anyone knows what causes this behavior?
Thanks,
Howard
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这样就不用有人去谷歌搜索了。我缺少 mscorlib 并在项目文件中找到了 CuiPengFei 建议执行此操作的确切方法,此处:Microsoft Connect 反馈
James Wightman 于 2009 年 12 月 9 日凌晨 2:52 发布的解决方法如下:
Just so someone does not have to google it. I was missing the mscorlib and found the exact way CuiPengFei suggested to do this in the project file, here:Microsoft Connect Feedback
in the workaround which was posted by James Wightman on 12/9/2009 at 2:52 AM below:
这是一个已知问题,在 VS2010 中无法修复。解决方法是编辑项目文件并手动重新添加引用。
This is a known issue that will not be able to fix for VS2010. The workaround is to edit the project file and manually re-add the reference.