Results 1 to 4 of 4

Thread: Is This A Frame Work Conflict?

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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?

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    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.
    My usual boring signature: Nothing

  4. #4
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Is This A Frame Work Conflict?

    Quote Originally Posted by Hack View Post
    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
    Please mark you thread resolved using the Thread Tools as shown

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width