<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>.NET 4.0 Archives - CenterSpace</title>
	<atom:link href="https://www.centerspace.net/tag/net-4-0/feed" rel="self" type="application/rss+xml" />
	<link>https://www.centerspace.net/tag/net-4-0</link>
	<description>.NET numerical class libraries</description>
	<lastBuildDate>Tue, 01 Mar 2016 22:07:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
<site xmlns="com-wordpress:feed-additions:1">104092929</site>	<item>
		<title>Using NMath in .NET 4.0 Applications</title>
		<link>https://www.centerspace.net/using-nmath-in-net-4-0-applications</link>
					<comments>https://www.centerspace.net/using-nmath-in-net-4-0-applications#comments</comments>
		
		<dc:creator><![CDATA[Ken Baldwin]]></dc:creator>
		<pubDate>Wed, 17 Mar 2010 15:53:34 +0000</pubDate>
				<category><![CDATA[NMath]]></category>
		<category><![CDATA[.NET 4.0]]></category>
		<category><![CDATA[useLegacyV2RuntimeActivationPolicy]]></category>
		<guid isPermaLink="false">http://www.centerspace.net/blog/?p=1859</guid>

					<description><![CDATA[<p>Version 4.0 of the .NET Framework introduced a new runtime activation policy, which enables an application to activate multiple versions of the common language runtime (CLR) in the same process. (See here for more information.) Because of this support for side-by-side runtimes, .NET 4.0 has changed the way that it binds to older mixed-mode assemblies, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/using-nmath-in-net-4-0-applications">Using NMath in .NET 4.0 Applications</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Version 4.0 of the .NET Framework introduced a new runtime activation policy, which enables an application to activate multiple versions of the common language runtime (CLR) in the same process. (See <a href="ttp://msdn.microsoft.com/en-us/library/dd233115(VS.100).aspx">here </a> for more information.)</p>
<p>Because of this support for side-by-side runtimes, .NET 4.0 has changed the way that it binds to older mixed-mode assemblies, such as the NMath Kernel assembly, which is written in C++\CLI and uses the Intel Math Kernel Library internally.</p>
<p>When using NMath in .NET 4.0 applications, the NMath Kernel fails to load, because it was built against an earlier version of .NET and includes unmanaged code. The error is:</p>
<pre>System.TypeInitializationException : The type initializer for
'CenterSpace.NMath.Core.NMathKernel' threw an exception.
----&gt; CenterSpace.NMath.Core.KernelLoadException : Could
not load kernel assembly NMathKernelx86</pre>
<p>There are two solutions:</p>
<ol>
<li>Activate the v2.0 runtime activation policy by adding the following lines to your app.config when using runtime v4.0:
<pre>&lt;configuration&gt;
  &lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt;
    &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;
  &lt;/startup&gt;
&lt;/configuration&gt;</pre>
<p>See <a href="https://msdn.microsoft.com/en-us/library/bbx34a2h(VS.100).aspx">here</a> for more information on the &lt;startup&gt; element.</li>
<li>Request assemblies for .NET 3.5  from <a href="/technical-support/">Centerspace Technical Support</a>. (see below for correction)</li>
</ol>
<p>In the next release of NMath, the shipping assemblies will be built against .NET 3.5. (Assemblies for .NET 2.0 will remain available upon request.) &lt;&lt; see below for correction</p>
<p>Ken</p>
<p><strong>Update</strong></p>
<p>This issue can only be solved with the application config change or with assemblies built with .NET 4.0.</p>
<p>If you are widely deploying your application, you should probably target .NET 3.5 or earlier. In this case, the application config is the best solution.</p>
<p>If you know your application will be run within .NET 4.0 or later and don&#8217;t wish to make the application config change, please contact us at support@centerspace.net. We can send you NMath assemblies built and tested with .NET 4.0.</p>
<p>Since we don&#8217;t use any .NET 3.5 features and it&#8217;s too early to target .NET 4.0 with a class library, we will be targeting .NET 2.0 in the next release (expected in June, 2010).</p>
<p><strong>Update #2</strong></p>
<p>We have released new versions of our products today that are built using Visual Studio 2010 and target .NET 3.5 (client profile) or greater. The issue above no longer exists. Please contact sales@centerspace.net for your upgrade.</p>
<p>The post <a rel="nofollow" href="https://www.centerspace.net/using-nmath-in-net-4-0-applications">Using NMath in .NET 4.0 Applications</a> appeared first on <a rel="nofollow" href="https://www.centerspace.net">CenterSpace</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.centerspace.net/using-nmath-in-net-4-0-applications/feed</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1859</post-id>	</item>
	</channel>
</rss>
