I can access the code but can not open the designer view. I can add new items and code them, only the existing item's designer view is returning these errors.
I can also run and debug the program successfully.
The only problem is that now that I have opened it on vs2015, it can not be opened in vs2010 again.
I have been Googling for hours and tried all sorts of things, but still no luck.
Stack trace:
Error HRESULT E_FAIL has been returned from a call to a COM component
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.Exceptions.ThrowEFail()
at Microsoft.VisualStudio.LanguageServices.Implementation.CodeModel.CodeTypeRef.LookupTypeSymbol()
at Microsoft.VisualStudio.LanguageServices.Implementation.CodeModel.CodeTypeRef.get_TypeKind()
at EnvDTE.CodeTypeRef.get_TypeKind()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.GetUrtTypeFromVsType(CodeTypeRef vsType)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnTypePopulateMembers(Object sender, EventArgs e)
at System.CodeDom.CodeTypeDeclaration.get_Members()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.CodeTypeDeclarationPopulator.OnPopulateMembers(Object sender, EventArgs e)
at System.CodeDom.CodeTypeDeclaration.get_Members()
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
Related
I've never dealt with ActiveX controls but I wanted to add one to an an existing MFC project using VS2019. I created a dialog in the resource editor, I added the ActiveX control I wanted to play with (RDP - tried different versions), resized it. Then closed the tab, when I try to open that dialog in the resource editor I get:
---------------------------
Microsoft Visual Studio
---------------------------
The ActiveX control "Microsoft RDP Client Control (redistributable) - version 11" could not be instantiated.
---------------------------
OK
---------------------------
What's wrong and how do I fix it?
Also, what is the difference between the ones that say (redistributable) vs the ones that don't have that?
TIA!!
P.S. After that error above, if I try to open again I get:
An error occurred while initializing the frame's content
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowPaneDocumentObject.Init(Boolean initSize)
at Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.InitializeDocumentObject(Object punkView)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.InitializeDocumentSite(Boolean creatingStubFrame, Boolean replacingStubView, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.CreateContentPane(FrameMoniker frameMoniker, Boolean isDocument, String lpstrMkDoc, UInt32 eCreateWindowFlags, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid, Guid rguidCmdUI, ViewGroup parent, IVsWindowFrame& ppWindowFrame)
File Path: Path\To\Resource.rc
Frame GUID: 177559e0-d141-11d0-92df-00a0c9138c45
Frame mode: VSFM_Float
Error Code: 0x80004005
This will be fixed in KB900411
I've added several iTextSharp DLLs to a Sharepoint 2010 project (deployed as a WebPart).
The Web Part compiles/runs fine (I can step through my WebPart project while interacting with the web part on a page on the Sharepoint site). That is, it runs fine until code is called that actually uses itextsharp.dll. Then, the page crashes, and I get (in the log file), "The system cannot find the file specified"
Do DLLs have to be deployed to a specific place for Sharepoint to find them, or...???
UPDATE
Even after copying four itextsharp DLLs to C:\Windows\Microsoft.NET (Windows Server 2008, .NET 3.5), I get the same err msg.
For the gory details from the log file:
03/30/2015 14:49:28.43 w3wp.exe (0x0968) 0x1834 SharePoint Foundation Runtime tkau Unexpected System.IO.FileNotFoundException: Could not load file or assembly 'itextsharp, Version=5.5.5.0, Culture=neutral, PublicKeyToken=6574839201' or one of its dependencies. The system cannot find the file specified. at XMLToPDF.XMLToPDFWebPart.XMLToPDFWebPart.ConvertFromXMLToPDF(List`1 listOfListItems) at XMLToPDF.XMLToPDFWebPart.XMLToPDFWebPart.btnSave_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ef8cece3-42f4-47d0-ab0a-ca2f0fff46e4
The link provided by user2864740 was key.
In a nutshell, this is what I did:
2-clicked Package.package
Selected the "Advanced" button
Selected the "Add" > "Add Existing Assembly" button
Verified "GlobalAssemblyCache" was selected
Using the ellipsis button affiliated with the "Source Path" edit, added each needed DLL one at a time
Saved Package.package
And: voila! Joy in Mudville, including a ticker-tape parade, a marching band featuring 76 trombones, and the whole nine yards (IOW, it worked).
private void Form1_Load(object sender, EventArgs e)
{
Directory.CreateDirectory(null);
MessageBox.Show("hnjkh");
}
When I run above sample code, VS2013 says A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll. Then remaining code not work.
Is this behaviour normal?
If this behaviour is normal, when a first chance exception occured, sometimes I can not find location of the problem. Debugging in this way is very hard for large projects.
How can i find exact line of the problematic code?
I don't want to toggle exceptions for every type of exception. Also when I toggle exceptions then it is thrown even user handled. I want to show only user unhandled exceptions.
Turn on the Exceptions thrown for Common Language Runtime Exceptions
Debug->Exceptions
Select the thrown check box next to "Common Language Runtime Exceptions"
The problem discussed here. When i move codes to button1_click then it works normally. Thanks to Hans Passant.
I have developed a project with Crystal Reports 10 and developed a setup which works fine generating the pdf file but when I install this application in any other machine and try to run pdf generation than I get this exception:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=10.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
File name: 'CrystalDecisions.CrystalReports.Engine, Version=10.0.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
at WindowsApplication1.frmPaySlip.ShowReportSalaryStatement(DataSet ds, String toadd, String rep)
at WindowsApplication1.frmPaySlip.pdfgenerator(String rep, String toadd)
at WindowsApplication1.frmPaySlip.btnOK_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I have tried almost every possibility I found in the net but couldn't get sorted out.
I Sorted out with the issue. The reference of crystal report was referring to the other version of dll so it was working fine in machine and throwing error for other machine. I cleared all the reference and rerefered all the dll `s of crystal report and rebuild the setup its working fine now
In VS2010 I get the following error when opening a Silverlight application:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.<GetXmlNamespaceCompatibilityMappings>d__8.MoveNext()
at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()
at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier)
at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context)
at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)
at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors)
at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem()
at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem()
at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState()
at MS.Internal.Host.PersistenceSubsystem.Load()
at MS.Internal.Host.Designer.Load()
at MS.Internal.Designer.VSDesigner.Load()
at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
at MS.Internal.Host.Isolation.IsolatedDesigner.Load()
at MS.Internal.Designer.DesignerPane.LoadDesignerView()
Now I want to say that on my PC Microsoft Silverlight, Microsoft Silverlight 3 SDK and Microsoft Silverlight 4 SDK are all installed. In the project that I get this exception with I am using the Silverlight 3 SDK.
How can I resolve this?
check the silverlight code in your xaml implementation code it seems that the variable d__8 is not populated or a null or not referenced ..
check this
http://social.msdn.microsoft.com/Forums/en/vswpfdesigner/thread/01ce533e-ed94-48d2-8184-e2e34e6bdc6f
open *.csproj file with Notepad and check this lines:
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
it must be exist in *.csproj file.