1

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.

Jason
  • 51,583
  • 38
  • 133
  • 185

1 Answers1

2

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.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • i figured this was it. i did some digging and discovered that you can modify this in the project's properties > compile > advanced compile options... > target framework. Thank you so much! – Jason Nov 08 '10 at 20:50
  • almost two years later, ran across this same problem when i just updated my `MySql.Data` .dlls to the newest version. Googled it, this came up. Solved my problem again. I <3 you, SO. – Jason Jul 02 '12 at 02:16