but COM was not at home, so COM could not answer ;)
This was my error (it was actually a warning according to Visual Studio 2013):
Warning 13 Generation of the designer file for MagazineDetails.aspx failed: Error HRESULT E_FAIL has been returned from a call to a COM component. C:\www\myproject\MagazineDetails.aspx
It is the same error as the following people have/had:
- http://forums.asp.net/t/1624922.aspx
- http://forums.asp.net/p/1953745/5570912.aspx?Visual+Studio+2013+Generation+of+the+designer+file+for+xxxxx+failed+Error+HRESULT+E_FAIL+has+been+returned+from+a+call+to+a+COM+component+
I am not alone, so I decided to blog about it. My configuration contains a Windows 8.1 x64 install with all the latest updates and have Visual Studio 2013 (version 12.0.21005.1) and I had this issue with just one aspx file.
The error was not even visible at first. I had to lower the warning level (it was 4, and error was visible at 3)
The thing is that this invisible error broke my intellisense and when I added controls like literals, buttons, labels etc. to the aspx. The “codebehind” (aspx.cs) did not recognize them. It was frustrating! And this was only an issue with one or two aspx files. (out of 30 or something)
On stackoverflow there were three rather nice suggestions:
- (re-)convert to web application the project
- switch to the designer and back to re-generate
- restart visual studio
Unfortunately, none of the above fixed my problem. I found an other suggestion and cannot find the source, so I am sorry that I can not give credits to the person who pointed me in the right direction. But the solution is to add a classname to the page directive. Somehow it caused the IDE to recognize all the controls in the code behind and re-enabled the intellisense in the code behind.
<%@ Page Title="Magazine details" Language="C#" MasterPageFile="~/nl.Master" AutoEventWireup="true" CodeBehind="MagazineDetails.aspx.cs" Inherits="NikkiLissoni.MagazineDetails" ClassName="NikkiLissoni.MagazineDetails" %>
I hope this will help out other developers and might save them an hour or two searching for a solution for this strange behaviour.
Good luck!