Value cannot be null. Parameter name: activationContext
-
Friday, September 10, 2010 6:47 PM
when I start application I have masage,
Value cannot be null. Parameter name: activationContext
vs 2010 express
win 7
sorry bad english
tnx
All Replies
-
Saturday, September 11, 2010 12:25 AM
Please post a snippet of code around location where error occurred.
-
Monday, September 13, 2010 5:23 AMModerator
Hi Ddr,
Welcome to MSDN forums.
“when I start application I have masage,
Value cannot be null. Parameter name: activationContext”
è
You can handle the UnhandledException event of the application and get all the information available about the exception like this:
Project menu -> Properties -> Application tab -> “View Application Events” button
Private Sub MyApplication_UnhandledException(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs) Handles
Me.UnhandledException
MessageBox.Show(e.Exception.ToString)
e.ExitApplication = False
End Sub
Additionally, Joe came across the similar issue “Value cannot be null. Parameter name: activationContext” in the following thread and fixed it. Please double check whether there is circular reference in your project.
“My app is called SpotLight. In Solution Explorer, if you double click My Project, and then click the References Tab, I had a Reference to SpotLight. How it got there I'm not sure. I did not put it there, but it apprently causes some kind of circular reference which caused Click Once to fail and my App to no longer run after a Publish.
To fix my problem I simply clicked on the SpotLight reference and deleted it. Problem solved.”
Best regards,
Martin Xie
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer by Martin_XieModerator Thursday, September 16, 2010 2:14 PM
-
Monday, September 13, 2010 9:44 AM
tnx
problem is solved
-
Tuesday, March 22, 2011 11:42 AM
Hello,
Today, I got exactly the same problem.
But when I try the first option it gives me the error: Event 'UnhandledException' cannot be found.Can anybody help me?
-
Sunday, April 10, 2011 12:38 PM
Nobody?Hello,
Today, I got exactly the same problem.
But when I try the first option it gives me the error: Event 'UnhandledException' cannot be found.Can anybody help me?
-
Sunday, April 10, 2011 1:40 PM
Same here Niels1567, have a look at the references in Project/'projectname' Properties. You'll find a reference to your project there, like is mentioned in Martin Xiel's answer. I used the "Unused References..." button and then "Removed" the results. It fixed it.
Not sure about your problem, but my debugger didn't come up with any specific line of code that had an error. Looks like a Bug to me. VS2010 SP1 seems to be buggier than pre-SP1.
-
Tuesday, August 09, 2011 9:54 PM
THAT'S IT !!!! THX. For google, may solve Problem with Tags : Parametername: activationContext {"Der Wert darf nicht NULL sein.\r\nParametername: activationContext"} SMDiagnostics 4.0.0.0 Visual Basic .Net Express 2010 Quellen suchen Projekt nicht ausführbarSame here Niels1567, have a look at the references in Project/'projectname' Properties. You'll find a reference to your project there, like is mentioned in Martin Xiel's answer. I used the "Unused References..." button and then "Removed" the results. It fixed it.
Not sure about your problem, but my debugger didn't come up with any specific line of code that had an error. Looks like a Bug to me. VS2010 SP1 seems to be buggier than pre-SP1.
- Proposed As Answer by Acidrain0815 Tuesday, August 09, 2011 9:56 PM
- Unproposed As Answer by Acidrain0815 Tuesday, August 09, 2011 9:57 PM
- Proposed As Answer by Acidrain0815 Tuesday, August 09, 2011 9:57 PM
-
Sunday, December 04, 2011 3:00 PM
try unchecking the "enable clickonce security settings" checkbox in the security tab of the application properties(Projects Tab -> "Project Name" Properties-> Security Tab).- Proposed As Answer by Faisal Imam Tuesday, June 12, 2012 3:55 PM
-
Friday, May 04, 2012 10:45 AM
Just had the same issue, it was due to a circular reference in my project
Thanks Martin!
-
Tuesday, June 12, 2012 3:56 PM
try unchecking the "enable clickonce security settings" checkbox in the security tab of the application properties(Projects Tab -> "Project Name" Properties-> Security Tab).
Thanks a lot. This solved my problem -
Saturday, June 30, 2012 4:14 AM
Thanks a lot. This solved my problem.

