I know that similar questions have been asked here before, but I'm not sure that they really solve my problem if I do not understand them.
I am working on the application this morning, and I had no problems creating or restoring the solution, but after I went for lunch and then returned (I left the program open), I suddenly could not build it, since it returns 3 mistakes that I have not encountered before.
Error 1:
You cannot embed interop types from the 'office' assembly because the attribute 'ImportedFromTypeLib' or the attribute 'PrimaryInteropAssembly' is missing.
Error 2:
Cannot embed interop types from the 'office' assembly because the 'Guid' attribute is missing
Error 3:
Unable to load link library C: \ WINDOWS \ assembly \ GAC_MSIL \ Office \ 15.0.0.0__71e9bce111e9429c \ Office.dll ': the system cannot find the specified file. C: \ WINDOWS \ assembly \ GAC_MSIL \ Office \ 15.0.0.0__71e9bce111e9429c \ Office.dll
What causes these errors all of a sudden?
After checking in the project properties> Link> Add> COM, I see that the Office 15.0 object library is referenced. So what should I do? It seems strange that they appeared while the application was open?
David source
share