Solved

VB error - The Call Stack Contains Only External Code

Posted on 2014-12-11
6
1,148 Views
Last Modified: 2014-12-12
I've programmed a small application in visual studio 2012 using VB.NET 3.5 framework. It was running perfectly when I last modified the project, and published it. However today when I go in and try to run the code I get an error (see pic/below). I don't know what's causing this. Nothing has changed in the project since it was last published, this just seems to have suddenly happened!

Can anyone explain what's happened, and how to resolve it?

The Call Stack Contains Only External Code
>      mscorlib.dll!System.Runtime.Hosting.ApplicationActivator.CreateInstance(System.ActivationContext activationContext, string[] activationCustomData) + 0xe0 bytes      
       mscorlib.dll!System.Runtime.Hosting.ApplicationActivator.CreateInstance(System.ActivationContext activationContext) + 0xa bytes      
       mscorlib.dll!System.Activator.CreateInstance(System.ActivationContext activationContext) + 0x3e bytes      
       Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() + 0x23 bytes      
       mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x66 bytes      
       mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6f bytes      
       mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes
Screen-Shot-12-11-14-at-06.05-PM.JPG
0
Comment
Question by:bjblackmore
  • 3
  • 3
6 Comments
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 40494504
Have you tried placing a check mark when you get the dialog to Disable Just My Code and see what happens?
0
 

Author Comment

by:bjblackmore
ID: 40495724
I'm not entirely sure how to do that? Can you provide details and I will give it a try. Like I said, last time I ran the app build/public it was fine, and I've got a working build. But for some reason, just going into yesterday and running debug it's giving that error. Nothing should have changed/been added to the code.
I don't know what this 'ApplicationActivator' or 'ActivationContext' is trying to do. I don't have any kind of application activation in the code. It's just a small 200kb app for updating user details in AD.
0
 

Author Comment

by:bjblackmore
ID: 40495771
There has to be something outside the code that's causing this error, as I just copied & pasted the code & form into a totally new project, and it's working. I could just keep the new project, but I'd love to know what caused the old one to throw up that error, in case it happens again!
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 40496320
You can try another thing first.
In the Visual Studio IDE click on the main menu "Build" and select from the context menu "Clean Solution". Then re-build the solution and run.

If that did not help look at the screen shot you posted in your question at the bottom you show a stack trace, just above that is a check box with the label Disable Just My Code, place a check mark on it then try again.
0
 

Author Closing Comment

by:bjblackmore
ID: 40496501
I went through all of the application settings, and restored them to default, and checked against the new clean project, there was 1 extra reference (system.threading) which I removed and also did the clean solution. Seems to have fixed it, not sure exactly which of those, but at least it's working now!
Many thanks
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 40496615
Not a problem, glad to help.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now