Visual studio 在向 RDLC 报告添加新数据集时挂起
Visual studio is hanging when add a new dataset to RDLC report
我创建了一个特定的 report.rdlc
,然后我想将新的 datatable
添加到我的报告中。
但在更改数据集后,尝试将新数据集添加到我的报告中。
visual studio 每次都崩溃并在不添加新数据集的情况下重新启动!
我搜索了这个错误,根据 Microsoft,它说:
This is one of the oldest bugs in visual studio and it can easily
crash "all versions" of visual studio (which is VS.nET 2015 update 1
right now). it happens when you move your project to another directory
and report viewer component tries to open dataset schema from previous
location. in order to fix this open rdlc file with a text editor. look
for a property named "SchemaPath"and update the path of your dataset
file there .
我做了这个建议,然后清理项目并重建它但同样的问题!如何解决这个问题?
<rd:DataSetInfo>
<rd:DataSetName>AnalysisDS1</rd:DataSetName>
<rd:SchemaPath>N:\ProjData\FinanceList\FinanceList\Finance\App_Code\AnalysisDS1.xsd</rd:SchemaPath>
<rd:TableName>AnalysisDT1</rd:TableName>
<rd:TableAdapterFillMethod />
<rd:TableAdapterGetDataMethod />
<rd:TableAdapterName />
</rd:DataSetInfo>
目前 V.S 中没有修复这个错误,希望 Microsoft 修复这个持续存在的问题。
解决方法:
我添加一个新项目到我的解决方案,然后拖放我的RDLC
到我的新项目,然后添加一个新数据集,完成我的报告并将它再次拖到原来的项目中,一切都会好起来的。
我也遇到了同样的问题。为了解决这个问题,在我的案例中有两个步骤如下:
1st: 打开“事件查看器”,这是 windows 的默认选项。在这个 'Event Viewer'
您会找出发生此问题的真正原因。
2nd: 从控件中卸载 'Crystal 报告' panel.After 卸载 crystal
报告我的问题已解决。
解决方案在这里...
打开项目目录=>属性=>数据源并删除该文件夹中的所有文件...
有效
这个错误很难解决,但在我们的项目中,我们有几个解决方案 and/or 解决这个问题。
通常你会在事件查看器中收到 2 条不太有用的消息,如下所示
第一条消息:
Faulting application name: devenv.exe, version: 15.9.28307.423, time
stamp: 0x5c5b5342 Faulting module name: unknown, version: 0.0.0.0,
time stamp: 0x00000000 Exception code: 0xc0000005 Fault offset:
0x49e07264 Faulting process id: 0x3e4c Faulting application start
time: 0x01d5ab734dee5790 Faulting application path: C:\Program Files
(x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\devenv.exe
Faulting module path: unknown Report Id:
93b01c49-4490-41a4-a8db-142f6a99697a Faulting package full name:
Faulting package-relative application ID:
第二条消息:
Application: devenv.exe Framework Version: v4.0.30319 Description: The
process was terminated due to an unhandled exception. Exception Info:
System.NullReferenceException at
Microsoft.ReportDesigner.Design.ProjectItemUtil.GetComplexElements(System.Xml.Schema.XmlSchemaElement)
at
Microsoft.ReportDesigner.Design.DesignUtil.GetVenusObjectDataSources(System.Xml.Schema.XmlSchema[],
System.IServiceProvider) at
Microsoft.ReportDesigner.Data.Local.DataSetSynchronizer+d__11.MoveNext()
at
Microsoft.ReportDesigner.Data.Local.DataSetSynchronizer+d__7.MoveNext()
at
Microsoft.ReportDesigner.Data.Local.Dialogs.Pages.DataSetGeneralPage.LoadDataSources()
at
Microsoft.ReportDesigner.Data.Local.Dialogs.Pages.DataSetGeneralPage.LoadData()
at
Microsoft.ReportDesigner.Data.Local.Dialogs.DataSetDialog.OnLoad(System.EventArgs)
at System.Windows.Forms.Form.OnCreateControl() at
System.Windows.Forms.Control.CreateControl(Boolean) at
System.Windows.Forms.Control.CreateControl() at
System.Windows.Forms.Control.WmShowWindow(System.Windows.Forms.Message
ByRef) at
System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message
ByRef) at
System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message
ByRef) at
System.Windows.Forms.ContainerControl.WndProc(System.Windows.Forms.Message
ByRef) at
System.Windows.Forms.Form.WmShowWindow(System.Windows.Forms.Message
ByRef) at
System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef)
at
System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message
ByRef) at
System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message
ByRef) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr,
Int32, IntPtr, IntPtr)
解决问题的方法:
对于我们中的一些人来说,问题是 DLL 引用 microsoft.office.sharepoint.tools.dll。所以过程就是查看最近添加到TFS的DLL,并尝试将它们从项目中逐一删除,然后再次尝试添加数据集。这解决了我们团队大部分人的问题。
有时,解决方案 1 是不够的,在我的情况下,我从 TFS 的修复中获得了最新版本,但我仍然遇到问题。所以解决方案是从 \Project\package\ 文件夹中删除所有内容,保存所有内容并重建所有内容。这为我解决了这个问题。所以即使引用消失了,包仍然存在。
这是一种解决方法,但就像人们在这里所说的那样,您需要向解决方案中添加一个新项目并创建您的 rdlc 报告和数据集。这工作正常但不太好,因为您随后需要将报告复制到正确的项目并更改 .xsd (数据集的)和 .rdlc 文件的内容,以便它们指向正确的路径。
这个很明显,但你需要检查数据集的路径、模式、数据库连接是否都指向 .xsd 和 .rdlc 文件中的正确路径.
这发生在我的 VS2017 中。我能够通过首先删除包含 .rdlc
的项目的 /bin/
和 /obj/
文件夹中的所有内容来解决此问题。
具体来说,似乎在打开数据集属性 window 时抛出了 FileIOException,而且 /obj/
文件夹中的一个或两个文件似乎无法打开,因为它们正被另一个进程:
DesignTimeResolveAssemblyReferences.cache
DesignTimeResolveAssemblyReferencesInput.cache
我无法弄清楚为什么有时 /bin/
也需要清除,但为了安全起见最好同时清除两者。
我也遇到了同样的问题。我刚刚完成了以下步骤并为我 vs2015 工作。
- 构建=> 在调试模式下清理解决方案。
- 构建 => 在发布模式下清理解决方案。
尝试删除 .vs 或 bin 和 obj 仍然无法正常工作,但是当我尝试删除我的数据源连接并添加新连接时,它对我有用。
这可以与其他问题联系起来吗?
vs 2019 crashes without any error report when opening solution
修复 VS 解决了这个问题。值得一试 ;)
我创建了一个特定的 report.rdlc
,然后我想将新的 datatable
添加到我的报告中。
但在更改数据集后,尝试将新数据集添加到我的报告中。
visual studio 每次都崩溃并在不添加新数据集的情况下重新启动!
我搜索了这个错误,根据 Microsoft,它说:
This is one of the oldest bugs in visual studio and it can easily crash "all versions" of visual studio (which is VS.nET 2015 update 1 right now). it happens when you move your project to another directory and report viewer component tries to open dataset schema from previous location. in order to fix this open rdlc file with a text editor. look for a property named "SchemaPath"and update the path of your dataset file there .
我做了这个建议,然后清理项目并重建它但同样的问题!如何解决这个问题?
<rd:DataSetInfo>
<rd:DataSetName>AnalysisDS1</rd:DataSetName>
<rd:SchemaPath>N:\ProjData\FinanceList\FinanceList\Finance\App_Code\AnalysisDS1.xsd</rd:SchemaPath>
<rd:TableName>AnalysisDT1</rd:TableName>
<rd:TableAdapterFillMethod />
<rd:TableAdapterGetDataMethod />
<rd:TableAdapterName />
</rd:DataSetInfo>
目前 V.S 中没有修复这个错误,希望 Microsoft 修复这个持续存在的问题。
解决方法:
我添加一个新项目到我的解决方案,然后拖放我的RDLC
到我的新项目,然后添加一个新数据集,完成我的报告并将它再次拖到原来的项目中,一切都会好起来的。
我也遇到了同样的问题。为了解决这个问题,在我的案例中有两个步骤如下:
1st: 打开“事件查看器”,这是 windows 的默认选项。在这个 'Event Viewer' 您会找出发生此问题的真正原因。 2nd: 从控件中卸载 'Crystal 报告' panel.After 卸载 crystal 报告我的问题已解决。
解决方案在这里... 打开项目目录=>属性=>数据源并删除该文件夹中的所有文件... 有效
这个错误很难解决,但在我们的项目中,我们有几个解决方案 and/or 解决这个问题。
通常你会在事件查看器中收到 2 条不太有用的消息,如下所示
第一条消息:
Faulting application name: devenv.exe, version: 15.9.28307.423, time stamp: 0x5c5b5342 Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000 Exception code: 0xc0000005 Fault offset: 0x49e07264 Faulting process id: 0x3e4c Faulting application start time: 0x01d5ab734dee5790 Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\devenv.exe Faulting module path: unknown Report Id: 93b01c49-4490-41a4-a8db-142f6a99697a Faulting package full name: Faulting package-relative application ID:
第二条消息:
Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.NullReferenceException at Microsoft.ReportDesigner.Design.ProjectItemUtil.GetComplexElements(System.Xml.Schema.XmlSchemaElement) at Microsoft.ReportDesigner.Design.DesignUtil.GetVenusObjectDataSources(System.Xml.Schema.XmlSchema[], System.IServiceProvider) at Microsoft.ReportDesigner.Data.Local.DataSetSynchronizer+d__11.MoveNext() at Microsoft.ReportDesigner.Data.Local.DataSetSynchronizer+d__7.MoveNext() at Microsoft.ReportDesigner.Data.Local.Dialogs.Pages.DataSetGeneralPage.LoadDataSources() at Microsoft.ReportDesigner.Data.Local.Dialogs.Pages.DataSetGeneralPage.LoadData() at Microsoft.ReportDesigner.Data.Local.Dialogs.DataSetDialog.OnLoad(System.EventArgs) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(System.Windows.Forms.Message ByRef) at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef) at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef) at System.Windows.Forms.ContainerControl.WndProc(System.Windows.Forms.Message ByRef) at System.Windows.Forms.Form.WmShowWindow(System.Windows.Forms.Message ByRef) at System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef) at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef) at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)
解决问题的方法:
对于我们中的一些人来说,问题是 DLL 引用 microsoft.office.sharepoint.tools.dll。所以过程就是查看最近添加到TFS的DLL,并尝试将它们从项目中逐一删除,然后再次尝试添加数据集。这解决了我们团队大部分人的问题。
有时,解决方案 1 是不够的,在我的情况下,我从 TFS 的修复中获得了最新版本,但我仍然遇到问题。所以解决方案是从 \Project\package\ 文件夹中删除所有内容,保存所有内容并重建所有内容。这为我解决了这个问题。所以即使引用消失了,包仍然存在。
这是一种解决方法,但就像人们在这里所说的那样,您需要向解决方案中添加一个新项目并创建您的 rdlc 报告和数据集。这工作正常但不太好,因为您随后需要将报告复制到正确的项目并更改 .xsd (数据集的)和 .rdlc 文件的内容,以便它们指向正确的路径。
这个很明显,但你需要检查数据集的路径、模式、数据库连接是否都指向 .xsd 和 .rdlc 文件中的正确路径.
这发生在我的 VS2017 中。我能够通过首先删除包含 .rdlc
的项目的 /bin/
和 /obj/
文件夹中的所有内容来解决此问题。
具体来说,似乎在打开数据集属性 window 时抛出了 FileIOException,而且 /obj/
文件夹中的一个或两个文件似乎无法打开,因为它们正被另一个进程:
DesignTimeResolveAssemblyReferences.cache
DesignTimeResolveAssemblyReferencesInput.cache
我无法弄清楚为什么有时 /bin/
也需要清除,但为了安全起见最好同时清除两者。
我也遇到了同样的问题。我刚刚完成了以下步骤并为我 vs2015 工作。
- 构建=> 在调试模式下清理解决方案。
- 构建 => 在发布模式下清理解决方案。
尝试删除 .vs 或 bin 和 obj 仍然无法正常工作,但是当我尝试删除我的数据源连接并添加新连接时,它对我有用。
这可以与其他问题联系起来吗? vs 2019 crashes without any error report when opening solution
修复 VS 解决了这个问题。值得一试 ;)