Added MS Excel 16.0 Object Library but Error says Version=15.0.0.0

VkS 21 Reputation points
2020-07-07T13:39:07.517+00:00

Hi All,

New bee asking the question after one day's searching on line.

Visual Studio 2019 Community. Windows 365 version 16.0.12827.20328

Added the reference "Microsoft Excel 16.0 Object Library", Version 1.9.

Used the code "Application excel = new Application();"

Then got error below:
System.IO.FileNotFoundException: 'Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. The system cannot find the file specified.'

I donot understand why the error is saying something like "version 15.0.0.0 is not found" when I specified a version 16.0 when adding the reference.

Could anyone tell me if I'm after the wrong clue?

It would be even better if you can point me to the solution.

Many thanks!

VkS

Community Center Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2020-07-07T14:01:25.717+00:00

    Visual studio is not currently supported here on QnA. They're actively answering questions in dedicated forums here.
    https://developercommunity.visualstudio.com/spaces/8/index.html
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=visualstudiogeneral
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsto

    --please don't forget to Accept as answer if the reply is helpful--


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. VkS 21 Reputation points
    2020-07-07T23:27:12.82+00:00

    Thanks, DSPatrick!

    I will post my questions there.

    Cheers!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.