none
VS Studio 2015 Vs VS Studio 2017 - missing dlls RRS feed

  • Question

  • Hello,

    I tried to run my application using VS 2015 14.0.25420.01 update 3 and it worked in debug mode as well as in the release mode. I published the same application and it worked smoothly. No issues for any of the functionalities.

    But when I open the same application with VS 2017 version 15.9.4 and the application works in the debug and release modes but when I publish the application and run it, it gave me the exception System.IO.FileNotFoundException: showing could not load or assembly interop.excel. version=1.4.0.0 when I try to access the Excel Files through interop.excel. 

    The copy local is set to TRUE for this and I have it added in the references. But it still throws the exception. 

    There are two applications for which I have the same trouble.

    Could you please let me know what I should do here?

    Thanks

    Friday, May 10, 2019 5:01 PM

All replies

  • Hi DSangh,

    Welcome to the MSDN forum.

    Could you share us what’s project type you used?

    Did you change the dll version to 12.0.0.0 for testing? Please Add reference > Browse > C: > Windows > assembly > GAC > Microsoft.Office.Interop.Excel > 12.0.0.0_etc > Microsoft.Office.Interop.Excel.dll

    And please check some property for the assembly to be generated/created in my bin/Debug directory. If it not exists. Then Check out the Embedd Interop Types property in reference properties.

    Here is a similar thread could be reference: https://stackoverflow.com/questions/8575928/could-not-load-file-or-assembly-microsoft-office-interop-excel .

    Sincerely

    May


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, May 14, 2019 8:47 AM
    Moderator
  • Hi DSangh,

    What about this issue in your side? Could you share us the latest information in your side?

    If it still has this issue and May's suggestions have no help.

    Could you share us how you publish your app? Create the Setup with the Click-once or others?

    Please also check that whether it is related to the .Net Framework version.

    If you get any update, please feel free to share it here, we will follow up it in time.

    Sincerely,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 21, 2019 6:49 AM
    Moderator
  • Hello May,

    I tried to add the reference from the path you provided: "Please Add reference > Browse > C: > Windows > assembly > GAC > Microsoft.Office.Interop.Excel > 12.0.0.0_etc > Microsoft.Office.Interop.Excel.dll"

    But in GAC folder, I don't have Microsoft.Office.Interop.Excel. Should I search for that in different folder?

    I have created VB.NET Windows Application Project and when I publish the project through VS 2015, I don't get any issues. 

    Looking forward to your answer.

    Thanks,

    Dipti


    DSangh

    Tuesday, May 21, 2019 11:31 AM
  • Hello Jack,

    I am using "Create the Setup with the Click-once" option.



    DSangh

    Tuesday, May 21, 2019 11:32 AM
  • Hi DSangh,

    Can you create the same app using the VS2017? I mean that not open and run the old VS2015 project in VS2017.

    If it is the click-once app, do you mean that you install the setup.exe in another machine? If so, whether another Environment has no the specific assembly there.

    As you said that it works well in VS2015, do you install the setup.exe in the same machine which has the VS2015 or the same Office version as your VS2015 machine?

    How did you really reference this assembly in your VS2015 or VS2017?

    If you add it as the reference just right the reference in solution explore and then add it. Could you check the version number for this assembly in the Properties window?

    My understanding is that if your project need to refer to one assembly, it needs to have the same version as it during you install the setup.exe app in another machine especially the same Office version like Office 2010 or others.

    If I have misunderstood this issue, feel free to let me know.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 22, 2019 7:41 AM
    Moderator