Grabacr07 / VirtualDesktop

C# wrapper for the Virtual Desktop API on Windows 11.
MIT License
631 stars 135 forks source link

Support compilation from single file application #72

Closed t1m0thyj closed 4 months ago

t1m0thyj commented 2 years ago

Fixes an error preventing compilation of COM interface assembly, when VirtualDesktop.Configure is invoked in a .NET 6 single file application compiled with PublishSingleFile=true.

I don't like the usage of AllowUnsafeBlocks but this seems to be the recommended solution according to Microsoft - see https://github.com/dotnet/runtime/issues/42621#issuecomment-697429214= and https://github.com/dotnet/runtime/issues/36590#issuecomment-689883856=.

t1m0thyj commented 4 months ago

Closing in favor of https://github.com/Slion/VirtualDesktop/pull/25 since this repo appears to no longer be maintained