locked
VS 2008 + Silverlight tools beta 2 = No way to create any Windows Forms applications. What gives? RRS feed

  • Question

  •  Hi,

    I spent the whole day trying to install VS 2008 and set up an environment for Silverlight development (after managing to convince my boss that it is a good direction to take). To my dismay, after installing VS 2008 and the Silverlight Tools Beta 2, firing up VS 2008 and choosing to create a new Silverlight project I got a pop up message saying: 

    Argument 'picture' must be a picture that can be used as a Icon.

    followed by VS just sitting there and failing to create the project (though an empty directory is created). So I said OK, may be there is something wrong with the Silverlight Tools so I uninstalled them, fired up the VS and tried to start a Windows Forms project. This time, the project is created but the form is not viewable through design view with the same error being shown in the "To prevent possible data loss..." view. The complete details of the error:

    Instances of this error (1)
    at System.Drawing.Icon.Initialize(Int32 width, Int32 height) at   
    System.Drawing.Icon..ctor(Type type, String resource) at   
    System.Windows.Forms.Form.get_DefaultIcon() at   
    System.Windows.Forms.Form.get_Icon() at   
    System.Windows.Forms.Form.UpdateWindowIcon(Boolean redrawFrame) at   
    System.Windows.Forms.Form.CreateHandle() at   
    System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at   
    System.Windows.Forms.Control.CreateControl() at   
    System.Windows.Forms.Control.OnVisibleChanged(EventArgs e) at   
    System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e) at   
    System.Windows.Forms.Form.OnVisibleChanged(EventArgs e) at   
    System.Windows.Forms.Control.SetVisibleCore(Boolean value) at   
    System.Windows.Forms.Form.SetVisibleCore(Boolean value) at   
    System.Windows.Forms.Control.set_Visible(Boolean value) at   
    System.Windows.Forms.Design.DesignerFrame.Initialize(Control view) at   
    System.Windows.Forms.Design.DocumentDesigner.Initialize(IComponent component) at   
    System.Windows.Forms.Design.FormDocumentDesigner.Initialize(IComponent component) at   
    System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo) at  
    System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name) at   
    System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name) at   
    System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) at  
    System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer) 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)  


     

    If I add a line to Form1.Designer.CS and set the icon file manually to an existing ico file, I get another error which is even more puzzling to me:

     
    private void InitializeComponent(){  
    this.components = new System.ComponentModel.Container();  
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;  
    this.Text = "Form1";  
    this.Icon = new System.Drawing.Icon("icon.ico");} 

     The error becomes -

     

    The service System.Windows.Forms.Design.IEventHandlerService already exists in the service container. Parameter name: serviceType
     
    Instances of this error (1)
    1.
    at System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType, ServiceCreatorCallback callback, Boolean promote)
    at System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType, ServiceCreatorCallback callback)
    at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IServiceContainer.AddService(Type serviceType, ServiceCreatorCallback callback)
    at System.Windows.Forms.Design.DocumentDesigner.Initialize(IComponent component)
    at System.Windows.Forms.Design.FormDocumentDesigner.Initialize(IComponent component)
    at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
    at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
    at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
    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 System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

    I am extremely frustrated after a day of installing/uninstalling/reinstalling...

    Any ideas what is going on?

    Thanks in advance!

    ulas

     

    ps. Don't know if this is relevant. I had VS 2005 on the same machine though after a few installs/uninstalls/reinstalls I uninstalled the VS 2005 to make sure there wasn't a conflict but that did not help either.
    pps. I posted this in the Windows Forms thread before (more than a month ago) but to no avail.


    がんばって!
    • Moved by Figo Fei Friday, September 12, 2008 9:02 AM redirect (Moved from Visual Studio Setup and Installation to Where is the Forum For…?)
    Thursday, September 11, 2008 5:11 AM

Answers