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

SlimDX: Support for .Net 4.0?

Started by Narf the Mouse Apr 5, 2010 at 8:46 PM 11 replies 4.2k views
Original Post
Narf the Mouse
Narf the Mouse
I'm trying to update a SlimDX application to 4.0; however, I'm running into an "{"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.":null}" error. Any help would be appreciated, as would an estimate of when 4.0 might be supported.
Washu
Washu
you need to recompile SlimDX for .net 4.0. If you attempt to compile the samples then you need to change their setting as well. Other than that, SlimDX works fine with 4.0.
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
jpetrie
jpetrie
You need to rebuild SlimDX from source, targetted against 4.0. I hear this is difficult because the DirectX SDK does not support VS2010 yet, but I have not tried. There's also some manifest trickery you can work, but I'm not familiar with those yet either.

We will not support .NET 4.0 until VS 2010 is released (not RTM), and the DX SDK does. The earliest you can expect to see it is the next SDK release, which will be shortly after the next DX SDK release.
MJP
MJP
Quote:

You need to rebuild SlimDX from source, targetted against 4.0. I hear this is difficult because the DirectX SDK does not support VS2010 yet, but I have not tried.


Really? I've been using 2010 with the Feb. SDK since it came out, and I don't have any problems. Well, for native C++ development anyway.



rfterdarc
rfterdarc
http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2010/03/27/mixed-mode-assembly-is-built-against-version-v2-0-50727-error-using-net-4-development-web-server.aspx

You just need to add useLegacyV2RuntimeActivationPolicy="true" to your app.config and it will work. I've been using SlimDX in a DX10 .Net 4.0 RC setup for awhile now with no problems :)
jpetrie
jpetrie
Quote:

Really? I've been using 2010 with the Feb. SDK since it came out, and I don't have any problems. Well, for native C++ development anyway.

I only read that in passing on the MSDN forums, so it's quite possibly wrong (I've had very bad luck with those forums providing useful and accurate information), which I why I mentioned I'd hadn't tried it. I'm glad it's not the case, because that would have made our job harder.
Narf the Mouse
Narf the Mouse
I couldn't find the file specified in the "Common Files" folder. In addition, would there be a way to specify that setting for just the project?
Narf the Mouse
Narf the Mouse
I could not, in fact, find that file anywhere; nor was there a file like it.

It could be because I'm cash-limited to the Express version. In any case, I still need a work-around.
daviangel
daviangel
Quote:
Original post by jpetrie
Quote:

Really? I've been using 2010 with the Feb. SDK since it came out, and I don't have any problems. Well, for native C++ development anyway.

I only read that in passing on the MSDN forums, so it's quite possibly wrong (I've had very bad luck with those forums providing useful and accurate information), which I why I mentioned I'd hadn't tried it. I'm glad it's not the case, because that would have made our job harder.


Official support isn't till June it looks like:
We are working to fully support Visual Studio 2010 with our upcoming DirectX SDK (June 2010) release.
Oh yeah it was also in the Feb SDK notes that's where I first saw it:
Support for Visual Studio 2005 and Visual Studio 2010

"In the next release, the DirectX SDK will add support for Visual Studio 2010. At that time, the DirectX SDK will no longer support Visual Studio 2005; the February 2010 release will be the last release to support Visual Studio 2005. The next release will continue to support Visual Studio 2008."
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Narf the Mouse
Narf the Mouse
...Well, that's a bit of a problem. VS Express doesn't even support the project files. Building it is gonna be a bit of a problem...
Hazard_X
Hazard_X
Just to let you know: I ported all my larger projects to .Net4 right at the day of VS2010 release. Everything went absolutely flawless. Just compiling SlimDX against .Net4 was fine also. Even more complicated stuff where i inject .Net code into native games or replace the games graphics engine by one written in .Net using SlimDX. No errors, no crashes, no instabilities, no unwanted behaviour and not even one line of code had to be changed.

Topic Locked

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

Sign in to reply to this topic.