public Form1() : base()
{
InitializeComponent();
// Get graphics device.
**canvasDevice = CanvasDevice.GetSharedDevice();** => This line causes the exception
// Create effect graph.
acrylicEffect = CreateAcrylicEffectGraph();
}
Exception:
System.IO.FileNotFoundException
HResult=0x8007007E
Message=(Module not found)Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E)
Source=mscorlib
StackTrace:
at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
at Microsoft.Graphics.Canvas.CanvasDevice.GetSharedDevice()
at AcrylicEffect.Form1..ctor() in G:\Data\Projects\git\c#\SampleCode\Windows.UI.Composition-Win32-Samples\dotnet\WinForms\AcrylicEffect\AcrylicEffect\Form1.cs:line 32
at AcrylicEffect.Program.Main() in G:\Data\Projects\git\c#\SampleCode\Windows.UI.Composition-Win32-Samples\dotnet\WinForms\AcrylicEffect\AcrylicEffect\Program.cs:line 19
The project compiles without problem on
VS 2019. I copied also Microsoft.Graphics.Canvas.dll to the debug folder
I installed all current updates.
Sample Code will not run:
Exception:
System.IO.FileNotFoundException HResult=0x8007007E Message=(Module not found)Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) Source=mscorlib StackTrace: at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD) at Microsoft.Graphics.Canvas.CanvasDevice.GetSharedDevice() at AcrylicEffect.Form1..ctor() in G:\Data\Projects\git\c#\SampleCode\Windows.UI.Composition-Win32-Samples\dotnet\WinForms\AcrylicEffect\AcrylicEffect\Form1.cs:line 32 at AcrylicEffect.Program.Main() in G:\Data\Projects\git\c#\SampleCode\Windows.UI.Composition-Win32-Samples\dotnet\WinForms\AcrylicEffect\AcrylicEffect\Program.cs:line 19
The project compiles without problem on VS 2019. I copied also Microsoft.Graphics.Canvas.dll to the debug folder I installed all current updates.
I wonder what file or module can't be found ?