首页 > 解决方案 > 已发布的应用程序因未知原因终止

问题描述

为什么当我在 Visual Studio 中点击“开始”时我的 C# 应用程序加载完美,但在我运行已发布版本时终止?

我在事件查看器中找到的日志:

Application: applaunch.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Security.SecurityException
   at System.Security.CodeAccessSecurityEngine.Check(System.Object, System.Threading.StackCrawlMark ByRef, Boolean)

Exception Info: System.TypeInitializationException
   at FSTools.MainWindow..ctor()

Exception Info: System.Windows.Markup.XamlParseException
   at System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)

(完整版:https ://pastebin.com/BAn83G3s )

标签: c#

解决方案


推荐阅读