object not set to an instance of an object

Issue #62 resolved
Former user created an issue

Just purchased a license after doing the trial a few months ago. Just installed VSS 2017 Ent, and Pro Tools on work laptop. When I try to do anything with the windows.form.designer(Powershell Form) I immediately get the error "object not set to an instance of an object" and then VSS crashes. I was also having this issue on my work station. I am running the current version.

Comments (12)

  1. Seth Reno

    I also get this on previous projects when I try to open the powershell form designer.

    at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager) 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)

  2. Seth Reno

    This is the message above that stack. "The designer could not be shown for this file because none of the classes within it can be designed. "

  3. Seth Reno

    Here is a Google Docs link of the log from the following steps. https://docs.google.com/document/d/1mESoX0dYc-Rr3ExxbMfIWybx_zLpgbv-fZZvEf0hNOI/edit?usp=sharing

    1-Created new project (Powershell Script Project) 2-Add item > Powershell Form 3-Remove imported System.Design Reference. Added v4 System.Design, System and System.Draw References. 4-Open Form1.ps1 designer. 4.1-If I go to resize the window in the designer, I get "object not set to an instance of an object" and then VSS crashes. 4.2-If I add a button, "object not set to an instance of an object" pops up, VSS does NOT crash but, after some time I get the "The designer could not be shown for this file because none of the classes within it can be designed. " Stack Error.

    Hope this helps

  4. Adam Driscoll

    That's exactly what i needed. I see the issue when adjusting the references like you did. Will let you know when I have more.

    EDIT: Never mind. Happens even without the reference changes.

  5. Seth Reno

    Actually, this build resolved new solutions but existing solutions still have that call stack error.

    EDIT: I can open a new powershell form in an existing solution.

  6. Seth Reno

    Previous project's form.designer.ps1 only contain this

    [void][System.Reflection.Assembly]::Load('System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') [void][System.Reflection.Assembly]::Load('System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')

  7. Log in to comment