Jump to content

Cannot port VIs that use .NET to 8.5


Recommended Posts

If you try to open a VI wtih LV8.5 that uses .NET but was written in LV8.20, you will get an error similar to this:

C:\Development\Source\Common\SQL.NET\SQL.NET Open SQL Server Connection.vi

- The .NET assembly expected to be at "C:\Development\Source\Common\SQL.NET\SQL.NET Open SQL Server Connection.vi\<GAC>\System.Data" was loaded from "<GAC>\System.Data".

This is even after first converting the VI to 8.5 and even mass compiling it. :oops:

The VI will still run, but you cannot build an EXE using the VI.

The only solution is to re-write the VI from scratch in LV8.5.

To do this, you must memorize the VI's code or take a screen shot of it, then CLOSE LabVIEW. Then open LabVIEW again, start with a blank VI and build the VI from the screen shot. Then Save the VI when done. DO NOT open any of the 'broken' VIs at the same time as you are editing you new VI, or it will corrupt the New VI and you will have to start all over.

Repeat these steps for any VI that uses any .NET assembly. :headbang:

There is no fix. This has been stated to be a known issue and we will have to wait for 8.5.1 or whatever they call it to get this working.

So, unless you do not use any .NET or you have a lot of free time on your hands, DO Not upgrade to 8.5...

:angry:

(no, I am not upset at all...) :throwpc: :beer: :beer: :beer:

(sorry for overdoing the emoticons...)

Link to comment

QUOTE(LV Punk @ Nov 30 2007, 04:14 AM)

I too was sorry to see Bryan go. Even though he is now living in my neck of the woods, he was a great resource to me when he was at NI. I am actually using tow of the .net techniques he bloged about in my current project.

I have added to a thread on the NI forums about this issue as well. You can read it here:

http://forums.ni.com/ni/board/message?boar...ssage.id=287625

Here is the workaround I have be using with some sucess and much pain:

To work around this issue, you need to rewrite your VIs in 8.5. You cannot have any of the offending VIs open while fixing a VI or have ever opened them in your current session of LV8.5. Here is my process:

1. Open a bad VI.

2. Take a screen shot of the block diagram.

3. Paste the screenshot into any image editor/viewer so you can refer back to it.

4. Delete any .net nodes in the block diagram that call the GAC assemblies. Also, delete any refnum controls or indictors that you might pass in or out of the VI that refer to GAC assembly references.

5. Save the VI (it will be broken).

6. Close the VI.

7. Reopen the VI and verify you do not get the GAC warning message.

8. Close LabVIEW 8.5. (You must do this so LabVIEW 'forgets' about the GAC assemblies location. Otherwise, if you try to fix the VI now, it will just be broken again.)

9. Open LabVIEW 8.5.

10. Open the edited VI.

11. Recreate the VI components you deleted, using the snapshot as a guide.

12. Be sure to reconnect any front panel terminals to their proper points on the connector pane.

13. Save the VI.

14. Close the VI.

15. Open the VI and verify you do not get the GAC warning.

16. Test the VI (if you can test it in place).

Repeat this for every VI you have that has .NET nodes and/or front panel terminals that are associated with any assemblies in the GAC.

Special note: When you load a VI that calls other VIs that you already fixed, they will be re-broken in memory. After you delete the offending nodes/terminals from the parent VI, save it BUT DO NOT SAVE the sub-vis or you will re-break them. After you restart LabVIEW, to fix the parent, the sub-vi should load ok without the warnings. If you ever see the GAC warning after restarting LabVIEW to fix the VI you edited, stop what you are doing and retrace your steps. You could easily re-break everything you are doing if you are not careful.

I am 2 days into my edits and about half way done. So far, so good. Fingers crossed. I have even tested some of the fixed VIs and they will now build, so I am confident in the workaround.

-John

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.