Cannot use WinDbg and SOS in Visual Studio Immediate window - visual-studio-2012

I'm following this tutorial: link. At step 8, when I say .load sos in the Immediate Window, it just pukes expected expression.
System: Win 7 x64, Visual Studio 2012 Premium.
I have an installed Debugging Tools for Windows (x64) 11/14/2012, Now I installed X64 Debuggers And Tools. I have Windows SDK for Windows 7 (7.1). WinDbg.exe is in c:\Program Files\Debugging Tools for Windows (x64)\ and I can start it from start menu. However I cannot find sos.dll, which supposed to come with the Debugging Tools for Windows (x64).
How can I make this happen?
Bonus question: {,,kernel32}_LoadLibraryExW#12 in Step 4 doesn't work, I use {,,kernel32}LoadLibraryExW, but then I cannot figure out where is the loaded dll name. I was poking around with the registers.

NTSD command support (MSDN) and Immediate Window Commands describe which WinDbg commands (or similar to WinDbg) are supported by Visual Studio 2005, 2008 and 2010. It's only a small subset:
.S
.X
.K
.U
.~
.Reload
.Sympath
.Cxr
.Exr
.Load
.Unload
.Unloadall
Most important is probably the .Load which allows loading extensions and then using ! commands of the extension.
It seems that support for WinDbg commands was dropped with VS 2012, since you cannot call the web page for VS versions higher than VS 2010.

Related

Pip error even Microsoft Visual C++ 14.0 is installed

I read all of the questions and answers which are related or asked before and I still didn't find an appropriate answer to my problem.
I am using python 3.6.5 and pip(and setuptools) is up to date.
I am installed Microsoft Visual C++ Redistributable for Visual Studio 2017 from here:
https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017
when using pip install, I still get the error:
Microsoft Visual C++ is required
PS: I want to install airflow
This problem was solved on a computer having Visual Studio Community 2017 v15.5.2 and the Visual Studio Installer v1.16.1247.518 installed.
The steps used are as follows:
Start the Visual Studio Installer
Visual Studio Installer showed a Installed section that stated that Visual
Studio Community 2017. In that section was a drop-down titled More. The drop-
down option Modify was selected.
Visual Studio Installer then showed "tabs" titled Workloads, Individual
components, Language packs and Installed locations. The tab "Individual components" was selected.
Scrolling down the list of Individual components, there was a section titled
Compilers, build tools, and runtimes. Under that section there was a VC++
2015.3 v140 toolset for desktop (x86,x64) option that was unchecked. The
option was then checked.
The Modify button located at the lower right part of the Visual Studio
Installer was pushed.
After waiting an unreasonably long amount of time, the installer finished
modifying the installation of Visual Studio Community 2017.
As always, your mileage may differ.
As per instructions here: https://www.scivision.co/python-windows-visual-c++-14-required/
Use vs_buildtools.exe and install only the windows 10 SDK.
Visual C++ Redistributable installs run-time libraries and can be used to run applications written with VC. But you need Visual C++ compiler! So install Build Tools.
I suggest using MinGW as the C compiler.

Targetting Windows xp from visual studio 2015 enterprise update 1

