05-19-2010 04:55 PM
Running LabVIEW 8.6.1 (For this project)
The customer has supplied an ecexutable built in c# running on the .NET3.5 CRL.
Progress so far:
I have succeded in building the constructor to access the method I need. Call it: "DoTest(in_Param, Out_Param, Out_ID, Out_data, Out_Result)
The function first checks in_param (and if I give it a bogus value I get the expected error in result) so I know I've got the constructor right. However, the DoTest never completes successfully from LabVIEW- although it does succeded from the built application containing the function.
Big Question! If an app uses the .NET 3.5 CRL can some of its functions be unavailable to LabVIEW?
Solved! Go to Solution.
05-19-2010 05:09 PM
Jeff Bohrer wrote:
Big Question! If an app uses the .NET 3.5 CRL can some of its functions be unavailable to LabVIEW?
Yes. However, it doesn't sound as if that's your problem since you can see the constructor. I think the better question is that you're trying to access an executable using the .NET functions. This is not normally done. The .NET functions are really intended for .NET libraries, not executables. True, an executable is a great big class, but it usually expects to be running in a window.
05-19-2010 05:22 PM
smercurio_fc wrote:
Yes. However, it doesn't sound as if that's your problem since you can see the constructor.
Great news!I think the better question is that you're trying to access an executable using the .NET functions.(No, I have the libraries and am calling into those not the .exe)
I am assuming there are some pre-conditions that are not configuring correctly in this case. Back to the drawing board. Thanks- the LabVIEW help file is sort of vague about the .NET clr version support.
Do you have any good referances on the version support or the differances?
05-19-2010 05:40 PM
05-19-2010 06:50 PM
smercurio_fc wrote:
t "automatically loads the latest installed version of the .NET
Common Language Runtime (CLR)".
Explains a bit.
I know the app does not run with .NET 4.0 (my latest installed version.) I'll try uninstalling .NET 4.0 and leave 3.5 tomarrow.
I post back after giving this a try.
THANKS
05-19-2010 06:55 PM
smercurio_fc wrote:
The Help File as well as the Upgrade Notes have always been vague.
Hmmm.... A plea for more clarity in the help files,,e.g,,not perfect NI --- but still keep striving please!
05-20-2010 11:26 AM
Jeff Bohrer wrote:
Ahhh... That
smercurio_fc wrote:
it "automatically loads the latest installed version of the .NET
Common Language Runtime (CLR)".Explains a bit.
I know the app does not run with .NET 4.0 (my latest installed version.) I'll try uninstalling .NET 4.0 and leave 3.5 tomarrow.
I post back after giving this a try.
THANKS
uninstalling .NET 4.0 was a success!
Again thanks for pointing me in the right direction. I'll take the Solution and give you the BIG assist!
05-20-2010 05:06 PM
There is a little bit more information in this idea exchange post.
With .NET 4.0 Microsoft updated mscorlib to version 4.0. I'm guessing that if you used .NET Reflector on your assembly it would have a dependency of mscorlib 4.0. You can direct Visual Studio to compile for a previous version of the framework. I believe that if you select 3.5 or before you will be using mscorlib 2.0 which we do support.
I am currently in the process of making a KB to better describe this issue.
As for official support the documentation is pretty vauge. We support the .NET Framework 2.0. We do NOT support new features introduced in 3.0, 3.5 or 4.0. You can use a later version of Visual Studio to create assemblies but they must be compatible with 2.0. Microsoft updated the mscorlib for .NET 4.0 so you will need to tell Visual Studio to use a different version of the framework.
05-24-2010 10:39 AM - edited 05-24-2010 10:42 AM
Thanks Jon. I'll certainly look forward to seeing the KB.
Unfortunately you seem to imply that I have control of third-party (or customer supplied) Processes. Its interesting that I can declare what .NET framework version my built app will use and cannot control the .NET version from the IDE during development and was required to uninstall .NET 4.0 in order to debug my application during development. Or is there a workaround available to control this by creating a LabVIEW.exe.config file to declare the .NET revision?
05-24-2010 01:36 PM
Jeff Bohrer wrote:Or is there a workaround available to control this by creating a LabVIEW.exe.config file to declare the .NET revision?
Yes, you can create a LabVIEW.exe.config file to specify the required .NET runtime version. This is actually in the LabVIEW Help.