Created a .NET 6.0 project on Win10 (22H2) using VS22 community (17.11). Although VirtualDesktop.dll works perfectly (awesome), the executable throws the following exception on a virgin Win10 (22H2) machine -> Could not load file or assembly Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. The system cannot find the file specified. The top line of the stack trace reads WindowsDesktop.Interop.CommInterfaceAssemblyBuilder.Compile[Enumerable 1 sources] at WindowsDesktop.Interop.CommInterfaceAssemblyBuilder.CreateAssembly() at ...
Thank You
Minutes later ...
As it turns out, my app was not distributing the VirtualDesktop.19045.generated.dll found in the C:\\AppData\Local\grabacr.net\VirtualDesktop\assemblies folder of the development machine. Still trying to figure out what to make of this.
Still more minutes later ...
I was able to make VirtualDesktop version 5.0.5 work with 2 mods;
in VirtualDesktop\Interop\ComInterfaceAssemblyBuilder.cs
if !NETFRAMEWORK
using System.Runtime.Loader;
endif
in Virtual Desktop\Properties\AssemblyInfo.cs
internal static DirectoryInfo LocalAppData
=> _localAppData ??= new DirectoryInfo(System.IO.Path.GetFullPath("."));
Created a .NET 6.0 project on Win10 (22H2) using VS22 community (17.11). Although VirtualDesktop.dll works perfectly (awesome), the executable throws the following exception on a virgin Win10 (22H2) machine -> Could not load file or assembly Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. The system cannot find the file specified. The top line of the stack trace reads WindowsDesktop.Interop.CommInterfaceAssemblyBuilder.Compile[Enumerable 1 sources] at WindowsDesktop.Interop.CommInterfaceAssemblyBuilder.CreateAssembly() at ...
Thank You
Minutes later ... As it turns out, my app was not distributing the VirtualDesktop.19045.generated.dll found in the C:\\AppData\Local\grabacr.net\VirtualDesktop\assemblies folder of the development machine. Still trying to figure out what to make of this.
Still more minutes later ... I was able to make VirtualDesktop version 5.0.5 work with 2 mods;
in VirtualDesktop\Interop\ComInterfaceAssemblyBuilder.cs
if !NETFRAMEWORK
using System.Runtime.Loader;
endif
in Virtual Desktop\Properties\AssemblyInfo.cs internal static DirectoryInfo LocalAppData => _localAppData ??= new DirectoryInfo(System.IO.Path.GetFullPath("."));
In the end, not an issue at all.