c# - How do i solve the exception of missing dll ? The dll file is in the directory -
this line:
boolean bl = initializedirectx(mypb);
and initializedirectx method use directx:
public boolean initializedirectx(picturebox pb) { dispmode = manager.adapters[manager.adapters.default.adapter].currentdisplaymode; d3dpp = new presentparameters(); d3dpp.backbufferformat = dispmode.format; d3dpp.presentflag = presentflag.lockablebackbuffer; d3dpp.swapeffect = swapeffect.discard; d3dpp.presentationinterval = presentinterval.one; //wait vertical sync. synchronizes painting //monitor refresh rate smoooth animation d3dpp.windowed = true; //the application has borders try { d3ddev = new device(manager.adapters.default.adapter, devicetype.hardware, pb.handle, createflags.softwarevertexprocessing, d3dpp); d3ddev.vertexformat = customvertex.positioncolored.format; d3ddev.renderstate.lighting = false; d3ddev.renderstate.cullmode = cull.counterclockwise; backtexture = textureloader.fromstream(d3ddev, mymem); scannedcloudstexture = new texture(d3ddev, 512, 512, 1, usage.dynamic, format.a8r8g8b8, pool.default); //sprite used draw texture d3dsprite = new sprite(d3ddev); return true; } catch { return false; } }
the exception thrown on line:
boolean bl = initializedirectx(mypb);
the exception filenotfoundexception:
a first chance exception of type 'system.io.filenotfoundexception' occurred in weather station.exe additional information: not load file or assembly 'microsoft.directx.direct3dx.dll' or 1 of dependencies. specified module not found.
and file microsoft.directx.direct3dx.dll exist in directory see of file in references. don't see in references on dll yellow or state file missing.
and didn't have exception before changed in dll file ?
system.io.filenotfoundexception occurred _hresult=-2147024770 _message=could not load file or assembly 'microsoft.directx.direct3dx.dll' or 1 of dependencies. specified module not found. hresult=-2147024770 istransient=false message=could not load file or assembly 'microsoft.directx.direct3dx.dll' or 1 of dependencies. specified module not found. source=my weather station filename=microsoft.directx.direct3dx.dll fusionlog="" stacktrace: @ mws.scanningclouds.initializedirectx(picturebox pb) @ mws.scanningclouds.scanclouds_load(object sender, eventargs e) in d:\c-sharp\myprog.cs:line 179 innerexception:
line 179 is:
boolean bl = initializedirectx(mypb);
and if dependencies inside dll missing not sure why, how can find wich ones , if @ ?
udate:
this reference in dotpeek of file directxdirect3dx.dll
and in project:
i didn't understand notepad part in t.s solution.
update
this references in project file:
<reference include="avifile"> <hintpath>c:\temp\avifilewrapper\avifilewrapperdemo_src\avidemo\bin\debug\avifile.dll</hintpath> </reference> <reference include="microsoft.directx, version=1.0.2902.0, culture=neutral, publickeytoken=31bf3856ad364e35"> <specificversion>false</specificversion> <hintpath>c:\temp\radarscan\dlls\dll's\microsoft.directx.dll</hintpath> <private>true</private> </reference> <reference include="microsoft.directx.direct3d, version=1.0.2902.0, culture=neutral, publickeytoken=31bf3856ad364e35"> <specificversion>false</specificversion> <hintpath>c:\temp\radarscan\dlls\dll's\microsoft.directx.direct3d.dll</hintpath> <private>true</private> </reference> <reference include="microsoft.directx.direct3dx, version=1.0.2909.0, culture=neutral, publickeytoken=31bf3856ad364e35"> <specificversion>false</specificversion> <hintpath>c:\temp\radarscan\dlls\dll's\microsoft.directx.direct3dx.dll</hintpath> <private>true</private> </reference> <reference include="numericcomparer"> <hintpath>c:\temp\csnsort\csnsort_src\numericcomparer.dll</hintpath> </reference> <reference include="system" /> <reference include="system.core"> <requiredtargetframework>3.5</requiredtargetframework> </reference> <reference include="system.speech" /> <reference include="system.web" /> <reference include="system.xml.linq"> <requiredtargetframework>3.5</requiredtargetframework> </reference> <reference include="system.data.datasetextensions"> <requiredtargetframework>3.5</requiredtargetframework> </reference> <reference include="system.data" /> <reference include="system.deployment" /> <reference include="system.drawing" /> <reference include="system.windows.forms" /> <reference include="system.xml" /> <reference include="unfreez_wrapper, version=1.0.4362.38939, culture=neutral, processorarchitecture=x86"> <specificversion>false</specificversion> <hintpath>..\..\..\..\new folder\unfreez\unfreez_wrapper\release\unfreez_wrapper.dll</hintpath> </reference> <reference include="zedgraph"> <hintpath>..\..\..\..\appz\zedgraph_dll_v515_1\zedgraph_dll_v515\zedgraph_dll_v5.1.5\zedgraph.dll</hintpath> </reference> <reference include="zedgraph.web">
probably component or part of directx
not installed on machine. installing directx
on machine resolve issue.
Comments
Post a Comment