John Lokanis Posted November 30, 2007 Report Share Posted November 30, 2007 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. 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... (no, I am not upset at all...) :beer: :beer: :beer: (sorry for overdoing the emoticons...) Quote Link to comment
LAVA 1.0 Content Posted December 1, 2007 Report Share Posted December 1, 2007 I read your posts on Info-LabVIEW and I can understand your pain. I recall reading this BLOG post by Brian Tyler made in February 2007. I immediately thought "What impact might this have on LabVIEW". Quote Link to comment
John Lokanis Posted December 1, 2007 Author Report Share Posted December 1, 2007 QUOTE(LV Punk @ Nov 30 2007, 04:14 AM) I read your posts on Info-LabVIEW and I can understand your pain.I recall reading this BLOG post by Brian Tyler made in February 2007. I immediately thought "What impact might this have on LabVIEW". 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.