Is This A Frame Work Conflict?
I didn't select a version of .NET because this question is spanning two versions (2005 and 2008).
I have both Visual Studio 2005 and Visual Studio 2008 installed on my machine.
VS 2005 contains all of the development platforms (VB, C#, etc)
VS 2008 is only a shell of Visual Studio and contains only BIDS (Business Intelligence Development Server - SSIS, SQL Reporting Services and SQL Server Analysis Services)
I was given a VB.NET 2005 project to make some modifications to. I was specifically told that it had to remain in 2005. This was fine with me as I do not have VB.NET 2008 (or above) anyway.
As soon as I opened the project up, I got a screen full of errors on the line:
Microsoft.Office.Interop.Excel starting with the very first imports line:
Imports Microsoft.Office.Interop.Excel
All of the necessary Excel references are in place…it works just fine on the other developer’s machine, who does not have any of the 2008 things installed that I have.
Is this a framework conflict?
Re: Is This A Frame Work Conflict?
Are you sure the references are OK? There aren't any little exclamation marks in a triangle when you expand the References node of the solution explorer is there?
The only other thing I can think of is the version of either the referenced Office version or the Office Interop version.
But then again, I don't have much experience with this in .NET.
-tg
EDIT - if you've got the space, try a VM with just VS2005... see if that helps.
Re: Is This A Frame Work Conflict?
I have VS2005, 2008 and 2010 all installed at the same time. One program, which was written in 2005, then ported into 2008, uses Excel interop. I don't recall ever having any issues with it. However, if you have the references, then you are probably dependent on the version of the interop. If you switch to using late binding, then you wouldn't need the references in the project, which would probably solve your problem anyways, as VS won't know enough to complain. Still, it doesn't really make much sense. The imports line isn't version specific, nor is it necessary. You should be able to get rid of that line and fully decorate the actual objects. If, when you try a fully decorated name, you don't get the items you want to use in intellisense, then your references aren't right, regardless of what it looks like. Late binding would take care of that, too, but you are playing with fire developing with late binding, as you don't get any intellisense help.
Re: Is This A Frame Work Conflict?
Quote:
Originally Posted by
Hack
I didn't select a version of .NET because this question is spanning two versions (2005 and 2008).
I have both Visual Studio 2005 and Visual Studio 2008 installed on my machine.
VS 2005 contains all of the development platforms (VB, C#, etc)
VS 2008 is only a shell of Visual Studio and contains only BIDS (Business Intelligence Development Server - SSIS, SQL Reporting Services and SQL Server Analysis Services)
I was given a VB.NET 2005 project to make some modifications to. I was specifically told that it had to remain in 2005. This was fine with me as I do not have VB.NET 2008 (or above) anyway.
As soon as I opened the project up, I got a screen full of errors on the line:
Microsoft.Office.Interop.Excel starting with the very first imports line:
Imports Microsoft.Office.Interop.Excel
All of the necessary Excel references are in place…it works just fine on the other developer’s machine, who does not have any of the 2008 things installed that I have.
Is this a framework conflict?
I had this issue previously. I doubt you have other version of MSOffice compared to Reference. Eg you have 10.0 and the reference to 11.0