技术文章 - CS185832
VSI - 当在 Integrity Lifecycle Manager 中为 ac# 项目打开属性页面时发生异常时,日志中出现大量警告消息
已修改: 27-Dec-2022
适用于
- PTC RV&S (formerly Integrity Lifecycle Manager) 10.4 to 12.0
说明
- 打开c#项目的属性页时出现异常。 VS 2010 和 VS 2012 都会出现此问题。重现:
1.打开之前共享的Visual Studio C#项目
2.在Solution Explorer中右击C#项目,选择Properties菜单项
3. 打开 Visual Studio 集成日志文件
2.在Solution Explorer中右击C#项目,选择Properties菜单项
3. 打开 Visual Studio 集成日志文件
- 您应该在日志中看到以下内容:
- [4/30/2013 9:30:22 AM] [警告] 异常 (System.NotImplementedException):方法或操作未实现。[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode,IntPtr errorInfo)[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)[4/30/2013 9:30:22 AM] [警告] 在 Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 小时,Int32[] expectedHRFailure)[4/30/2013 9:30:22 AM] [警告] 在 MKS.VisualStudio.Core.VSItemFactory.GetProjectType(IVsHierarchy 项目)[4/30/2013 9:30:22 AM] [警告] 异常 (System.NotImplementedException):方法或操作未实现。[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode,IntPtr errorInfo)[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)[4/30/2013 9:30:22 AM] [警告] 在 Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 小时,Int32[] expectedHRFailure)[4/30/2013 9:30:22 AM] [警告] 在 MKS.VisualStudio.Core.VSItemFactory.GetProjectType(IVsHierarchy 项目)[4/30/2013 9:30:22 AM] [警告] 异常 (System.NotImplementedException):方法或操作未实现。[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode,IntPtr errorInfo)[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)[4/30/2013 9:30:22 AM] [警告] 在 Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 小时,Int32[] expectedHRFailure)[4/30/2013 9:30:22 AM] [警告] 在 MKS.VisualStudio.Core.VSItemFactory.GetProjectType(IVsHierarchy 项目)[4/30/2013 9:30:22 AM] [警告] 异常 (System.NotImplementedException):方法或操作未实现。[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode,IntPtr errorInfo)[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)[4/30/2013 9:30:22 AM] [警告] 在 Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 小时,Int32[] expectedHRFailure)[4/30/2013 9:30:22 AM] [警告] 在 MKS.VisualStudio.Core.VSItemFactory.GetProjectType(IVsHierarchy 项目)[4/30/2013 9:30:22 AM] [警告] 异常 (System.NotImplementedException):方法或操作未实现。[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode,IntPtr errorInfo)[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)[4/30/2013 9:30:22 AM] [警告] 在 Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 小时,Int32[] expectedHRFailure)[4/30/2013 9:30:22 AM] [警告] 在 MKS.VisualStudio.Core.VSItemFactory.GetProjectType(IVsHierarchy 项目)[4/30/2013 9:30:22 AM] [警告] 异常 (System.NotImplementedException):方法或操作未实现。[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode,IntPtr errorInfo)[4/30/2013 9:30:22 AM] [警告] 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)[4/30/2013 9:30:22 AM] [警告] 在 Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 小时,Int32[] expectedHRFailure)[4/30/2013 9:30:22 AM] [警告] 在 MKS.VisualStudio.Core.VSItemFactory.GetProjectType(IVsHierarchy 项目)
- 调试了问题,并在打开项目的属性并发生异常时确定了以下调用堆栈:
- VsCore_2012.dll!MKS.VisualStudio.Core.VSItemFactory.GetProjectType(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy 项目)第 93 行 C#VsCore_2012.dll!MKS.VisualStudio.Core.VSItemFactory.CreateProjectChild(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy 项目,uint itemid)第 68 行 + 0xb 字节 C#VsCore_2012.dll!MKS.VisualStudio.Core.VSItemFactory.Create(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy 项目,uint itemid)第 26 行 + 0xb 字节 C#VsCore_2012.dll!MKS.VisualStudio.Core.VSSelectionCollection.VSSelectionCollectionEnumerator.Current.get() 第 178 行 + 0x3e 字节 C#SourceControl_2012.dll!MKS.VisualStudio.SourceControl.SourceControlServices.SolutionExplorerSelectionChangedHandler(object sender, System.EventArgs args) 第 920 行 + 0x36 字节 C#VsCore_2012.dll!MKS.VisualStudio.Core.VSSelectionCollection.OnSelectionChanged() 行 246 + 0x2f 字节 C#VsCore_2012.dll!MKS.VisualStudio.Core.VSSelectionCollection.Microsoft.VisualStudio.Shell.Interop.IVsSelectionEvents.OnSelectionChanged(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierOld,uint itemidOld,Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect pMISOld .VisualStudio.Shell.Interop.ISelectionContainer pSCOld,Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierNew,uint itemidNew,Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect pMISNew,Microsoft.VisualStudio.Shell.Interop.ISelectionContainer pSCNew) 第 221 + 0x8 行字节 C#
这是文章 185832 的 PDF 版本,可能已过期。最新版本 CS185832