How to start a process under visual studio debugger? - visual-studio-2012

I use windbg and know that this is supported there. One can provide the executable to run under the debugger and any parameter that needs to be passed to it.
I am wondering whether the same is possible in Visual Studio as well. Am using Visual Studio 2012 and 2013.

You can programatically attach VS to running process:
Attaching Visual Studio debugger from command line
just reference the EndDTE assemblies in the add reference dialog and you should be good to go

Related

Visual studio - gtkmm-app - MSVCP100D.dll is missing

I cannot execute my gtkmm-app any longer in visual studio 2012. It compiles fine but when executing it crasches. I get the error message that MSVCP100D.dll is missing.
I made this app in visualstudio 2010 last spring. OS was windows XP. No problem whatsoever.
Now I have visualstudio 2012 and windows 8.1 and get this error-message.
I dont know what to do? Is there a way to install MSVCP100.dll in the system-folder or could something be done in VS 2012?
I may underline that I just encountetred this problem when compiling and executing my gtkmm-app for the first time since the platform change and IDE-update. Ordinary console-applications no problems whatsoever.
If you also have time/knowledge - what is the purpose of this dll-file?
You are getting this error probably because you changed your compiler.
What you can do is to either recompile gtkmm with current Visual Studio or download pre-compiled binaries and rebuild your application.
Option 2 is to install Visual Studio 2010 back and forget about Visual Studio 2012.
If you want both latest Visual Studio and gtkmm 3 then...
It's not an easy task, and it's hard to answer your question in detail here, so
Here is an tutorial to let you get started compiling/installing gtkmm 3 in Visual Studio 2013 for Windows 7 and later:

Visual Studio Debugger Will Not Work

I am trying to debug an application i made a while ago. When i click the start button, nothing happens but the classic windows error sound and then it stops debugging.
I then tried to debug a brand new project, same result.
This is a fresh install of windows and visual studio.
Hitting Ctrl + F5 works so i am pretty sure it is a problem with the
debugger.
I am running visual studio in Administrator Mode
I have tried this in VS2012 and VS2013, both have the same result. But on VS2013 there was an error which may or may not be related.
...has exited with code -1073741819 (0xc0000005) Access Violation
Please let me know of anything i can try to give you more information.
Update:
If i debug for x64, it works. But it does not work for x86 or "any cpu"
I would suggest that you first try to clean and rebuild your project, if it doesn't help, it may be a problem with your Visual Studio installation.
You need to repair your Visual Studio. You can do so in Control Panel -> Programs and Features, look for your version of Visual Studio and click on Change. Follow the on-screen instruction to Repair your Visual Studio installation.

If I run Visual Studio by appending /safemode no addons are loaded, visual studio is quick. So how do I get myself back there without an OS Reinstall?

I have a quite a few addins installed on my Visual Studio 2012 and I am unhappy at the speed of the application now. I also have some other strange issues that I think are caused by 1 addin but I do not know which one.
I know Visual Studio has the add-in manager but that is not showing all addins that are loaded and running!
For example I have removed all check boxes but I am still getting addons loaded like Dev Express.
Is there any tools that let me see and remove addons - maybe a 3rd party tool someone has written?
If I run Visual Studio by appending /safemode no addons are loaded, visual studio is quick. So how do I get myself back there without an OS Reinstall?
How do I reset visual studio to the default state with no addons installed?
Or is there a known list of locations I can look at for installed addons?

How to use MSBuild to target v110 platform toolset?

I am developing a command line application that creates a full Visual Studio 11 solution made of a single VC++ project and that tries to compile it in the end using MSBuild.
The problem I am facing is strange.
If I execute my command line program inside Visual Studio 11 it works; if I instead launch it outside the development environment it throws me the error:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(511,5): error MSB8008: Specified platform toolset (v110) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected. [f:\ABC.vcxproj]
The command I am using is the following:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe f:\snake\W9A30040.vcxproj /property:PlatformToolset=v110;Configuration=Debug /v:quiet
But I have the feeling that PlatformToolset=v110 is ignored and MSBuild use v100 (Visual Studio 2010).
Do you have any suggestions how to tell MSBuild to compile for v110 Platform Toolset?
I ran into the same problem as well with the full release of VS 2012. You can also set the VisualStudioVersion as a property with MSBuild as opposed to dealing with environment variables as mentioned in the accepted answer. For instance:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe .\myproject.vcxproj /p:VisualStudioVersion=11.0
The environment variables approach I'm sure work just as well, I honestly didn't try that as I was trying to stay away from having to modify the environment variables.
Make sure that the top of your .SLN file looks like this:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
When you double-click on the solution file, it's the # Visual Studio 2012 that controls which version of Visual Studio is loaded (and controls the icon displayed in Windows Explorer).
However, when you run MSBuild, it looks at the Format Version 12.00 part.
Confused?
This is confusing, since Visual Studio 2010 is version 10.0 and Visual Studio 2012 is version 11.0 (not 12.0), and using the version 12.0 solution file format causes MSBuild to (implicitly) set VisualStudioVersion to 11.0.
I found a workaround for this issue; could be a problem of Visual Studio 11 Beta that will be resolved before official release.
Anyway, if you are interestedm just set the environment variable "VisualStudioVersion" equal to "11.0" before calling MSBuild.exe.
In batch files
set VisualStudioVersion=11.0
or in VB.NET
Environment.SetEnvironmentVariable("VisualStudioVersion", "11.0")
Starting with Visual Studio 2013, MSBuild is now part of Visual Studio, and the correct path should be $(MSBuildToolsPath) (“C:\Program Files (x86)\MSBuild\12.0\Bin”). If you use msbuild.exe from the .Net framework folder (“C:\Windows\Microsoft.NET\Framework64\v4.0.30319”) it will not able to distinguish the vs2012 and vs2013 versions.
Use the menu based options to do this. From VC++2010 Express:
- Right click on the main file of the project (not the solution itself at the very top of the tree).
- Click General.
- Find Platform Toolset on the right side of the dialog, top half.
- Change from v110 to v100.
- Click OK.
----- Done ------
Microsoft provides a batch file to set all the EnvVars
You find it in the Start Menu under "Microsoft Visual Studio 2012/Visual Studio Tools" or in the Visual Studio folder ("C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat")

Where is the run button in a default installation of Visual C++ 2010?

I have download Visual C++ 2010 and everything is fine but I have a small problem. It does not have the method start without debugging. Why? and how can i run project?
You are probably using the Express Edition of Visual C++ 2010. Some functions have been hidden by default in these editions. I believe the Microsoft's intention behind this is to not confuse novice users as much.
Either use the keyboard shortcut (Ctrl+F5) or switch Visual C++ 2010 Express into Expert Mode. The Expert Mode setting can be found in the menu "Tools" under "Settings":
Screenshot of the Expert Settings option in Visual Studio Express http://www.nuclex.org/images/stories/blog/gamedev/visualstudio/visual-studio-2010-expert-settings.png
Unless it's changed it should be to just press Ctrl-F5 to run it without the debugger.

Resources