简体   繁体   English

在我的项目中关闭程序后,在C#中出现错误“ CannotUnloadAppDomainException”

[英]After closing the program in my project got error “CannotUnloadAppDomainException” in C#

This started when I created and use reporting (rdlc) in my project and now everytime i open the form with reporting it is still working finem the error will show when I close my application how can I fix this? 这始于我在项目中创建和使用报告(rdlc)时开始的时间,现在每次我打开带有报告的表单时,它仍然可以正常工作,当我关闭应用程序时将显示错误,我该如何解决呢?

在此处输入图片说明

private void Form1_FormClosing(Object sender,System.Windows.Forms.FormClosingEventArgs e) 
{
        ReportViewer1.LocalReport.ReleaseSandboxAppDomain();
}

This also work for me. 这对我也有用。

reportviewer.Reset(); reportviewer.Reset();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM