I'm trying to run an old Project which was written years ago on a new System. It's an .NET Project and it has references to Microsoft.Office.Interop.Excel, ...Outlook, ...Word, etc.
When i run the programm i get the Error message "The file or assembly "Interop.Microsoft.Office.Core" or a dependency of it was not found. An attempt was made to load a file with an incorrect format."
=== State information before binding ===
LOG: DisplayName = Interop.Microsoft.Office.Core
(Partial.)
WRN: Partial binding information was provided for an assembly:
WRN: Assembly name: Interop.Microsoft.Office.Core | Domain ID: 2
WRN: Partial binding occurs when only part of the assembly display name is provided.
WRN: This may cause the collection folder to load an incorrect assembly.
WRN: Specify the text identity of the assembly with full details.
WRN: This includes the simple name, version and culture, and public key token.
WRN: For more information and general solutions to this problem, see the whitepaper at "http://go.microsoft.com/fwlink/?LinkId=109270".
LOG: Appbase = file:///C:/Users/krebesli/OneDrive - TRUMPF SE + Co. KG/Project - Copy/TruTopsSales/TruTopsSales/
LOG: Original PrivatePath = C:\Users/krebesli/OneDrive - TRUMPF SE + Co. KG\Project - copy\TruTopsSales\TruTopsSales\bin
Call from Assembly : (Unknown).
===
LOG: This binding starts in default load context.
LOG: The application configuration file is used: C:\Users\krebesli\OneDrive - TRUMPF SE + Co. KG\Project - copy\TruTopsSales\TruTopsSales\web.config.
LOG: The host configuration file is used: \srvditz1\home$\krebesli\Documents\IISExpress\config\aspnet.config.
LOG: The computer configuration file of C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config is used.
LOG: policy is not currently applied to the reference (private, custom, partial, or path-based assembly binding).
LOG: download of new URL file:///C:/Users/(username)/AppData/Local/Temp/Temporary ASP.NET Files/vs/2636e7dd/88283cb5/Interop.Microsoft.Office.Core.DLL.
LOG: Download of new URL file:///C:/Users/(username)/AppData/Local/Temp/Temporary ASP.NET Files/vs/2636e7dd/88283cb5/Interop.Microsoft.Office.Core/Interop.Microsoft.Office.Core.DLL.
LOG: Download from new URL file:///C:/Users/(username)/.../.../.../bin/Interop.Microsoft.Office.Core.DLL.
ERR: Assembly setup could not be completed (hr = 0x8007000b). The search was terminated.
I don't know whats wrong. I never use the Interop.Microsoft.Office.Core in my Code
What i've tried so far:
- Delete the reference to Microsoft.Office.Core -> Error still occurs
- Delete all .Office References and add Microsoft Office 16.0 Object Library from reference Manager -> COM
Does anyone have any clues what i can do? I dont know why this error occurs...
Do i maybe need to install office again. Or maybe .NET again.
Maybe somethings wrong with that...
EDIT:
When i search for "office" in the reference tab it doesnt find anything as you can see here
I think the problem could be that when i look at the properties of the office.core reference it says local copie: false.
but i also cant change that setting...