Getting Error Due To Different versions of Interop.Excel - How to clear the reference

S

Siv

Hi,
I referenced Excel via COM in References and selected the Excel Version 11.0
but somehow it picked up the Beta of Office 2007 in the Interop reference
that gets pulled in as well.

I decided to remove the Beta as I didn't want that being the version of
Excel that opened when accessing Excel from my C# program, since I did that
the project won't compile and gives the following error:

Assembly 'Interop.Excel, Version=1.5.0.0, Culture=neutral,
PublicKeyToken=null' uses 'office, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c' which has a higher version than referenced
assembly 'office, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c'

How do I get the project to compile, and why when I originally selected
Excel 11 from the COM References did the system automatically associate the
Microsoft.Office.Interop version 12.0.0.0??

It feels like DLL Hell all over again?
 
S

Siv

Hi,
As no-one replied, I exited VS and then renamed the solution folder, I then
created a new solution and imported just the forms and thus created a new
solution in the same location but leaving all the additional files created
by VS behind.
The new version works fine and will compile so no worries I seem to have
escaped from this problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top