[SVGThumbnails]Fix hanging loop and add logs (#31116)
This commit is contained in:
Родитель
172db3af63
Коммит
6f5a59b20d
|
@ -3,6 +3,7 @@
|
|||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Globalization;
|
||||
using ManagedCommon;
|
||||
|
||||
namespace Microsoft.PowerToys.ThumbnailHandler.Svg
|
||||
{
|
||||
|
@ -17,6 +18,7 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
|
|||
public static void Main(string[] args)
|
||||
{
|
||||
ApplicationConfiguration.Initialize();
|
||||
Logger.InitializeLogger("\\FileExplorer_localLow\\SvgThumbnails\\logs", true);
|
||||
if (args != null)
|
||||
{
|
||||
if (args.Length == 2)
|
||||
|
|
|
@ -7,6 +7,7 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using Common.Utilities;
|
||||
using ManagedCommon;
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
using Microsoft.Web.WebView2.WinForms;
|
||||
|
||||
|
@ -197,8 +198,10 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
|
|||
_browser.NavigateToString(SvgContents);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"Failed running webView2Environment completed for {FilePath} : ", ex);
|
||||
thumbnailDone.Set();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -52,5 +52,6 @@
|
|||
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
|
||||
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
|
||||
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
|
||||
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче