Visual Studio - Same code gives error on one site, not another

in VS2013 Ultimate, this code works fine in one website, but gives the errors below in another (both sites local, on same machine).

    Imports DocumentFormat.OpenXml.Packaging
    Imports DocumentFormat.OpenXml.Presentation
    Imports A = DocumentFormat.OpenXml.Drawing
    Imports System.Collections.Generic
     
        Dim slideIndex As Integer = 1
        Dim wrkSlideIDList As New SlideIdList
        wrkSlideIDList = wrkPreso.Presentation.SlideIdList
        Dim n As Object = wrkSlideIDList.Count
        Dim x2 As Object = wrkSlideIDList(slideIndex)

Errors:

    Class 'DocumentFormat.OpenXml.Presentation.SlideIdList' cannot be indexed because it has no default property
   
    'Count' is not a member of 'DocumentFormat.OpenXml.Presentation.SlideIdList'.


Another thing is that on the "working" site, I can comment out ALL the Imports, and while that causes many other errors, it won't cause the errors above.

I've compared the References between the two sites (twice), and they are the same (best I can tell).   I may not have compared the references properly, but what else might I look for?
LVL 2
codequestAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
Make sure it's the same version.  EG:  you could be referencing OpenXML or OpenXml.Presentation and have two different versions of the dll.
0
codequestAuthor Commented:
Thanks for the input.   DocumentFormat.OpenXML is the only related reference, and it has the same version number in the Reference Manager in both sites.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
codequestAuthor Commented:
UPDATE:

I found a workaround:

For slideIndex = 0 To wrkSlideIDList.ChildElements.Count - 1
    wrkSlideID = wrkSlideIDList.ChildElements(slideIndex)

which works fine.  However, I'll check out any suggestions for a while, since this is an area I'm not very knowledgeable about.
0
codequestAuthor Commented:
My solution worked.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.