08-09-2017 08:18 AM
Hallo All,
I am currently developing Cryptographic algorithm for Smartcards. I use VS 2012 C#.net Express Edition to code the Algorithm, along with BouncyCastle.dll.
BouncyCastle.dll for .net is developed under .net2.0
My program works perfectly in LV 2011 Environment, but when I build the Application EXE, the program searches for the .dll.
Before using the .net dll in Labview, I have done the following soultion suggested by NI: (Labview.exe.Config)
<?xml version ="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
</startup>
</configuration>
I used the same solution for the Application EXE but it always promts a dialog for the .net DLL.
I have attached the snapshot of the Application folder and its Data folder.
Experts suggetion is kindly adviced.
Thank You
Raj
Solved! Go to Solution.
08-09-2017 03:40 PM - edited 08-09-2017 03:41 PM
When you run a VI in the IDE, LabVIEW.exe is the process hosting the CLR. When you build an executable that is the application that is hosting the CLR. So the advice given to edit/create "LabVIEW.exe.config" for development in the IDE, as you indicated, needs to be applied to "Signature_Gen.exe.config" for your runtime application.
I see you have a "Signature_Gen.config" file but it needs to be "Signature_Gen.exe.config", just like the LabVIEW example.
08-10-2017 04:40 AM
11-07-2024 08:26 PM
Can you post the step you used to use the DLL in labview ?
Did u just use the import DLL wizard ?
11-08-2024 02:02 AM
@Ray.Abram wrote:
Can you post the step you used to use the DLL in labview ?
Did u just use the import DLL wizard ?
Take a note - this is 7 years old thread.
Technically we talking about .net here, so the DLL Import Wizard is not applicable.
In very short words, you have to place .net constructor on the BD:
Then, if we talking about very recent versions (Bouncy Castle C# .NET release for .NET 6.0 & LabVIEW 2024) you can select .net Core Constructor:
Then select BouncyCastle.Cryptography.dll and choose appropriate constructor:
Follow Bouncy Castle doc from this point, but take a note that .NET Core support added to the latest LV is "experimental", could have some issues.
Refer to the Help Using .NET with LabVIEW and examples located in "<LabVIEW>\examples\Connectivity\Dot NET" and "examples\Connectivity\Dot NET Core" folders as "getting started".
11-08-2024 02:10 AM - edited 11-08-2024 02:12 AM
And unless that bouncyCastle dll is a much much newer version, I would posit that using a .Net DLL that was current when .Net 2.0 was the state of the art is absolutely certainly worse than not using any cryptography. In cryptography, what was top notch 5 years ago is just about enough now and will be obsolete in another 3 years. You better use no security than bad and outdated security!