Solved

Com Addin not getting enabled when i migrate the code from .net framework 3.5 to .net framework 4.5

Posted on 2015-01-29
12
138 Views
Last Modified: 2015-05-08
Hello,

I migrated my C# code from .net 3.5 to .net 4.5. Now i am unable to re enable the com add-in in the excel. Please help if i am missing any steps.

Regards,
Siva prasanth.
0
Comment
Question by:pkoivula
  • 9
  • 3
12 Comments
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40579618
what errors are being shown on the screen and in the event logs
0
 

Author Comment

by:pkoivula
ID: 40596791
I've requested that this question be deleted for the following reason:

I didn't receive appropriate response even after posting comments the expert answer.
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40596792
YOU  didn't answer my questions
0
 

Author Comment

by:pkoivula
ID: 40597400
David,
I earlier answered the question and deleted as i didn't get any updates.

Here is the error:

       Here is the error

    *** Assembly Binder Log Entry  (2/3/2015 @ 2:30:54 PM) ***

    The operation failed.
    Bind result: hr = 0x80070002. The system cannot find the file specified.

    Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    Running under executable  C:\Program Files\Microsoft Office\Office12\EXCEL.EXE
    --- A detailed error log follows.

    === Pre-bind state information ===
    LOG: User = Domain\Username
    LOG: DisplayName = MyAssembly.resources, Version=2.0.73.99, Culture=en, PublicKeyToken=a68d408e0b55e55b
     (Fully-specified)
    LOG: Appbase = file:///C:/Program Files/MyCompany/MyProduct/
    LOG: Initial PrivatePath = NULL
    LOG: Dynamic Base = NULL
    LOG: Cache Base = NULL
    LOG: AppName = NULL
    Calling assembly : MyAssembly, Version=2.0.73.99, Culture=neutral, PublicKeyToken=a68d408e0b55e55b.
    ===
    LOG: This bind starts in default load context.
    LOG: No application configuration file found.
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
    LOG: Post-policy reference: MyAssembly.resources, Version=2.0.73.99, Culture=en, PublicKeyToken=a68d408e0b55e55b
    LOG: The same bind was seen before, and was failed with hr = 0x80070002.
    ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002).
0
 

Author Comment

by:pkoivula
ID: 40632462
Any updates..
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40632499
   LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
    LOG: Post-policy reference: MyAssembly.resources, Version=2.0.73.99, Culture=en, PublicKeyToken=a68d408e0b55e55b
Still using .net 3.5

Bind result: hr = 0x80070002. The system cannot find the file specified. Which file is it looking for..

can you run this in a debugger or use procmon and exclude other processes to see what file is failing?
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

Author Comment

by:pkoivula
ID: 40632765
David,

I am seeing several results  for excel.exe . either success or name not found.  I couldnt find error.
0
 

Author Comment

by:pkoivula
ID: 40695353
Any updates on this question ?
0
 

Author Comment

by:pkoivula
ID: 40695695
David Johnson , do this statement helps us for further analysis.

Unhandled exception at 0x0F80B548 (********ShimProject.dll) in EXCEL.EXE: 0xC0000005: Access violation reading location 0x00000000.
0
 

Author Comment

by:pkoivula
ID: 40726771
Got the sol;ution to resolve Unhandled exception at 0x0F80B548 (********ShimProject.dll) in EXCEL.EXE: 0xC0000005: Access violation reading location 0x00000000.

I updated msaddndr.dll version to 6.1.98.16.
0
 

Accepted Solution

by:
pkoivula earned 0 total points
ID: 40757785
Finally i figured out and got the issue resolved. here are the steps i performed.

1. updated msaddndr.dll version to 6.1.98.16, this dll was used in shim project.

2.Created a config file with name excel.exe.config and copied the file in the  folder of excel.exe location (Example for office 2007 it is C:\Program Files\Microsoft Office\Office12). The content of the config file is :

<?xml version="1.0"?>
   <configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
     <requiredRuntime version="v4.0.30319" />
  <supportedRuntime version="v4.0.30319" />
    </startup>
</configuration>

Performing above changes resolved the issue.
0
 

Author Closing Comment

by:pkoivula
ID: 40766391
This can be graded as A because it is working fine and i tested the changes on excel 2007 and excel 2010.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use a BLANK in a complex formula 3 16
Office 2010 and Skype for Business 5 332
What the difference between blend and Visual Studio 3 77
Word 2010 mail merge 3 63
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now