LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net constructor node error 3

Solved!
Go to solution

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?

George Zou
0 Kudos
Message 11 of 19
(2,112 Views)

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. 

Message 12 of 19
(2,101 Views)

I added:

 

        public Read()

        {

        }

and rebuilt.  It seems no difference.

George Zou
0 Kudos
Message 13 of 19
(2,080 Views)
Then I'd say it's a problem with using .NET 3.x with LabVIEW.
Message 14 of 19
(2,076 Views)
Solution
Accepted by topic author zou

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.

George Zou
Message 15 of 19
(2,023 Views)
That seems quite strange. I thought you said you had also tried it with 8.2 and did not get an error. I assume you were doing the same thing in 8.2 that you were with 8.5.1/8.6?
Message 16 of 19
(2,020 Views)

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.

Message Edited by zou on 09-15-2008 01:55 PM
George Zou
0 Kudos
Message 17 of 19
(2,018 Views)

 ...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

0 Kudos
Message 18 of 19
(1,871 Views)

Excellent !!  Thank you so much. Same problem here C:\TheDump\c#Lib\ChartingAndPDF

 

 

0 Kudos
Message 19 of 19
(1,815 Views)