程序集未被识别
我不久前使用 VS05(或 VS08?不太确定)构建了一个 VB Windows 窗体应用程序,最近我已转换为使用 VS10。我引用了一个名为 ExcelPackage 的 .dll (另一篇文章,用法),以便我可以在服务器端创建/操作 Excel 文档。这个应用程序在我的旧电脑(PC/Vista)上运行良好多年。但是,我尝试将其移动到我的新计算机(PC/Win7 64 位)上,但无法让它识别 ExcelPackage
.dll。
我尝试在 VS10 中重新编译 .dll,并将新的 .dll 放入我的 bin
文件夹中并重新引用它。当我这样做时,在我尝试构建之前,我的所有错误都会消失,并且我实际上能够使用 VS10 的内置功能导航该类(将鼠标悬停在 Imports OfficeOpenXml
上)获得一个下拉箭头,允许您浏览课程)。 构建后,我的 Imports OfficeOpenXml
语句下出现绿色波浪线(找不到引用)。
我做了一些研究,发现包含 System.IO.Packaging 的 .dll 已在 .NET 3.0 中移动,甚至重新引用了新的 .dll、重新构建、重新添加、重新引用,仍然没有骰子。
我是否遗漏了某些内容,或者如何让我的应用程序识别该程序集,以便我可以编译并继续工作?
谢谢。
I built a VB Windows Forms application a while back using VS05 (or VS08? Not exactly sure) that I've recently converted to use VS10. I reference a .dll called ExcelPackage (another article, usage) so that I can create/manipulate Excel docs serverside. This app has worked fine on my old computer (PC/Vista) for a number of years. However, I have tried to move it to my new computer (PC/Win7 64-bit), and I can't get it to recognize the ExcelPackage
.dll.
I have tried recompiling the .dll in VS10 and dropping the new .dll in my bin
folder and re-referencing it. When I do this, before I try building, all my errors go away and I am actually able to navigate the class using VS10's built in ability (mouse over Imports OfficeOpenXml
and you get a dropdown arrow that allows you to go through the classes). After I build, I get a green squiggly under my Imports OfficeOpenXml
statement (can't find the reference).
I did some research and discovered that the .dll containing System.IO.Packaging
has been moved around in .NET 3.0 and even re-referenced the new .dll, rebuilt, re-added, re-referenced, still no dice.
Am I missing something, or how do I get my application to recognize this assembly so that I can compile and continue working?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为该项目有什么特别之处。请注意,解决方案和项目需要转换。当这种情况发生时,您最终将瞄准 .NET 2.0 框架。这不会很好地工作,它有一个对 WindowsBase 的程序集引用,一个 3.0 程序集。确保更新目标。
I don't see anything special about that project. Do note that the solution and project need to be converted. When that happens, you'll end up targeting the .NET 2.0 framework. That won't work out well, it has an assembly reference to WindowsBase, a 3.0 assembly. Make sure you update the target.