I have a project which uses an ATL component to create pie charts. It's working fine in Visual Studio 2010 but when I migrate it to Visual Studio 2015, its not working or not instantiated. It's crashing at runtime
I have installed VS 2015 with the C++ support on Windows 7.
I have set the platform toolset to v140.
I have installed the VS 2015 x86 redistributable package .
Target platform version 8.1.
Tried adding ATL support in existing MFC project by ATL wizard. This causes crash in ATL (_pModule == 0) and some Dlls also not registered due to this change so I had to revert the changes.
Why do you add ATL again support?
As far as I understand your question this is an existing project and has ATL support! The ASSERT simply tells you that you have two ATL modules.
Related
Visual Studio 19, code (MFC) can be compiled on the machine if Platform Toolset is set to VS 2010 or VS 2017 but not if set to VS 2019 (V142). Which SDK do I need and where do I get it?
Open Visual Studio Installer and make sure if you have installed MFC, ATL and some Windows SDK. Check in the "Individual components". Note that MFC is not installed by default.
In the settings dialog of the project I set the SDK-Version to 'newest' (installed) and this fixed the problem.
I erroneously assumed that the SDK-Version was automatically set to the correct version when I changed the Platform Toolset.
I am using Visual Studio 2015 Community Edition.
In VS2015 installer, selecting Common Tools and MFC Components under the Visual C++ node, I am able to build ATL based projects.
Selecting Tools and Windows SDKs, under Windows 8.1 and Windows Phone Tools node, I am able to build MFC projects based on Platform Toolset v120, that is Visual Studio 2013.
Now I would like to build an existing ATL project, relatively large, originally built in Visual Studio 2013.
When I set Platform Toolset = 'v120' in the ATL project, the compiler is unable to find the ATL headers.
Is it possible to install them?
Do I have to install both VS2013 and VS2015?
You do need to install the earlier version of Visual Studio if you want to use its compiler toolchain. You can also open a developer command prompt to select the compiler version and use msbuild to build the target using that specific compiler but you still need to have installed the compiler version you need.
I retargeted an MFC solution from Visual Studio 2013 to Visual Studio 2015, but when I built it I received an error telling me the compiler could not find afxdisp.h normally found under VC->atlmfc->include . -- Of course I copied the file from the VS 2013 location, but I was wondering why it was missing? Does anyone know?
My mistake, MFC is an addon in VS, and I did not have all of it (only had ATL). I relaunched installer went to custom install and clicked MFC classes. I also installed the Multibyte MFC library from the Visual Studio Website. It is not available in the custom options.
I have a VS2010 library project that I would like to use in a new app in VS2012. Of course when I open VS2012 it wants to update the library project. Is there any way of having two projects - one for VS2010 and one for VS2012?
We have a large product portfolio and not all apps will move to VS2012 at the same time.
Generally, as long as you're running VS2010 SP1, everything will work appropriately opening the project with both versions of VS.
For C++ compatibility specifically:
You can use Visual Studio 2012 to open a C++ project that was created in Visual Studio 2010 SP1. If you want to use the Visual Studio 2012 build environment to build a project that was created in Visual Studio 2010 SP1, you must have both versions of Visual Studio installed on the same computer.
The full list of compatibility information can be found on msdn
I've got a shiny new laptop with the latest Dev tools installed such as Visual Studio 2010.
Now I've got a task to build a C++ CLR app targeting the 2.0 runtime (this is well outside my comfort zone). So I've specifed the v90 Platform Toolset but when I build I get:-
error MSB8010: Specified platform toolset (v90) requires Visual Studio 2008. Please make sure that Visual Studio 2008 is installed on the machine.
Seriously, do I really need to install 2008 as well? Is there some way round this, such as just copying in some folders from a 2008 install?
If not just how much of the VS 2008 installation do I need?
Part of the problem is that VS2010 redid how compiling in c++ (cli or not) works. It now uses the MSBuild structure but I believe what you are trying to do will need the VCBuild framework that is not in 2010.
You may be able to get away with using the Visual Studio 2008 express to build. If not you should only need the c++ portion of VS2008.
Do you need to use the vc90 target though? I build my c++/cli (still new myself) with the vc10 target and it builds fine. (however i am targeting the 4.0 framework referencing some 2.0 portions)
If you set the 'Platform Toolset' in general tab of your project settings to "inherit from parent or project defaults" it will work in most of the cases.
in *.vcxproj
<PropertyGroup Label="Globals"> //Globals
<ProjectGuid>{E0047D4D-366D-4870-980B-DBB5A375BCE2}</ProjectGuid>
<RootNamespace>ECGConvertWrapper</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> //there
</PropertyGroup>