It IS possible to instantiate the Visual Studio bridge.

It IS possible to instantiate the Visual Studio bridge.

  • Comments 10

Solution developers will often have different versions of Dynamics NAV installed on a single machine for their development environment. The way this is often implemented is to fully install the latest version and simply copy the Classic Client binary files for earlier versions into separate folders so you have something like this:

NAV 2009 R2 fully installed with an R2 SQL Server database
C:\NAVCLIENTS\NAV 40 SP3\ClassicClient (containing NAV binary files. A NAV 4.0 SP3 database is also accessible on the machine)
C:\NAVCLIENTS\NAV 50 SP1\ClassicClient (similar setup to above)
C:\NAVCLIENTS\NAV 2009\ClassicClient
C:\NAVCLIENTS\NAV 2009 SP1\ClassicClient

This approach has been working for solution developers for some time now. However, after installing Dynamics NAV 2009 R2, if you then try to view the Layout for an NAV 2009 SP1 Report you will get the following error:

---------------------------
Microsoft Dynamics NAV Classic
---------------------------
It is not possible to instantiate  the Visual Studio bridge.
---------------------------
OK  
---------------------------

This is due to a design change in NAV 2009 R2 which uses the .NetBridge rather than the old Visual Studio bridge component. However, the Visual Studio bridge files are included with the binaries in the NAV 2009 SP1 Classic Client folder so you can avoid the above error by running REGASM.EXE to register the DLL. The REGASM.EXE is included in the .Net Framework folder so executing the following command from within the NAV 2009 SP1 Classic Client folder should do the trick:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm.exe Microsoft.Dynamics.Nav.VisualStudioBridge.DLL

Of course, the REGASM.EXE may be located in a different path in your machine so alter the above command line as required.

Gerard Conroy
Microsoft Dynamics NAV Support

Leave a Comment
  • Please add 6 and 2 and type the answer here:
  • Post
  • And how do you handle the compilation problems mixing the versions?

    Example: If I compile objects with my 31295 build and put the fob by my customer (build 30626) the customer gets the error that objects on server don't match the c# object (or something like that)...

    Do you have to keep all versions installed by customers or upgrade everytime ALL customers to latest build?

    Regards

  • You may be able to avoid this kind of issue by compiling the object on the earlier build of NAV and deploying to later builds, e.g. Compile the object on build 30626 (or even 29626) and deploy to later builds like 31295. This approach should enable you to reduce the number of builds you need to maintain in your development environment. Of course, there may be specific situation which require you to maintain more than one build for a particular major version of Dynamics NAV but it should be possible to avoid the need to keep every possible customer build on your dev machine.

    Best regards,

    Gerard Conroy

    Microsoft Dynamics NAV Support

  • Hi Gerard

    Thank you for this article!

    We have experienced exactly the problem you mention, but I could not find the Microsoft.Dynamics.NAV.DotNetBridge.dll for REGASM, instead we have registered a dll called Microsoft.Dynamics.Nav.VisualStudioBridge.dll and this seems to work fine.

    Kind Regards

    Henrik Langbak

  • Thanks Henrik. I have updated the post accordingly.

  • After executing the command, i am getting message "RegAsm : warning RA0000 : No types were registered".

  • Ok Langbak solution worked for me.

  • Please, let me know where to write this Command? or I can say How can I register this DLL?

  • The Regasm command needs to be executed from the Command Line.

    The documentation is here: msdn.microsoft.com/.../tzat5yw6(v=vs.90).aspx

  • I have this exact issue so I executed the REGASM command from the SP1 directory to register the dll but I get the RA0000 error unable to locate input assembly for the visual studiobridge or one of its dependencies.  How to I get past this error or determine the dependencies?

  • See following for a discussion about the RA0000 error:  

    social.msdn.microsoft.com/.../9d0e6124-6d57-4dfc-9c09-5dfa09edb302

    Hope that helps!

Page 1 of 1 (10 items)