aelyo-softworks / Wice

Windows Interface Composition Engine is a .NET C# UI engine for creating Windows application.
Other
116 stars 6 forks source link

DirectN.HRESULT.ThrowOnError #2

Closed lbc898 closed 1 year ago

lbc898 commented 1 year ago

The source code could be compiled successfully. But when run "Wice.Samples.Gallery.exe", it show error about d3d 11,I want to know what should I do next? error detail: Wice-Samples-Gallery

A fatal error has occured. Press OK to quit System.ComponentModel.Win32Exception(0x887A002D):应用程序请求的操作依赖于已 缺失或不匹配的SDK组件。

at DirectN.HRESULT.ThrowOnError(Boolean throwOnError)

at DirectN.D3D11Functions.D3D11CreateDevice(IDXGIAdapter adapter, D3D_DRIVER_TYPE driverType,D3D11_CREATE_DEVICE_FLAG flags, D3D_FEATURE_LEVELI featul,Levels,Ulnt32 sdkVersion)

at Wice.Window.CreateD3D11Device0 in

C:\LBA1CNG\CSharp\Echart\Wice-main\Wice\Window.cs:line 990 at System.Lazy 1.ViaFactory(LazyThreadSafetyMode mode)

at System.Lazy 1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)

at System.Lazy`1.CreateValue() at System.Lazy'1.get_Value0

at Wice.Window.Create2D1Device0 in

C:\LBA1CNG\CSharp\Echart\Wice-main\Wice\Window.cs:line 1001 at System.Lazy 1.ViaFactory(LazyThreadSafetyMode mode)

at System.Lazy 1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)

at System.Lazy'1.CreateValue0 at System.Lazy`1.get_Value0

at Wice.Window.CreateCompositionDevice0 in

C:\LBA1CNG\CSharp\Echart\Wice-main\Wice\Window.cs:line 1009 at System.Lazy 1.ViaFactory(LazyThreadSafetyMode mode) ---End of stack trace from previous location---

at System.Lazy'1.CreateValue0 at System.Lazy'1.get_Value(

at Wice.Window.get_CompositionDevice0 in

CALBA1CNG\CSharp\Echart\Wice-main\Wice\Window.cs:line 121 at Wice.Samples.Gallery.GalleryWindow.,ctor0 in

C:\LBA1CNG\CSharp\Echart\Wice-main\Wice.Samples.Gallery\GalleryWindow.cs:line 38

at Wice.Samples.Gallery.Program.

g_newWindow/3_00 in

C:A\LBA1CNG\CSharp\Echart\Wice-main\Wice.Samples.Gallery\Program.cs:line 58 at Wice.Samples.Gallery.Program.Main0 in

C:\LBA1CNG\CSharp\Echart\Wice-main\Wice.Samples.Gallery\Program.cs:line 34

smourier commented 1 year ago

Hi,

Wice and DirectN use the debug layer when compiled as DEBUG, see https://learn.microsoft.com/en-us/windows/win32/direct3d11/using-the-debug-layer-to-test-apps, https://learn.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-devices-layers and https://walbourn.github.io/direct3d-sdk-debug-layer-tricks/

So, if you're compiling as DEBUG, you must install the Graphics diagnostics tools: https://learn.microsoft.com/en-us/windows/uwp/gaming/use-the-directx-runtime-and-visual-studio-graphics-diagnostic-features

smourier commented 1 year ago

Closing due to lack of activity.