Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

'NationalInstruments.VisaNS' could not be found in the .NET Global Assembly Cache (GAC).

$
0
0

Trying to use NI-VISA assembly dll in my matlab program for controlling my devices. 

 

ni = NET.addAssembly('NationalInstruments.VisaNS');

 

But throws an error "'NationalInstruments.VisaNS' could not be found in the .NET Global Assembly Cache (GAC)."

 

Tried to use Gacutil to load the assembly to GAC but below error is thrown :

 

gacutil /i c:\windows\system32\visa32.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.

Failure adding assembly to the cache: The module was expected to contain an assembly manifest.

 

Tried to read the dll using IGSpy Visual studio extension , but below error is thrown. 

ICSharpCode.Decompiler.Metadata.PEFileNotSupportedException: PE file does not contain any managed metadata.
at ICSharpCode.ILSpy.LoadedAssembly.<LoadAsync>d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ICSharpCode.ILSpy.TreeNodes.AssemblyTreeNode.Decompile(Language language, ITextOutput output, DecompilationOptions options) 

 

Anyone please help me run my matlabcode. How to add VISA NI dll to assembly cache. 

 

Operating system : Windows 10

Dotnet : 4.0 

NI-VISA driver version : 21.5

Matlab : 2019/2022 both versions show issue.

 


Viewing all articles
Browse latest Browse all 1999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>