I have this weird problem. When i try debugging application everything is ok and when i build it i get exe file in my debug folder. But when i try to start application from debug folder it gives me an error...I tried it with Visual C# 2008, visual studio 2010 and 2012 and always same thing. Did someone have same problem? I am tired of using applications inside a visual studio only.I hope someone can help. btw there are no errors shown after i start application...It just says "aplication stopped working and that's it."
Check whether all the dependent dlls and config files are accessible to the exe or not. You can use dependency walker for this.
Try to convert it to a console application and see errors/logs there. You should always write a log file that helps you in such cases where you cannot debug.
It just says "aplication stopped working and that's it."
It is your job to make it say something else. Windows is rather goofy about crashed .NET apps, it doesn't know anything about .NET, a sad side-effect of the disastrous Longhorn project. What you need to do is write an event handler for the AppDomain.CurrentDomain.UnhandledException event. Subscribe the event in your Main() method, as soon as possible.
In your event handler, display or log the value of e.ExceptionObject.ToString(). A MessageBox or Console.WriteLine() at least. You'll get the exception message and the Holy Stack Trace that tells you exactly where you code crashed. You'll have little trouble finding the bug in your code from that. Usually has something to do with not using the full path of a file, but that's just a guess. The exception message stops you and us from having to guess.
Related
The problem:
I get an eventlog entry that calls out a failure in my orchestration. The stack trace shows the method name from orchestration generated code that I can't see.
What I tried:
The solution presented here doesn't work with visual studio version 12.
Any suggestions?
You can open the Orchestrations DLL with ILSpy and see the code, also open the .odx file with Notepad, after #endif // __DESIGNER_DATA you can see some code that maybe helps you.
Is not posible to activate the Tracking for the Orchestration to see where it fails? I think is better option to find errors.
I'm very new to Visual Studio and Universal Windows Apps Development. As a part of the course, I have this codeSHOW project provided.
I've cloned it successfully in VS 2015, but I can't run the project using the .sln file. Error:
Here's the error log: http://pastebin.com/c012Bba4
I have no clue how to fix it, and the issues on github go unanswered so I can't expect much from there.
This is an known issue in Visual Studio 2015.
The problem is with files with the exact same name under different folders in a Shared project, which in your case is "resources.resjson".
The only workarounds are either to make the file names unique and if that is not an option, to duplicate the files in the projects instead of sharing them out of the Shared project.
This is a VS2015 specific bug, the solution loads just fine on VS2013. You can get some insight into what is going wrong. First note that your got two message boxes that announced this error. Barely visible in your screenshot.
The failure.txt file gives more hints, you can see the stack traces of the two AggregateException that are raised when the solution is loaded. You'll see that two tasks are trying to load the same resources.resjon project item. Not correct of course, quacks like a standard concurrency bug.
Nothing actually goes wrong, Visual Studio can handle the exception and declares it "Recoverable", the projects are still loaded correctly. And compile just fine. Only other thing you need is the Bing Maps SDK, you can download the correct version here.
If you have VS2013 then prefer that version, it doesn't have this bug and loads the solution without any complaint. And minimizes the odds that you'll run into other quirky problems. Given the current stability of VS2015, not great, it is the best way to avoid losing time. Otherwise just ignore the mishap and close the message boxes, some future Update will no doubt fix the bug. You can report it at connect.microsoft.com if you wish. Not actually necessary I think, it looks like VS is phoning home.
I have a project (from a SVN repository), which ran yesterday when I start a new debug instance. It'd show me a form and let me do some stuff on it. Today, I tried to run a new debug instance again (the old one is closed/stopped). It's not showing me the form, although it seems like everything started and there were no errors shown.
I even tried to revert the SVN repository to the last version (the version I started with, which worked). Still, it's not showing me the form, so I was thinking perhaps I switched a setting or something?
I'm not too familiar with Visual Studio 2008 so I'd tought I ask here first.
If you are running Winforms there is an issue with the Form_Load EventHandler that if there is an error, it won't be thrown. I would put a breakpoint on the start of the Form_Load method and step through it making sure there are not any problems. See this SO Question.
If that doesn't work I would put your breakpoint in the Forms Constructor and step through your code to make sure that there are no problems with the InitializeComponent Method.
You also mention in your comment that your problem has to to with a Com Port. If you ran your program earlier and it hung or never really exited there still is a chance that an instance of your program is still running, you need to check your TaskManager. It can lock the port and prevent you from being able to open it( I have been there and done that ). I have had to Kill all instances of my program, and if that didn't work reboot the computer and the remote device.
As you can notice
Symbols are been correctly loaded.
I just created a view GetCompanies.cshtml using the AddView shortlink
But, no matter what I do, I can't debug in the View.
What I did so far:
Close and Open Solution
Close and open Visual Studio
Shutdown all ASP.NET Development Server's
Deleted all Symbol Libraries .pdb
Clean Solution
Re-Build Solution
did not (yet) shutdown Windows 7 x64 :-/
Sometimes if you have a hard stop, Visual Studio temp cache will be screwed.
Clear the cache by deleting these folders:
C:\Windows\Microsoft.NET\Framework\<.net version>\Temporary ASP.NET Files\(ApplicationName)
C:\Windows\Microsoft.NET\Framework64\<.net version>\Temporary ASP.NET Files\(ApplicationName)
I am finding the same behavior from time to time when debugging silverlight. My solution is to clean the browser's cache (on latest IE click on the wheel button, Developer tools), as it sometimes will cache the binary files and not load the new ones.
Perhaps is could be the same with your views?
Been messing with this problem for a couple hours trying everything above. I finally changed my Target Framework to .NET Framework4.5 and it all started magically working.
This is always weird. I just had this problem and solved it with a full rebuild of the entire solution.
There was also another strange symptom, though: a new unit test that I had written using NUnit, mocking with NSubstitute, wouldn't pass because NSubstitute wasn't returning what I wanted it to return. I lost a few minutes trying to figure out if I did something wrong programming NSubstitute, then when I tried to attach the debugger to the NUnit GUI I saw that warning.
That's when I decided to do a full rebuild of the solution, and that worked for me.
So I guess the lesson to be learned is "before smashing your head against the wall, try a full rebuild".
For me, I somehow switched my target build to Release instead of Debug
Remember that views are actually compiled when you request the page (by default).
This means when you set a breakpoint in a view:
It shows the "No Symbols" error. This just means the view isn't
compiled yet.
It shows the breakpoint fine. This just means
that it found SOME compiled version of the page. Like the LAST working version...
So basically its not meaningful information to look at what it says when you mouseover the breakpoint in a view (at least in this regard)
If you are trying to debug this page, then you have a problem. Look at what the debugger is outputting to your BROWSER instead and fix that first. I think we'll be surprised about how many people are going to facepalm at this.
I had this problem with SL5 project (VS2012). And to fix this, I was needed to set "Silverlight" option enabled in %MyProjectName%.Web project properties, under Web tab.
In my case, the .PDB file was hosed (from which the symbols are loaded) in VS 2012, so performing a Clean and Build reconstructed the .PDB file and everything started workign again.
I was attempting to debug a deployed WCF windows services (compiled in Release mode) and had the exact same issue. Give this a shot...
Save All. You may even want to try to clean the solution
Rebuild all and install or deploy
BEFORE starting the service (or exe) I copied the .pdb files over to the install folder
Start the service (or exe) and attach the debugger to the process
Worked like a charm (finally) for me.
delete bin and obj directories
run solution again.
Note: Unless that cshtml loads at runtime the symbols are not loaded. On page load that breakpoint will be hit. So wait till control goes to that page
Ive got a C# 2.0 app that launches the Crystal Reports viewer and displays some reports. If I run this in Debug or Release mode OUTSIDE of visual studio, it runs fine. If I debug this through Visual Studio 2005, the report will pop up, but then a minute or two later VS freaks out on a ContextSwitchDeadlock, also telling me that no symbols have been loaded for any call stack frame so i can't debug it.
This likely has something to do with the fact the report is being launched on another thread. The reasons for this are a little convoluted but I'll try to explain in case it's important:
We have a long-running process that runs on a background thread. When the process is done it launches reports. If it(the background thread) just calls Show(non-modal) on the report viewer forms, it will then terminate and kill all those report forms immediately. So instead it launches one child thread per report and calls it with ShowDialog(modal). That way the forms are all seemingly non-modal to each other, but when the user closes the LAST one, the background process thread now has no child threads and it can terminate.
Does this makes sense, and does anyone have any idea why I'd be getting the ContextSwitchDeadlock MDA inside VS, but no exception is thrown when the code runs standalone?
Try renamining you c:\temp\ directory - There is a know issues that if there is an XML file in the c:\temp\ Crystal Reports Crashes and you cant open them..
I think you answered your own question... it has to do with how your running it in a separate thread.
Delete or move any .xml files in your c:/temp folder if you have one. They cause database expert to crash VS
Got the same problem. It's been known to cause database Expert to cause VS to crash also due to some xml file being in your c:\temp directory. First option is, to empty the c:\temp directory (worked for me). Second you can try to rename your temp directory to "MyTemp" or something similiar. And last but not least you can try setting your project to use 4.0 Framework not the client version.
P.S:#John Cruz Nope he didnt, I don't work with separate threads in my project and got the same ContextSwitchDeadlock-Error.