Click here to Skip to main content
15,918,889 members

Comments by sjelen (Top 175 by date)

sjelen 6-Nov-14 9:41am View    
try calling objRunspace.Close() explicitly.
Since both PowerShell and Runspace implement IDisposable you can use 'using' block
using (var powershell = PowerShell.Create()){
...
using (var objRunspace = RunspaceFactory.CreateRunspace()){
...

}
}
Then you don't have to worry about calling .Dispose() it'll be called automatically when execution exit using block.
sjelen 25-Oct-13 11:35am View    
OK, 'never' is maybe too strong.
But you never know when will Designer decide to re-gen the file and overwrite manual changes.
sjelen 25-Oct-13 10:57am View    
What exception is thrown?
sjelen 25-Oct-13 10:22am View    
Have you modified Designer.cs file manually? That's never a good idea.
Do you have any compiler errors when you build app?
Are you able to run app? Is menustrip visible when you run it?
sjelen 1-Jul-13 7:28am View    
You have that line in two places in your code. Which one causes the error?