Answered by:
Loading dll's

Question
-
Hi guys im trying to load the directinput dll into my program, it compiles fine but when I try to run any code associated with it it gives me the following error:
System.IO.FileLoadException was unhandled
Message=Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.Anyone have any ideas?
Cheers
- Edited by Jackal16 Thursday, January 12, 2012 11:56 AM
Thursday, January 12, 2012 11:36 AM
Answers
-
- Proposed as answer by Shweta Jain (Lodha) Monday, January 16, 2012 11:24 AM
- Marked as answer by Jackal16 Wednesday, January 18, 2012 12:11 PM
Friday, January 13, 2012 12:26 PM -
Have you tried this?
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>- Proposed as answer by Shweta Jain (Lodha) Monday, January 16, 2012 11:24 AM
- Marked as answer by Jackal16 Wednesday, January 18, 2012 12:11 PM
Monday, January 16, 2012 10:16 AM
All replies
-
You're loading a dll that has been made in the .NET 1 Framework version, but your application is .NET 4. Maybe get a newer copy of that dll, since it is probably outdated by years.
Be sure to up-vote me if I helped you. :) E-mail me if you need some extensive help. Contact: matija.cupic.97@gmail.comThursday, January 12, 2012 12:25 PM -
Are you sure you have the latest version? Make sure you have at least the release from June 2010 or later: http://www.microsoft.com/download/en/details.aspx?id=6812
jmhThursday, January 12, 2012 12:27 PM -
Hi there...
try downloading the dll from here:
http://dllcentral.com/Microsoft.DirectX.DirectInput.dll/5.04.00.2904/download/
and replace the old one that you have
Peter KoueikThursday, January 12, 2012 12:43 PM -
@jmh_gr Hi, i've got the lastest version but I dont know where the dll's are located?
@Peter Koueik that link gives you a files that visual studio wont import because its missing certain information apparently
Thursday, January 12, 2012 3:54 PM -
hey there... i downloaded the dll from this link and it worked... try it out
http://www.dllme.com/dll/files/microsoft_directx_directinput_dll.html
Peter KoueikFriday, January 13, 2012 10:37 AM -
Gave me the same error as above.Friday, January 13, 2012 11:37 AM
-
- Proposed as answer by Shweta Jain (Lodha) Monday, January 16, 2012 11:24 AM
- Marked as answer by Jackal16 Wednesday, January 18, 2012 12:11 PM
Friday, January 13, 2012 12:26 PM -
I give up, still returns the same errorFriday, January 13, 2012 8:26 PM
-
Have you tried this?
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>- Proposed as answer by Shweta Jain (Lodha) Monday, January 16, 2012 11:24 AM
- Marked as answer by Jackal16 Wednesday, January 18, 2012 12:11 PM
Monday, January 16, 2012 10:16 AM -
Ok heres the format of my app.config file, it still doesn't work when I do this:
<?xml version="1.0"?> <configuration> <runtime> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> </startup> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Microsoft.Research.Kinect" publicKeyToken="31BF3856AD364E35" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-1.0.0.45" newVersion="1.0.0.45"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
Monday, January 16, 2012 7:09 PM -
add
<supportedRuntime version="v1.0"/>
Peter Koueik- Proposed as answer by Anil Sachin Tuesday, January 17, 2012 1:06 PM
Tuesday, January 17, 2012 5:56 AM -
Fixed by moving
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>Outside of
<runtime>
</runtime>Thanks for your help guys!
Wednesday, January 18, 2012 12:11 PM