Why there is no Debug configuration in Visual Studio 2010? - visual-studio-2010

I downloaded the source code of a Visual Studio 2010 project, and since I have to analyze it for my University I'd like to be able to debug with breakpoints
Problem is, my Configuration popup only shows Release as option, there is no Debug option and so my breakpoints are always ignored
This is the first time I try to use VS, I always used Eclipse as IDE and I really don't know how to solve this - I tried to search the web but it didn't help
So, how can I run a VS project in debug with my breakpoints?
Thanks in advance
If it can help, here's the project - http://scene.sourceforge.net/download.html
EDIT
If it can helps, when I try to debug in existing configuration a pop up warns me that ( loosely translated from italian, not the exact sentence ) "Debug informations related to project not found. Binary not compilated with debug informations".

A VS project can hold many configurations, not just the default Win32 Debug and Release. It's also possible to delete existing configurations which is probably your case.
You can add the Debug configuration by right clicking on the solution within VS and select Build Configuration. Select new and ask to copy from Release.
Manually change the build options to a debug build which time consuming BTW. You'll need to go over each and every option.

Related

Diagnosing why Visual Studio skips building a project

I have a large solution of dozens of projects. Since yesterday (and for no good reason that I can find) the projects are refusing to build, with Visual Studio's build output window simply stating (eg)
1>------ Skipped Rebuild All: Project: Api.Models.Common ------
There are already a few similar q/a's here about the reasons why VS may decide to skip a build (Configuration not set to build, or set to build wrong target). I'm not interested in guesses as to why this isn't building. I'd really like answers to help me diagnose this, and have Visual Studio tell me why it thinks it can skip the build.
Is there a way to have VS generate anything more detailed than Skipped rebuild for example? It must be calling msbuild under the covers right? So can I have Visual Studio pass additional parameters to msbuild so that it generates diagnostic log output?
(For what it's worth - calling msbuild from the command line builds the projects as expected, so it seems like my issue is something quirky that VS is doing).
I'm using VS 2017 - 15.9.4
If you have any unload projects, you must load it or you remove it in solution.
Note: My unloaded project was the result of a permission issue. VS warned that a project was configured to use IIS. To run the project with IIS required launching VS as an administrator.
This was happening in my solution with Visual Studio 2019. I just migrated my applications from .Net Framework 4.6 to .NET5, almost all the projects were not building, it gets always skipped. The reason was that after the migration the tool upgrade assistant was not setting the Target Framwework as in the preceding image (Right-click on the project and then click on Properties).
After setting it to the right framework, in my case, it was .NET 5.0, the project started to build.

Start Debugging F5 doesn't automatically build

I used to have the environment optimized for c# but recently I have been doing a mostly c++ work. So after a format, I selected c++ instead. Once in a while I still do some c#/xna stuff so I installed xna as well. Problem is that visual studio does not behave anything like I remember it behaving when I had the environment optimized for c#. The run button no longer compiles the solution. Hell, compiling the solution does nearly nothing... I need to recompile for my changes to take effect. What the hell?
I have tried Tools > Import and Export Settings > Reset all settings, reinstalling xna and visual studio and still the F5 does not compile.
edit: Turns out that the projects were set to not compile under the configuration options. I never set this though. I found a forum with several people who had the same issue: http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/8657c07a-da08-4a9f-9558-0c9d93c94ce2/
If you have a number of configurations, it's possible that the currently selected configuration doesn't have the project (you want to auto-build) in it.
For example.
The default configurations are DEBUG and RELEASE and all the projects (in the solution) are ticked against this.
But if you've manually un-ticked a project against one of these configurations OR you've manually added a new project and then un-ticked that project in the configuration .. Visual Studio won't compile those un-ticked projects.
So double check your configuration. (Right Click on the Solution name => Configuration Manager).
I hope this will fix your problem: Start debugging F5 does not build automatically, Visual Studio.
First check what should happen when you run a project. To do this, open Tools > Options, Projects and Solutions, Build and Run, and check that you have selected for the On Run, when projects are out of date option:
Make sure you have selected Always Build...
To change you settings:
Tools -> Import and Export Settings
Choose: Import selected environment settings
Save you settings if you want
You are then presented with a set of default settings to choose from (General, C++, C#)

Always publish website with release code?

Is it possible to change some setting so that Visual Studio always use the "release" configuration when publishing?
I use debug mode when i develop to clear some caches and stuff like that and i also have different web.configs for release and debug. Sometimes when i publish i forget to change the configuration to release and i end up with a broken website ;)
I understand i can do this with MS Build or something but publish working fine except for this. Any tips?
In Solution Explorer, select the project.
On the View menu, click Property Pages.
Click the Build or Debug tab, in a Visual C# or a Visual F# project, the Compile or Debug tab, in a Visual Basic project, or Configuration Properties, in a Visual C++ project.
In the Configuration drop-down list, click Debug or Release."
Steps provided by:
http://msdn.microsoft.com/en-us/library/wx0123s5.aspx
As of at least VS 2017, the web publish settings now include a setting for which configuration to publish, which defaults to Release, so you can publish the release build even when VS is still in Debug configuration.
I just wish that they had also done this for regular Click-Once applications as well...

In Visual Studio change my main project from Console to Window when I switch from Debug to Release

anyone knows how to do this automatically/programmatically? I mean, when I switch my solution from Debug to Release, I want my main project to change from Console to Window automatically.
I thought to use vb script, but I want to know if anyone has a better solution before.
Console/Windowed subsystem is a per-project per-configuration setting. You can change it separately for Debug & Release configurations via project properties dialog - so you can just setup your Debug/Release configurations once (the settings are stored in the project files).

Visual Studio won't make debug DLL

Visual Studio won't make a debug DLL when I select Debug for the configuration.
Instead it makes a release version. The output window show it's making a release version, even with a Debug configuration selected. The release DLL it produces has the current date.
When I save the project in the Debug configuration and reload it, it has magically switched to the Release configuration.
The project has been behaving for months, and this problem just started happening today.
What's going on, and how can I make it produce a debug DLL?
Your project build configuration is probably set to Release for the Debug solution configuration. Open the Configuration Manager (right click on solution, click "Configuration Manager..."). Select "Debug" as the active solution configuration and make sure all projects in the list have "Debug" selected as their configuration.
right click on the solution in the solution explorer, select properties, then click on Configuration, make sure the debug configuration has each sub project set to debug.

Resources