Windows Develop Bookmark and Share   
 index > Windows Forms Designer > The CurrentContext property of the LicenseManager is currently locked and cannot be changed.
 

The CurrentContext property of the LicenseManager is currently locked and cannot be changed.

Upon trying to open the Designer view of a project which I have opened many times before, I got the following error:

"The CurrentContext property of the LicenseManager is currently locked and cannot be changed. "

Call Stack:
"at System.ComponentModel.LicenseManager.set_CurrentContext(LicenseContext value)
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) "

Anyone know how to solve it?

Thanks.
dsagefjyrf  Friday, June 12, 2009 8:38 PM
Hi dsagefjyrf,

It seems there is no problem with your project. The problem is in the VS installed on you computer. Please try the following step to see if it helps.
1. If you have installed VS add-in, you can run in safe mode, so the add-in will be disabled.
2. Restore all VS settings, Tool->Import and Export Settings, select "Restore all settings".
3. You can try to create a new user account in Windows, login as that account to start VS. VS will initial all settings for that account.

Please tell me your test result.
It will be helpful to tell me after which operation you meet that error if you still remember that.

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Friday, June 19, 2009 1:35 AM
It appears that this is some sort of corruption on some of the solution files in the project.
To fix it you need to restore your project froma recent backup, before the error.
T3chnomancer  Monday, June 22, 2009 3:16 PM
Something that is worth adding that I have just observed is that I cannot open the design of ANY projects as I recieve the above error.
dsagefjyrf  Saturday, June 13, 2009 4:51 PM
Hi dsagefjyrf,

What type of form do you receive the error? Do you view the inherited form?

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Tuesday, June 16, 2009 3:25 AM
no - the main one. In the Solution Explorer (on the rhs), I have the following items listed:

Solution '(name of project)' (1 Project)
(name of project)
Properties
References
Program.cs
Solver.cs

When i right click on solver.cs and click "view design" i get the above error.
dsagefjyrf  Tuesday, June 16, 2009 1:59 PM
Hi dsagefjyrf,

Did you receive any error when compile? If no error, please try to copy the whole project to another computer running VS. Do you receive error on that computer?

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Wednesday, June 17, 2009 1:51 AM
I don't recieve an error when compiling.

I tried putting on a different computer with VS and it works fine. So I reinstalled it but still the problem occurs...
dsagefjyrf  Thursday, June 18, 2009 9:34 PM
Hi dsagefjyrf,

It seems there is no problem with your project. The problem is in the VS installed on you computer. Please try the following step to see if it helps.
1. If you have installed VS add-in, you can run in safe mode, so the add-in will be disabled.
2. Restore all VS settings, Tool->Import and Export Settings, select "Restore all settings".
3. You can try to create a new user account in Windows, login as that account to start VS. VS will initial all settings for that account.

Please tell me your test result.
It will be helpful to tell me after which operation you meet that error if you still remember that.

Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Friday, June 19, 2009 1:35 AM
I have also started to receive a similar error...

The CurrentContext property of the LicenseManager is currently locked and cannot be changed. Instances of this error (1) 1. Hide Call Stack at System.ComponentModel.LicenseManager.set_CurrentContext(LicenseContext value) 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) Since getting this message I have been unable to view the design view of any forms.
Resetting VS Settings had no effect.
Disabling Add-ins has had no effect.
Unable to test the different username idea as operating within a very strict Network.

The problem appears when you attempt to load a form or control in design view.
VS2008 SP1 V 9.0.30729.1
T3chnomancer  Monday, June 22, 2009 1:37 PM
It appears that this is some sort of corruption on some of the solution files in the project.
To fix it you need to restore your project froma recent backup, before the error.
T3chnomancer  Monday, June 22, 2009 3:16 PM

You can use google to search for other answers

Custom Search

More Threads

• Editable Panel within UserControl
• Problem drawing custom object when hidden by windwo, then redrawing.
• Forms Design View
• Design Issue with TypeConverter for a Collection Item.
• ToolboxBitmap doesn't work
• Using Data Form Wizard - AddNew() adds new row but doesn't clear out databound controls
• ToolStripComboBox
• I need .NET Graphing Component
• usercontrol expandable properties
• How to handle Ctrl-Drag on design surface?