monoblaine / MarkdownViewerPlusPlus

A Notepad++ Plugin to view a Markdown file rendered on-the-fly
MIT License
19 stars 3 forks source link

Markdownviewerplusplus 0.9 don't work on Windows Server #2

Open Jee-Bee opened 12 months ago

Jee-Bee commented 12 months ago

First thanks for your additions on MarkdownViewerPlusPlus.

I noticed that MarkdownViewerPlusPlus don't work on (All? )Windows Server versions. In Contrast the Original MarkdownViewerPlusPlus works on The Server I think the error message and system info explain well enough the situation.

Error Message:
2023-08-29 17_31_52-Remote Desktop Manager  Windchill+SQL

System Info:
2023-08-29 14_38_19-Remote Desktop Manager  Windchill+SQL

monoblaine commented 12 months ago

Hi @Jee-Bee,

HTML rendering in my fork is handled by the WebView control provided by the Microsoft.Toolkit.Forms.UI.Controls.WebView package and Microsoft Edge (possibly the non-Chromium one) is one of its dependencies. I did some digging, and learned that Windows Server editions do not include Microsoft Edge:

Is WebViewControl available on Windows Server?

No. Long-Term Servicing Channel (LTSC) versions of Windows, including Windows Server, don't include Microsoft Edge or many other UWP applications. These apps and their required services are frequently updated with new functionality and cannot be supported on systems running a LTSC operating system.

Reference: https://learn.microsoft.com/en-us/windows/communitytoolkit/controls/wpf-winforms/webview#is-webviewcontrol-available-on-windows-server

However, there seems to be a WebView2 project and its supported platforms include Windows Server editions, too. I'll give it a try and keep you posted.

Jee-Bee commented 12 months ago

Thanks for your fast response!!

monoblaine commented 11 months ago

Hi @Jee-Bee, I'm afraid I wasn't able to make the plugin work using the WebView2 package. Visual Studio hangs during the build, particularly while trying to merge the assemblies using ILMerge:

1>  calling 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\ILAsm.exe' with /nologo "/out:<path to project>\MarkdownViewerPlusPlus\bin\x86\Debug\MarkdownViewerPlusPlus.dll" "<path to \AppData\Local>\Temp\tmp6A85\MarkdownViewerPlusPlus.il" /DLL "/resource=<path to \AppData\Local>\Temp\tmp6A85\MarkdownViewerPlusPlus.res"  /debug   (TaskId:53)

I tried killing MSBuild.exe at that time and executing the command above externally, which was a success; however using the output dll in Notepad++ led to literally nothing: Just a blank screen. I have no idea what's wrong and don't know where to start, either.

Jee-Bee commented 11 months ago

A pity but thanks for trying!