Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4290 > unrolled thread

R: Re: Problems with NETLink C#

Started by"tarpanelli@libero.it" <tarpanelli@libero.it>
First post2011-08-10 11:00 +0000
Last post2011-08-10 11:00 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  R: Re: Problems with NETLink C# "tarpanelli@libero.it" <tarpanelli@libero.it> - 2011-08-10 11:00 +0000

#4290 — R: Re: Problems with NETLink C#

From"tarpanelli@libero.it" <tarpanelli@libero.it>
Date2011-08-10 11:00 +0000
SubjectR: Re: Problems with NETLink C#
Message-ID<j1toct$puo$1@smc.vnet.net>
thanks Todd

that works perfect,
P

>----Messaggio originale----
>Da: tgayley@wolfram.com
>Data: 09/08/2011 13.19
>A: <mathgroup@smc.vnet.net>
>Ogg: Re: Problems with NETLink C#
>
>At 03:21 AM 8/8/2011, tarpanelli@libero.it wrote:
>>Hello,
>>
>>I have Mathematica 7 and Visual Studio 2010 Professional edition. What I am
>>trying to do is tho create a simple class in C# and use it in Mathematica.
>>
>>In mathematica notebook I 've written the following code:
>>Needs["NETLink`"]
>>InstallNET[]
>>
>>but when I try to load the assembly
>>LoadNETAssembly ["F:\\My\\Mathematica\\mLink\\mNETLink\\mNETLink\\bin\
>>\\Debug\\mNETLink.dll"]
>>
>>I got this error
>>
>>NET::netexcptn: A .NET exception occurred: System.BadImageFormatException:
>>Could not load file or assembly 'file:///F:
>>\My\Mathematica\mLink\mNETLink\mNETLink\bin\Debug\mNETLink.dll' or one of 
its
>>dependencies. This assembly is built by a runtime newer than the currently
>>loaded runtime and cannot be loaded.
>
>
>You need to allow .NET/Link to run in the 4.0 version of .NET. To do 
>this, edit the configuration file <mathematica 
>dir>/SystemFiles/Links/NETLink/InstallableNET.exe.config. In that 
>short file you will see one or more <supportedRuntime> lines. Add 
>this one as the _first_ one in the set:
>
>     <supportedRuntime version="v4.0" />
>
>After this, your assembly will load properly.
>
>
>Todd Gayley
>Wolfram Research


[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web