I would like to know whether we can build the projects/binaries using visual studio 2015 which can run on Windows xp ? If its supported then how we can build ?
Configuring C++ 11 Programs for Windows XP
The Windows XP platform toolset that's included in Visual Studio is a version of the Windows 7 SDK that was included in Visual Studio 2010, but it uses the current C++ compiler. It also configures project properties to appropriate default values—for example, the specification of a compatible linker for down-level targeting. Only Windows desktop apps that are created by using the Windows XP platform toolset run on Windows XP and Windows Server 2003, but those apps can also run on more recent operating systems—for example, Windows Vista, Windows 7, Windows Server 2008, Windows 8, or Windows Server 2012.
To target Windows XP
In Solution Explorer, open the shortcut menu for your project, and then choose Properties.
In the Property Pages dialog box for the project, under Configuration Properties, General, set the Platform Toolset property to the desired Windows XP toolset. For example, choose Visual Studio 2012 – Windows XP (v110_xp) to create code that is binary compatible with the Microsoft Visual C++ 2012 Redistributable libraries.
As mentioned by dxiv Windows XP can be targeted from visual studio using the correct Platform toolset (Visual Studio 2015 - Windows XP (v140_xp)).
This is not in all cases sufficient. Because the vs compiler was extended by propper thread local storage (TLS) handling there is an additional change needed. The new TLS is not properly supported by Windows XP and therefore static objects in dll's will not be initialized. If you want to avoid this problem us the additional compiler flag /Zc:threadSafeInit- to disable this problematic feature.
If you would like to use boost, you have to build it yourself. To make it compatible with Windows XP the following options have to be added :
1) run these commands before the build with b2 (bjam)
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
SET "INCLUDE=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Include;%INCLUDE%"
SET "PATH=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Bin;%PATH%"
SET "LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Lib;%LIB%"
2) use these additional options for b2
toolset=msvc-14.0
address-model=32
define=BOOST_USE_WINAPI_VERSION=0x0501
define=_USING_V110_SDK71_
linkflags=/SUBSYSTEM:CONSOLE,5.01
cxxflags="/Zc:threadSafeInit- "
Note:
the define is _USING_V110_SDK71_ not _USING_V140_SDK71_.
the space in cxxflags="/Zc:threadSafeInit- " is intentional du to a bug in b2 which would remove the trailing "-"

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:

Debugging Surface RT 8.1 from Visual Studio 2012

