Bug in VC++ 2015 IDE when debugging? - c++

I am just observing an apparent error when debugging a C++ code in Visual Studio 2015 IDE. Is it a known problem?
When making steps (F10), the yellow arrow on the left that should point to the current place that is to be executed in the next step seems to be misplaced few lines upper. See the image
Notice the red value in the Locals panel that shows that the sqlStatement variable just changed. That means that the yellow arrow should actually be placed at the ret = SqlExecDirect(.... When following the debug steps in the source code carefully, I can see that indeed the current point is a bit farther than where the yellow arrow points.
The information about the VS--captured from the About dialog--follows:
Microsoft Visual Studio Professional 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055
Installed Version: Professional
Visual Basic 2015 00322-40000-00000-AA650
Microsoft Visual Basic 2015
Visual C# 2015 00322-40000-00000-AA650
Microsoft Visual C# 2015
Visual C++ 2015 00322-40000-00000-AA650
Microsoft Visual C++ 2015
Application Insights Tools for Visual Studio Package 1.0
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11106.0
ASP.NET and Web Tools 2015.1 (Beta8)
ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.2.30624.0
For additional information, visit http://www.asp.net/
Common Azure Tools 1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
DevExpress.DeploymentTool 1.0
A useful tool for deploying DevExpress assemblies.
KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info
Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
NuGet Package Manager 3.3.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Office Developer Tools for Visual Studio 2015 ENU 14.0.23025
Microsoft Office Developer Tools for Visual Studio 2015 ENU
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
Python Tools for Visual Studio 2.2.31105.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.
Python Tools for Visual Studio - Django Integration 2.2.31105.00
Provides templates and integration for the Django web framework.
Python Tools for Visual Studio - Profiling Support 2.2.31105.00
Profiling support for Python projects.
SQL Server Data Tools 14.0.50717.0
Microsoft SQL Server Data Tools
TypeScript 1.7.4.0
TypeScript for Microsoft Visual Studio
Visual C++ for Cross Platform Mobile Development 1.0
Visual C++ for Cross Platform Mobile Development
Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
XtraReports package 1.0
XtraReports package

I dare to answer my own question as it is unlikely that someone would found it without having the exact sources and the situation.
I use also Git as the VCS (installed from the official http://git-scm.com/). I also have set the Git core.autocrlf=false. It could be the case that I have touched the sources with another editor (Notepad++) or something...
When closing the solution, closing the Visual Studio, starting Visual Studio again, and opening the project, the Visual Studio warned about mixing line endings (CR LF). When the suggested fix was confirmed, the problem disappeared.
It makes sense if the code that sets the yellow arrow counts the lines differently than the rest of the editor (the editor window is more forgiving when the line endings are mixed).
As Visual Studio has its own Git support, the things could be confused during the cooperation of various software layers.

Related

The module "%VSINSTALLDIR%\DIA SDK\bin\msdia140.dll" failed to load, while trying to install llvm on windows 10

I am trying to get started with compiler development using llvm, I follow official setup page on the 10th step and am getting the following error
The module "%VSINSTALLDIR%\DIA SDK\bin\msdia140.dll" failed to load make sure the binary is stored at specified path or debug it to check for problems with binary or dependent .DLL files. The specified module could not be found.
Visual Studio 2022 information :
Microsoft Visual Studio Community 2022
Version 17.1.6
VisualStudio.17.Release/17.1.6+32421.90
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Community
Visual C++ 2022 00482-90000-00000-AA606
Microsoft Visual C++ 2022
ASP.NET and Web Tools 2019 17.1.363.30963
ASP.NET and Web Tools 2019
Azure App Service Tools v3.0.0 17.1.363.30963
Azure App Service Tools v3.0.0
C# Tools 4.1.0-5.22165.10+e555772db77ca828b02b4bd547c318387f11d01f
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
NuGet Package Manager 6.1.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
TypeScript Tools 17.0.1229.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 4.1.0-5.22165.10+e555772db77ca828b02b4bd547c318387f11d01f
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.
Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake
I am trying to get llvm up and running, The .dll files are available at the given location, please help.
$ ls
amd64/ arm/ arm64/ msdia140.dll*
I had the same problem as you at first, please read my solution carefully:
You need to use the cd command to enter the folder where you want to install LLVM. Regarding the cd command, I suggest you search for usage methods on Google, I believe it will be easier to understand than what I described.
The documentation mentions that You may install the llvm sources in
other location than c:\llvm but do not install into a path containing
spaces (e.g. c:\Documents and Settings...) as it will fail.
Run the Developer Command Prompt for VS 2019 as an administrator.
Enter regsvr32 "%VSINSTALLDIR%\DIA SDK\bin\msdia140.dll" to get the following result.
Please look carefully at Figure 1.

X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" [duplicate]

My Flutter Doctor is saying:
Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all
of its default components.
How can I fix this problem?
It's basically saying that if you want to develop your Flutter application for Windows you will need to install Visual Studio 2022 and while installing Visual Studio 2022 you will need to download this: Desktop development with C++
Also, you have to install the third link in this: Visual-studio
You could also get desktop development with the C++ tool after installing Visual Studio and then navigating to tool → Get tools and features → Desktop development with C++.
The error means install Visual Studio, and this is different from Visual Studio Code. It's an IDE from Microsoft.
For those who may be using a weak computer and can't afford to install the full Visual Studio, you only need to install a few components from Visual Studio to get Flutter to run on your computer without errors. These components are:
MSVC v142 - Visual Studio 2022 C++ x64/86 build tools.
Windows 10 SDK (for Windows 10 users)
C++ CMake tools for Windows.
In total, they should occupy around 8 GB or so.
As it states, you need to download Visual Studio (which is different from Visual Studio Code).
When installing it, remember to select the required package Desktop development with C++:
This will not prevent you from developing Mobile apps, but it's a requirement only for Windows Development.
Is unnecessary to install the "Desktop development with C++" if you don't want to develop desktop applications for Windows using Flutter.
If you only want to develop mobile apps using Flutter, you can run
flutter config --no-enable-windows-desktop
to disable the desktop support for your Flutter projects. After that, when you run the flutter doctor command again, you will no longer see the warning.
Read more at: https://fig.io/manual/flutter/config
Only two steps are required.
Install Visual Studio 2022 (Link: https://visualstudio.microsoft.com/downloads/)
Install Visual Studio Code (Link: https://code.visualstudio.com/)
Your code will run smoothly.
My solution was a bit simpler. Uninstall everything all build system's from VS. Then reinstall Visual Studio Community 2022, restart then try again. Might get a warning about nuget but it should fix the issue.
With the newest android installer "android-studio-2022.1.1.19-windows" there would be a jbr and jre folder existing, hence creating a link from jre to jbr would not work.
What you can do is copy the contents of the items in jbr into the jre folder and this would resolve the error.
Make sure to install Visual Studio Code.
Open the Visual Studio download page:

Enterprise library 6.0 configuration editor for Visual studio 2017

For our new project(Using Visual Studio 2017 and .net Framework 4.6), a decision has been taken to use Enterprise Library 6.0 for Logging, Exception Handling and DB access. I have a lot of resources/materials available on Internet on how to use it. My questions are,
I couldn't find any Enterprise Library configuration console available for visual studio 2017. Is there any standalone editor available for EL6.0?
if it's available where to download it?
If there is no extension(for vs2017)/standalone editor available, then how can I configure it manually? Any documentation available to state the properties to be set clearly?
Will EL6.0 supports .net framework 4.6 and work flawlessly?
Please help me to find it out and decide.

Xamarin.Forms Cross-Platform templates missing on Visual Studio 2015 Professional

I have fresh install of Visual Studio 2015 Professional and after click on File - New Project - Templates - Visual C# - Cross Platform I don't get any usual templates like Blank app or Cross Platform App (Xamarin.Forms or Native). I had installed all available items during Visual Studio installation and would like to target iPhone, Android and WF platform in a same project.
How to install missing templates?
All features including Xamarin were selected during initial install of Visual Studio.
I solved the issue by performing a thorough Xamarin uninstall, then I installed it again through Visual Studio installer. Details and the exact 12 steps which helped me are described here:
https://developer.xamarin.com/guides/cross-platform/windows/visual-studio/troubleshooting/uninstall-xamarinvs/
After this I got all templates needed (iPhone, Android & Windows Phone). However, after recent update of Xamarin tools I noticed that Windows Phone project isn't added to the solution any more but replaced with Universal Windows Platform.

Edit & continue not working in VS2015 Update 3 (x64)

After a bit of nightmare getting Vs2015 update 3 installed, as per this related question, I rebuilt my MFC C++ project to see how the update performed only to find Edit and Continue is no longer working! Specifically, making any change to any file and using Debug / Apply Code changes i get the following;
myfile.CPP ......\common\myfile.CPP(1): fatal error C1010: unexpected end of file while looking for precompiled header. Did you
forget to add '#include "\cpp\common\stdafx.h"' to your source?
Project : error (null) : Build errors occurred.
The first include in the source file is
#include "\cpp\common\StdAfx.h"
This worked most of the time under update 2, but edit and continue was failing and reporting that it had succeeded reasonably regularly. Only reason I installed this update as it was supposed to fix this issue but now it is broken entirely and I'm looking at a full uninstall, and re-install of VS2015 update 2 over the weekend.
Anyone else hitting this problem and have a solution? Could possibly be a dodgy installation as even on the full ISO install, the installer failed with missing files and I had to skip two sections. Given this is a release and not a release candidate, the QA seems abysmal, I fail to see why a release version would include any beta functionality. VS2015 detail below;
Microsoft Visual Studio Professional 2015 Version 14.0.25421.03 Update
3 Microsoft .NET Framework Version 4.6.01055
Installed Version: Professional
LightSwitch for Visual Studio 2015 00325-60000-80195-AA437 Microsoft
LightSwitch for Visual Studio 2015
Visual Basic 2015 00325-60000-80195-AA437 Microsoft Visual Basic
2015
Visual C# 2015 00325-60000-80195-AA437 Microsoft Visual C# 2015
Visual C++ 2015 00325-60000-80195-AA437 Microsoft Visual C++ 2015
Application Insights Tools for Visual Studio Package 7.0.20622.1
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11106.0 ASP.NET and Web
Tools 2015.1 (Beta8)
ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0 For additional
information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.2.40314.0 For additional
information, visit http://www.asp.net/
Common Azure Tools 1.8 Provides common services for use by Azure
Mobile Services and Microsoft Azure Tools.
InstallShield Limited Edition InstallShield. For more information
visit the Flexera Software website at
http://www.FlexeraSoftware.com. Copyright © 2015 Flexera Software
LLC. All Rights Reserved.
JavaScript Language Service 2.0 JavaScript Language Service
JavaScript Project System 2.0 JavaScript Project System
Microsoft Azure Mobile Services Tools 1.4 Microsoft Azure Mobile
Services Tools
PreEmptive Analytics Visualizer 1.2 Microsoft Visual Studio
extension to visualize aggregated summaries from the PreEmptive
Analytics product.
SQL Server Data Tools 14.0.60519.0 Microsoft SQL Server Data Tools
TypeScript 1.8.34.0 TypeScript tools for Visual Studio
Visual Assist For more information about Visual Assist, see the
Whole Tomato Software website at http://www.WholeTomato.com. Copyright
(c) 1997-2016 Whole Tomato Software, Inc.
Visual Commander 2.3 For more information about Visual Commander,
see the website at https://vlasovstudio.com/visual-commander/.
Copyright (c) 2013-2015 Vlasov Studio.
Visual Studio Tools for Universal Windows Apps 14.0.25420.01 The
Visual Studio Tools for Universal Windows apps allow you to build a
single universal app experience that can reach every device running
Windows 10: phone, tablet, PC, and more. It includes the Microsoft
Windows 10 Software Development Kit.
(Apologies for the ranty nature of this question, but I also put it up as a caveat for those thinking of installing this update)
Following on from the same discussion on MSDN here a breaking change in update 3 is as follows
Allow Precompiling (Native only): The debug option Debug > Options >
General > Allow Precompiling (Native only) is no longer supported with
Visual Studio 2015 Update 3 and the default debugger. This is a legacy
setting for a marginal performance improvement that has no functional
impact.
Disabling the above and doing a rebuild all fixes edit and continue.