Using Excel = Microsoft.Office.Interop.Excel Compilation Error

In my MVC 5 application, I want to use the library Microsoft.Office.Interop.Excel. I use Visual Studio 2013 and Office 2013. I added a link Microsoft.Excel 15.0 Object Library, and in my class I added. using Excel = Microsoft.Office.Interop.Excel;When I click build, it shows no errors and reports that Build Complete, but when I launch my Application I get this error

 Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1748: Cannot find the interop type that matches the embedded interop type 'Microsoft.Office.Interop.Excel.Application'. Are you missing an assembly reference?

Source Error:

[No relevant source lines]

Source File:    Line: 0 

What could it be?

+4
source share
3 answers

MS 2010, 2013 . . , DLL, - OpenXml sdk.

, , - . .

, interop ''. ? , , , - . , assembly1, PIA Embed Interop Types, true. Assembly1 PIA, , . , 2, 1 . , Assembly2 PIA . , PIA Embed Interop Types true. , PIA , .

http://blogs.msdn.com/b/vbteam/archive/2010/06/11/troubleshooting-errors-when-embedding-type-information-doug-rothaus.aspx

+9

, . Excel.Application, , Application Application (- , ).

, , private internal, , - ( .)

0

dll Bin .

-1
source

All Articles