It seems only the VS 2013 Remote tools for ARM works on Windows 8.1.
Does this mean that Visual Studio 2012 is obsolete now for WinRT development?
Update on 25 Nov 2013:
Just saw Moche's answer and was about to post the update. Yes VSE2012 on Win8.0 can now remote debug on Surface2 / Win8.1 using VS2012 Update 4 which was released over the weekend.
Also it is required to download the Remote Tools for Arm that are part of the Update 4:
http://www.microsoft.com/en-au/download/details.aspx?id=39305
Click the 'details drill down' to get the 'Remote Tools' Download
To get remote debugging running, you need to right-click on the project file in Solution Explorer and select debugging under the Configuration tab - then you will notice a field with 'machine name'... complete the machine name of the Surface 2 and select Authentication 'Yes' - Ensure both the Visual Studio Computer and Surface 2 are on the Same Workgroup in Control Panel, System, Advanced System Settings, Computer Name Tab. These brief instruction assume you will be using Windows Private lan authentication. If you want to use your live account for authentication simply google how to Remote Debug Visual Studio 2012 with Windows Live Authentication..
When you run the remote tools installation for the first time on the Surface 2 tablet, you will be prompted by a wizard which sets up the necessary exceptions for the Windows firewall on the tablet.
Actually I succeeded to do the debugging on 8.1 using VS2012. I've installed the latest update 4 of the Debugging Tools. Then I went in Windows Explorer to Program Files->MS Visual Studio 11->Common 7->IDE->Remote Debugger>arm and ran msvsmon from there. That's it - I was able to connect to it from my Windows 8 machine running VS 2012.
Yes, it's indeed obsolete.
For windows 8.1 RT development, set up a separate 8.1 machine with VS 2013.
Update
As of Visual Studio 2012 Update 4, remote debugging to 8.1 seems to be available.
The Answer above that 'Its obsolete' pertaining to VS 2012 and debugging on Win 8.1 is (entirely) not correct - the correct phrase would be that Debugging on Win 8.1 client from a Visual Studio 2012 machine is not supported at time of Win 8.1 preview - Hopefully VS 2012 update will soon allow it to connect to Visual Studio 2013 remote debugger tools to allow Windows 8 development to continue between Windows 8 and Windows 8.1..
As Per:
http://weblogs.asp.net/lduveau/archive/2013/07/10/visual-studio-2012-2013-and-windows-8-1-apps-clarifications.aspx
Quoting:
Visual Studio 2012 (running on either Windows 8 or Windows 8.1) continues to support creating and working with Windows Store apps for Windows 8. It does not support creating or working with Windows Store apps for Windows 8.1. Apps targeting Windows 8 continue to work on Windows 8.1, they just can’t take advantage of all of the new Windows 8.1 functionality and performance improvements.
When I read the Answer above I got my knickers in a real twist and then I thankfully found this (and now have hope my shiny Surface 2 isn't a desk weight for developing) -->
quoting off:
http://social.msdn.microsoft.com/Forums/en-US/3e5bd281-4dde-418b-a9fe-078815523fe1/win-81-surface-remote-debugger
For debugging applications on Windows 8.1 Preview RT devices you need to use VS2013 Professional, Premium, or Ultimate Preview with the Remote Tools for VS2013 Preview.
We are aware that VS2012 is not compatible with Windows 8.1 Preview, and we are working to address this with the next update to VS2012.
Thanks,
Dave Lubash
Visual Studio Team
#Carl L - After further digging.. It seems both our answers are sort of right.. To support Win 8.1 currently, you need Win 8.1 and Visual Studio 2013 installed - I tried Installing Visual Studio 2013 Express on my Windows 8 PC and NO DICE..
I guess the only clarification I am adding is that developers can continue using Windows 8 with Visual Studio 2012 to create apps that run on Windows 8 (only) and will also be available in the Apps Store and run compatibly on Windows 8.1 (but not use all the latest 8.1 optimized features). I am only taking this based on MS forum posts.. The information from Microsoft doesn't properly address this point in its documentation at:
http://www.microsoft.com/visualstudio/eng/products/compatibility-2013
Its also worth pointing out that Visual Studio 2013 Express (free version) is not able to produce Windows 8 Apps - ONLY Windows 8.1 apps (so that part of your answer is correct currently). So in a sense it is unsafe to say Visual Studio 2012 is obsolete as it is currently required to support creation of Windows 8.0 apps.. Unless you don't mind ditching App updates for your existing user-base who may not have yet made the jump to 8.1 (not a sound development model and I am very surprised MS is making fragmentation on its own new platforms for developers currently).
At the moment I am a bit miffed that I am forced to upgrade to Windows 8.1 and VS 2013 in order to debug on my Surface 2 (RT) tablet and in that case would not be able to debug Windows 8.0 apps on my Surface 2 (RT) using VS 2012 until MS hopefully updates VS 2012 and/or the VS 2012 remote debugger tools.
Hope that clarifies a bit - seems you were mostly right which is a real shame if Microsoft is serious about attracting developers to its newest OS and having its free development tools rival that of Android OS and iOS..

how can I remove Visual Studio 2012 Remote Debugging tools from Surface RT 8.1

It appears that it's no longer possible to debug using VS2012 tools on a Surface RT running 8.1 (see Debugging Surface RT 8.1 from Visual Studio 2012).
So, how can I uninstall it, because it still has icons on the start menu, and items under program files. The digital signature is no longer recognized, so it's not possible to uninstall via the control panel.
Just remove the program files folder of Visual Studio 11.
Then go to your registry keys in HKLM => Software => Microsoft and remove the Remote Debugger entry.
Now you can do a fresh install of the VS2013 remote debugger tools and next time you'll restart the old icon seems to be removed from the all apps screen.
Good luck :)
Yeah good luck with that, we will all need it... As is mentioned in a few places on the web, Win 8.1 and Visual Studio 2013 can develop apps ONLY for Windows 8.1, while Windows 8.0 and Visual Studio 2012 can develop apps ONLY for Windows 8.0... You can install both side-by-side on the same machine (VS 2012 and VS 2013) though.
But what really gets me is that my new surface 2 is now a paperweight because I can no longer debug on it as I don't wish to abandon Windows 8.0 development ATM. I hope Microsoft addresses this as it could become a serious fragmentation issue and keep developers away in droves.

Resources