Microsoft.Office.Interop does not exist SDK 6 .net framework 4.7 office365

Ladrier, Quentin 21 Reputation points
2022-07-27T10:22:59.607+00:00

Hello,

i encounter issue with a C# project i have to maintain. it has been created some years ago by someone leave.
he use sharpdeveloper framework 3.5 and sdk 4 instead of VS.

Now i need to modify but encounter an issue with Microsoft.Office "name 'Office' not in spacename 'Microsoft'.

i use VScode + dotnet 6 and framework 4.7 so i retarget and only issue is this spacename.

could you help ? advice ?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,279 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,509 questions
0 comments No comments
{count} votes

Accepted answer
  1. Karen Payne MVP 35,191 Reputation points
    2022-07-27T10:52:46.197+00:00

    In regards to dotnet 6 and framework 4.7, you can't mix these two frameworks. Let's say the office code is in 4.7 framework and the .NET Core 6 consumes it, this will not work.

    You need to use .NET Core 6 for everything or Framework 4.7 for everything.


0 additional answers

Sort by: Most helpful