ECToo / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Unable to load SlimDX in a .NET 4.0-based XBAP application #642

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Attempting to use SlimDX in the new Visual Studio 2010 using a .NET 4.0
application will result in the following exception:

System.IO.FileLoadException: 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.

For some applications, this can be worked around by setting a "startup"
attribute in the application config file (as documented at
http://msdn.microsoft.com/en-us/library/bbx34a2h%28VS.100%29.aspx).

However, that value is not usable from an XBAP (a WPF Browser Application
as it is called in the project template) as it runs within Internet Explorer.

Apparently the only solutions to this are to:
1) Go back to .NET 3.5.  Undesired because we are using features only
available in .NET 4.0.

2) The preferred solution, have a version of SlimDX available that is
compiled against .NET 4.0 / VS2010.

Original issue reported on code.google.com by caba...@gmail.com on 24 Mar 2010 at 9:26

GoogleCodeExporter commented 9 years ago
We don't support 4.0 or VS 2010 yet, as they are not released. It looks like 
we'll
have to build distinct binaries for 4.0+ for the next release.

Original comment by josh.petrie on 25 Mar 2010 at 3:10

GoogleCodeExporter commented 9 years ago
I'm told that SlimDX does build fine in VS 2010 though, so you should be able to
produce your own compatible binary without too much trouble.

Original comment by promit....@gmail.com on 25 Mar 2010 at 3:12

GoogleCodeExporter commented 9 years ago
Yeah, I'm actually attempting that now.  Or rather, I'm first trying to build it
successfully in VS2008, then I'll try migrating it to 2010.  Right now, the
SlimDX.Tests is throwing two linking errors and crashing when it runs.  But 
that's a
completely separate topic and quite likely that I'm just doing something wrong.

I am concerned however about a note in the documentation about x86/x64:
"This mechanism only works when both otherwise identical 32 and 64 bit builds of
SlimDX have been registered as shared assemblies in the Global Assembly Cache. 
We are
not currently aware of any way to make Any CPU work with private SlimDX 
assemblies."

Based on that, it will not be as simple as just recompiling the library and 
including
it as a reference on our application.  We'll have to actually rebuild the 
installer
to get appropriate CPU architecture assemblies on the client's machines.

Original comment by caba...@gmail.com on 25 Mar 2010 at 3:26

GoogleCodeExporter commented 9 years ago
We plan on supporting .NET 4 once it's officially released. No need to keep 
this open
any longer.

Original comment by Mike.Popoloski on 31 Mar 2010 at 6:05

GoogleCodeExporter commented 9 years ago
It is released now. Still no SlimDX compatibility. How come? This is very 
needed.

Original comment by flamefus...@gmail.com on 11 May 2010 at 9:23

GoogleCodeExporter commented 9 years ago
Indeed it's release now, and we do now support it. Not sure what your problem 
is. We
have a vs2010 solution in the repository. If you want binaries without building 
them
yourself you'll have to wait until we have a release.

Original comment by Mike.Popoloski on 11 May 2010 at 9:27

GoogleCodeExporter commented 9 years ago
Hi Mike,

Thanks for all of your efforts. I have been working to use SlimDX with my .Net 
Framework 4 app. I ran in to quite a few brick walls. 

First, I did not realize that the 2010 redist did not include the framework 4.0 
files.

The further I dug into creating a proper AnyCPU distribution, the more is 
started to appear as though I would need to download and compile the code 
myself.

I have been able to successfully build everything in VS2010, but I am now faced 
with understanding the release steps documentation and have some concerns about 
how I can get this working with the Limited version of Installshield (used by 
my app) and about ensuring that I don't miss anything and wind up conflicting 
with your 4.0 redist release when it becomes available.

At risk of sounding like a whiner, I would like to request that you spare us 
all this large learning curve by leveraging your knowledge of the code, build 
process, etc.. to create a quick installer. I know it sure would save me alot 
of grief.

If for some reason you aren't able or don't want to do this, I would be 
grateful for any additional tips, links to docs, etc.. that may prove useful in 
my efforts.

Thanks again!

Original comment by bviller...@gmail.com on 10 Oct 2010 at 3:37

GoogleCodeExporter commented 9 years ago
We're working on one for the next release. Until then, it's not really that 
hard to do a specific one for your platform:

- SlimDX DLL
- .NET Framework
- Latest DirectX SDK
- Visual Studio Runtimes

Those are what need to be installed on the end user's machine in order for your 
programs to run.

Original comment by Mike.Popoloski on 16 Oct 2010 at 3:31