Skip to main content
GameDev.net gamedev.net
🔒 Locked

[SlimDX] and VS 2010 Beta 2

Started by Evers Oct 29, 2009 at 7:59 AM 9 replies 3.5k views
Original Post
Evers
Evers
Hi Just wanted to hear if anybody else have tried to use SlimDX in a .Net 4 app in Visual Studio 2010 Beta 2? We used Beta 1 before where everything worked fine, but after we updated to Beta 2 we get an XamlParseException when we try to initialize the Direct3D image. In the details I get Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. Havent been able to get around it yet. Any ideas would be much welcome. Thanks
Mike.Popoloski
Mike.Popoloski
I saw the same issue myself. I suppose we need to rebuild SlimDX using VS 2010 in order for it to be usable from .NET 4.0 apps. I'm not going to worry about any of it until VS 2010 comes out of beta.
Mike Popoloski | Journal | SlimDX
Evers
Evers
Ok, at least good to hear that its not just us.

Thanks for the reply
jpetrie
jpetrie
I imagine you could use it by supplying that "additional information" it wants -- I'm guessing there are some properties you'd need to set in your manifest or app.config. I'm not aware of what those might be yet, though.
Hazard_X
Hazard_X
I always thought that .Net 4.0 was never meant to be backwards compatible at all. Am i wrong on this?
JPatrick
JPatrick
I've been using SlimDX in beta 2 for a few days now. VizOne is right about supportedRuntime. Specifically, you can add a .config file for your app as follows:

<?xml version="1.0" encoding="utf-8" ?><configuration>  <startup useLegacyV2RuntimeActivationPolicy="true">    <supportedRuntime version="v4.0"/>  </startup></configuration>


After dropping this in it started working as normal.
Evers
Evers
Thanks

Have just tried it, but doesnt seem to work for me..

I have a solution with several assemblies. One is the App itself and another is a usercontrol using SlimDX.
Have tried adding a .config file in both but with no luck.

Will try some more today
Evers
Evers
Got it to work. Perfect!

Thanks alot everyone.

(just readded the config file.. somehow the app didnt really want to load it the first time)
Hazard_X
Hazard_X
Quote:
Original post by JPatrick
I've been using SlimDX in beta 2 for a few days now. VizOne is right about supportedRuntime. Specifically, you can add a .config file for your app as follows:
*** Source Snippet Removed ***

After dropping this in it started working as normal.


Good to know. Thanks alot! Yet still, having a native .Net 4.0 version of SlimDX some time after VS2010 got released seems preferable to me. Or does .Net2 and .Net4 interop come without any mentionable cost?
Domnitch
Domnitch
I've added useLegacyV2RuntimeActivationPolicy="true" spell by JPatrick to app.config
It works! Really!
Thank you!

VS 2010 beta 2, SlimDX 2.0.8.42 (Aug 2009)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.