Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9136417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:56:59+00:00 2026-06-17T08:56:59+00:00

I noticed that an application that I am developing (a game written in C#

  • 0

I noticed that an application that I am developing (a game written in C# / XNA) occasionally behaves differently depending on whether it is started from within Microsoft Visual Studio (2010) compared to when it is started outside MSVS (e.g. from Windows Explorer). Specifically, sometimes I get errors (exceptions are drawn) that do not occur within MSVS.

What could be the reason for this difference? Ideally there would be a way to make MSVS check the application as strictly as possible such that I can be sure that all bugs really occur (and can be fixed) during development.

The problem happens in both release and debug mode. The game uses a number of external dlls (nuclex lib, sharp dx) but these libs are all used both from within MSVS and outside. The game entirely runs in a single thread.

Please note that the question is not about a specific error that I need to debug, but it is about general differences that (could) arise from the way an application is started.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:57:00+00:00Added an answer on June 17, 2026 at 8:57 am

    There are two main things that cause your program to run differently, when run in Visual Studio.

    First of all, the Visual Studio hosting process. I think it’s disabled by default. But the toggle for it, if you need it, is in the “Debug” tab of the properties for your application project.

    The second, is the fact that the .NET JIT will emit different, more debuggable machine code when a debugger is attached. You can disable this behaviour by unchecking the “Suppress JIT optimization on module load (Managed only)” checkbox in Tools -> Options -> Debugging -> General.

    You could try disabling this option and then running your game under the debugger and seeing if the same error occurs. Note, of course, that disabling this will make your program significantly harder to debug – but it does help in a case like this one.

    As was mentioned in comments, it is almost unheard of for this kind of problem to be related to the code-generation (although, theoretically, I suppose it’s possible). Latent threading bugs caused by changes in performance are far more likely. It could also be a badly behaved native library – although this is also unusual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I started developing my application in AppEngine Java, however I noticed that Facebook has
In this application we are developing, we noticed that a view was particularly slow.
I'm developing a MonoMac application on OS X 10.7. I've noticed that Xcode has
I'm developing a GXT application, and I've noticed that I'm not able to use
I'm developing a Flex 2 application, and I noticed that part of the library
In the course of developing my Android application, I noticed that the following lines
I noticed that an application I am maintaining was giving me a javascript error
I have noticed that my application's Document folder is sometimes different. The workflow was
I noticed that IE 9 does not support application cache. How can I use
In my WPF application using MVVM I noticed that in some cases the CanExecute

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.