09-11-2008 12:33 PM
I removed System.Windows, and System Windows.Forms.
And rebuilt. It looks like I am compiling with .NET 2.0:
------ Rebuild All started: Project: Animated GIF, Configuration: Release Any CPU ------
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:TRACE /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug:pdbonly /optimize+ /out:"obj\Release\Animated GIF.dll" /target:library Properties\Settings.Designer.cs Read.cs Properties\AssemblyInfo.cs
Compile complete -- 0 errors, 0 warnings
Animated GIF -> C:\George\C#\Animated GIF\Animated GIF\bin\Release\Animated GIF.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
When I link the .NET constructor to my dll, I still get the popup dialog telling me that lated version is selected.
And I'm still get error 3.
How do you provide an explicit constructor?
09-11-2008 01:05 PM
Using the sample code in your first post you would just need to do this:
namespace test
{
public class Read
{
public Read()
{
}
public int Load(String path)
{
return 0;
}
}
}
To be honest, I doubt this will make any difference, but who knows.
09-11-2008 04:40 PM
I added:
public Read()
{
}
and rebuilt. It seems no difference.
09-11-2008 05:43 PM
09-15-2008 01:39 PM
Problem solved.
In my previous post, you can see the path for the C# project:
C:\George\C#\Animated GIF\Animated GIF\bin\Release\Animated GIF.dll
The problem was the path:
C:\George\C#\Animated GIF\Animated GIF\bin\Release\Animated GIF.dll
LabVIEW doesn't like C# in the path at runtime. although it's ok in edit mode.
In the edit mode, LabVIEW still can find all the methods and properties.
09-15-2008 01:44 PM
09-15-2008 01:50 PM - edited 09-15-2008 01:55 PM
I tested on another pc which has LabVIEW 8.2 installed. I copied the dll into the C:\temp directory.
Thanks for helping me ruled out all other possibilities.
02-03-2009 08:26 AM
...then he silently added, "When using .NET assemblies in LabVIEW, beware of critical characters in path names!"
And I said, "Huh...?!?"
Yep, this solved my problem, too, since I had the same .NET error and a similar path with a folder named C#.
1000 thanks for pointing me into this long forgotten direction (again)!
I don't know, what the hell NI is doing in its .NET development team, but since we decided to marry LabVIEW with a .NET sub/infrastructure 3 years ago, I surely grew older 30 years for all the recurring problems and errors LV has generated in this area...
😞
Cheers,
Hans
03-18-2009 07:02 PM
Excellent !! Thank you so much. Same problem here C:\TheDump\c#Lib\ChartingAndPDF