c# - 已发布的应用程序因未知原因终止
问题描述
为什么当我在 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 )
解决方案
推荐阅读
- jekyll - 我可以在 jekyll 液体中创建和操作地图吗?
- python - POSTGRES:删除 id 前缀的内部连接
- react-native - 为什么 React Native 中没有包含适用于 Android 的 BottomNavigation?
- python-2.7 - 尝试通过 Selenium 和 Python 使用 GeckoDriver Firefox 登录 Gmail 帐户时出现“此浏览器或应用程序可能不安全”错误
- javascript - 节点 JS 类型错误:无法读取属性
- blazor - Blazor JSRuntime 关注 foreach 中的元素
- laravel - 使用 laravel、vue 和 axios 上传多张图片
- javascript - 在画布范围内平滑平移
- python - Pygame:返回变量的按钮运行函数
- c++ - Boost Graph Library:资源受限的最短周期