-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hello XCad team,
I try to apply a HelpAttribute like ([Help("C:\SWX_Addin\Help\Test.chm")], [Help("C:\SWX_Addin\Help\Test.txt")], [Help("https://www.google.com/")] or [Help("https://8.8.8.8")]) on my PropertyPage which always throws "Help link is not available" message. I checked your code base and found following issue due to a breaking change on Microsoft side see https://learn.microsoft.com/en-us/dotnet/core/compatibility/fx-core#net-core-21
They address here that the call System.Diagnostics.Process.Start(link); now needs something with .exe in case UseShellExecute is false which they changed to be default on .NET Core 2.1 and higher.
All following lines work on a separate Action on a PMPage:
Process.Start(new ProcessStartInfo("C:\SWX_Addin\Help\Test.chm") { UseShellExecute = true });
Process.Start(new ProcessStartInfo("C:\SWX_Addin\Help\Test.txt") { UseShellExecute = true });
Process.Start(new ProcessStartInfo("https://www.google.com/") { UseShellExecute = true });
Process.Start(new ProcessStartInfo("https://8.8.8.8/") { UseShellExecute = true });
For a future build could you add a HelpOptionsAttribute to address following call:
var helpFileStartInfo = new ProcessStartInfo()
{
FileName = "C:\\Windows\\hh.exe",
Arguments = "mk:@MSITStore:C:\\SWX_Addin\\Help\\Test.chm::/C_About_Card_Editor.htm",
WindowStyle = ProcessWindowStyle.Maximized,
UseShellExecute = true
};
Process.Start(helpFileStartInfo);
At the moment I have to use Reflection to clear invocation list of your implemented event "HelpRequested" and to add my own handler method to "HelpRequested" which than is called.
Full discussion on this and tries to fix it on XCad discord see https://discordapp.com/channels/915451168518447104/915452518195167272/1375830964386664678 see questions channel.
I'm using currently .Net 6 with following nuggets Xarial.XCad, Xarial.XCad.SolidWorks and Xarial.XCad.Toolkit all with version 0.8.2
Best regards
popfra