From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with an executable that sent an email

Solved!
Go to solution

Hello,

 

I'm having a problem with an executable. The unique functionality of this exec is to send an email. I need to use this exec in 2 PC, and nowadays works fine in one of them (not in both). The PC-1 is running with Win10 while the PC-2 is running with Win7.

 

gmail2.pnggmail.png

Both Pc have installed the Run-Time 2011 SP1.

 

NI.png

I think the problem is not with my executable but with Windows, but I'm not sure.

 

In addition, before using gmail.vi, I tried using another vi, based in .NET, but with the same result.

NET.png

 

Vicen

LabVIEW 2011/2015 with win10

Download All
0 Kudos
Message 1 of 6
(3,120 Views)

It looks like a dependency problem to me.  Do you have the save version of .NET installed? 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 2 of 6
(3,105 Views)

Did you install the executable by creating an actual installer through the LabVIEW project, or just by copying the .exe file? If you haven't tried an actual installer (with all the components that LabVIEW recommends you bundle with it), that would be the first thing I'd try.

Message 3 of 6
(3,098 Views)

Hi,

Thank you for your responses.

 

I've checked the .NET framework version of each PC:

- The .NET version where the executable works fine (PC-2) is 4.5.2, while

- the .NET version where the executable doesn't work (PC-1) is 4.7.1.

- In addition, the .NET version where the executable is developed and compiled is also 4.7.1.

 

 

 

The Gmail.exe is a "plug-in" that adds functionalities to another executable (Main executable), bigger than this. This executable was installed (was made with a project and so on) and works fine. I assume that I don't need to create an installer having done the installer of the main executable, even more so when the gmail.exe is quite simple (it doesn't use other LabVIEW option components).

 

Thank you again,

Vicen

0 Kudos
Message 4 of 6
(3,056 Views)

Do check if .NET Frame 2.0 (or 3.5) is installed. LabVIEW 2011 usually only has acces to .NET 2 (ASAIK).

 

Regards, Jens

Kudos are welcome...
Message 5 of 6
(3,052 Views)
Solution
Accepted by topic author vicens

As I might have mentioned in an e-mail I sent you.  

Spoiler
NOTE to self: never post a snippet with a password as a default value

LabVIEW 2011 needs a bit of an assist to load .NET4.0

See Here where I got a bit of advice on the subject courtesy of these forums

 

After re-digging for this link

Complete the following steps to force LabVIEW to load .NET 4.0 assemblies.

  1. Install the .NET Framework 4.0 on your development machine.
  2. Open a text editor and create a configuration file that contains the following text: 

    <?xml version ="1.0"?>
    <configuration>
       <startup useLegacyV2RuntimeActivationPolicy="true">
          <supportedRuntime version="v4.0.30319"/>
       </startup>
    </configuration>
  3. Save this new configuration file in the same directory as LabVIEW.exe. Name the file LabVIEW.exe.config.
  4. Relaunch LabVIEW.

For built applications the text is the same but the filename is "applicationname.exe.config" and must be in the same directory as the application.


"Should be" isn't "Is" -Jay
Message 6 of 6
(3,047 Views)