Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Error RegSvr32

(0) ShareShare
ReportReport
Posted on by 2,560

Hi All,

I met an error below. How could it happen and how to solve the problem below?

Thousand thanks for any help.

Best Regards,

Vanessa

*This post is locked for comments

  • Vanessa Shin Profile Picture
    Vanessa Shin 2,560 on at
    RE: Error RegSvr32

    Hi Mandal,

    Thanks for your suggestion. I will try the steps that you provided and inform you again once I solved. Thanks again.

  • Verified answer
    Snehanshu Mandal Profile Picture
    Snehanshu Mandal 560 on at
    RE: Error RegSvr32

    Hi Venessa,

    I did some research on this and came to a conclusion which probably will solve your problem-

    Assumptions:

    dll (assembly is created in c# (or in .net environment and not in native com environment like vb6)

    If the above assumption is true then you need follow certain guideline to avoid various different issues:

    1. Mention assembly property:

      open your custom class project in visual studio and

      - Go to the property of the project and click on the 'Assembly Information' button in 'Application' tab (marked yellow)

      4.JPG

      in the screen open, check the 'Make Assembly COM visible' (marked yellow)

      Build the dll

    2. As this is created in .net environment, it can not be registered using regsvr32 and you need to use regasm command. you can find the regasm.exe in 'C:\Windows\Microsoft.NET\Framework\v2.0.50727'. 
    3. Run command prompt in administrator mode (right click and choose 'run as administrator'
    4. in command prompt, change the folder to C:\Windows\Microsoft.NET\Framework\v2.0.50727 and run regasm as follows:

    I had copied the dll file in the same folder and that's why I have not mentioned the full path of the file in the command prompt.

    if you see closely, I tried to register it twice. I got an error first time ''No types were registered'. This happens if we don't mention 'Make assembly COM visible' (as described in step 1 here)

    Once I made the assembly COM visible as described in step 1, my 2nd attempt to register it was successful.

    Please note, all these manual registration process can be avoided using a simple step -

    - Open your class project in visual studio in administrator mode (right click and say 'run as administrator')

    - open the property window of the class and go to 'Build' tab

    - go to the bottom of the screen and check the 'Register for COM interop' (marked yellow in bellow screenshot -

    - rebuild the dll.

    this time system will register the dll for you and you don't need to register it separately

    it's important to run the visual studio in administrator mode otherwise, you will receive 'access denied' error' 

     

    Hope the above explanation will help you in troubleshooting your error. Do let me know if it is resolved.

    Thanks

    Snehanshu

  • Marshal Profile Picture
    Marshal 436 on at
    RE: Error RegSvr32

    Hi

    I guess u are using NAV 2013 R2 or 2013, go to the dotnet variable properties and make it run on client to yes and try

    Thanks

    marshal

  • Suggested answer
    jcastro Profile Picture
    jcastro 2,245 on at
    RE: Error RegSvr32

    Hello Vanessa,

    In case you are running a 64 bit OS. Did you check you are using the right version of regsvr? Check this link for more info: support.microsoft.com/.../282747

  • Suggested answer
    Snehanshu Mandal Profile Picture
    Snehanshu Mandal 560 on at
    RE: Error RegSvr32

    I just tried registering a .dll with the command and it worked. Only thing that I kept both the .dll and .tlb file in the same folder (when you created the add-in, you will have .dll as well as  .tlb file)

    Try putting the .tlb file along with .dll file in the same folder.

    I will try some more scnario to simulate the error.

    also you can refer to following link from microsoft support -

    http://support.microsoft.com/kb/249873

     

  • Vanessa Shin Profile Picture
    Vanessa Shin 2,560 on at
    RE: Error RegSvr32

    Thanks for your replied, Mandal.

    Still cannot...any other solutions?

  • Snehanshu Mandal Profile Picture
    Snehanshu Mandal 560 on at
    RE: Error RegSvr32

    Put your dll in the same folder from where you are running the regsvr32 or

    put the dll in C:\Windows\System32 folder and fire the regsvr32 again

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans