Why can't I find the DirectX template? - c++

I'm currently using Visual Studio 2013 Express for Windows desktop, but I can't really find the DirectX template, FILE -> New project -> Visual C++ , but there's neither a DirectX template nor a Windows app folder-sector. I've searched this in Google but no one seem to have posted about it. Where is the template?

The "DirectX" templates provided by Visual Studio are for Windows Store, Windows phone, or Universal apps. They are only provided in the VS 2013 Express for Windows, VS 2013 Pro+, or VS 2013 Community edition.
There are only two built-in Visual C++ Win32 desktop templates in Visual Studio:
Win32 Console Application
Win32 project
As others have noted, if you want to build for Windows Store, Windows phone, or Universal apps you need (a) Windows 8.1 and (b) some other edition of VS 2013.
If you are writing a Win32 desktop application and/or have Windows 7, consider downloading and installing this template: Direct3D Win32 Game Visual Studio template
Also, I highly recommend using VS 2013 Community rather than VS 2013 Express for Windows Desktop if you fit the quite generous license requirements--if not, buy VS 2013 Pro.

You need to download the correct version of Visual Studio. The desktop version doesn't have DirectX for Windows store apps. You need to download Visual Studio 2013 Express For Windows, scroll down to Express 2013 for Windows or direct link

Related

DirectX project template not visible in Visual Studio 2017

I want to create DirectX project but template is not visible in any card in New project window on Visual Studio 2017 (community edition) (not only Windows Desktop like on screenshot).
I would expect something like that:
I have installed Game development with C++ (C++ profiling tools and Windows 10 STD) and Desktop development with C++.
I've already reinstalled packages and Visual Studio using Visual Studio Installer with no effect so any tips would be appreciated
Those Direct3D Game templates are from this GitHub. You get them by installing this VSIX.
See this blog post and the DirectX Tool Kit tutorials.

ATL is not working when migrating to Visual Studio 2015

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.

Can I use Visual Studio 2015 for creating Windows Phone 8 applications?

I have Visual Studio 2015 Community edition installed with Windows Desktop development tools (languag - C++). Can I use it for creating Windows Phone 8 application with C++ language (especially with C++11/14 standard)? Which SDK\tools I have to install for this task or may be all required instruments are in Visual Studio 2015 Community package alredy?
Thank you for help.
P.S.: The "Visual Studio 2015 Platform Targeting and Compatibility" article, in the section "Visual Studio 2015 Support for Windows Universal, Windows Store, and Windows Phone App Development", says that Windows Phone 8 apps are supported by the Visual Studio 2015 but with footnotes "Supports migration of Windows Phone 8 projects to Windows Phone Silverlight 8.1.". So, I can't understand, does Visual Studio 2015 support the whole development cycle for Windows Phone 8 app or only migration to the Windows Phone 8.1?
UPDATE: I mean the Windows Runtime applications for Windows Phone 8 platform.
sure, you need to download windows phone 8/8.1 sdk from microsoft website
https://www.microsoft.com/en-in/download/details.aspx?id=35471 or from somewhere which provide standalone installer for this.
after this, just open up visual studio go to c++ the expand windows > windows phone

How to install Visual Studio Build Tools 2010 on Visual Studio 2015 Community?

I have a project created on Visual Studio 2010. When I try to run the project on Visual Studio 2015 Community edition I get the error below,
Severity Code Description Project File Line
Error MSB8020 The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". graphics C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets 55
And when I tried to build it with Visual Studio 2015 Build Tools I encountered about 1500+ errors.
Is there any way to make the project work?
If you can't install VS2010, Windows SDK for Windows 7 contains needed compiler tools (v100), you may actually skip installing the SDK itself and install only the compiler tools, headers and libs. Please note, that the compiler included in Windows SDK is the same that VS2010 has, but VS2010 SP1 has a bit newer compiler. If you need that, you'll also need to install Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1. But be aware, that if you install these, you may have issues later if you decide to install VS2010, there are bugs in installer that requires you to install components in strict order. Also, if your code uses MFC or ATL you must install VS2010, installing Windows SDK will not be enough.
You either install VS 2010 and build your project, or better yet you upgrade your projects. The VS 2015 custom install options will let you install the v120 Platform Toolset, but not the v110 or v100 Platform Toolsets.
One major change in VS 2015 is that the C++ tools (i.e. v140) are not installed by the Typical installation option. See the Visual C++ Team Blog.
Keep in mind that Visual C++ 2010 used the C++0x Draft Standard, and Visual C++ 2015 meets the C++11 Standard with the exception of Expression SFINAE (which is partly there in Update 1), so quite a bit has changed in the intervening years including some breaking changes. Since you are jumping three major releases at once--and about 10 minor updates--, it can be a bit overwhelming especially working through all the new warnings.
Another thing to keep in mind is that Visual C++ 2010 used the Windows 7.1 SDK, while Visual C++ 2012 or later use the Windows 8.x SDK. There's been a lot of change there too particularly for DirectX development. It's particularly important for Windows desktop apps that you set the _WIN32_WINNT preprocessor define for your target platform as the Windows 8.x SDK does not default to the 'oldest supported platform' like earlier Windows SDKs did. See Using the Windows Headers
VS 2010 and the v100 toolset supports targeting Windows XP and Windows Server 2003. The v140 toolset does not support targeting Windows XP / Server 2003. You have to use v140_xp Platform Toolset instead. See this post for some notes as this means you are again using the Windows 7.1 SDK rather than the Windows 8.x SDK with the _xp toolsets.
See Breaking Changes in Visual C++ 2012, Breaking Changes in Visual C++ 2013, and Breaking Changes in Visual C++ 2015.
See also Support For C++11/14/17 Features (Modern C++), and Where is the DirectX SDK?.
If you need to build the code both with VS 2010 and with VS 2015, then you should create two projects/solution files, one for each. You may also want to read this article for some notes on writing code that can build with multiple Visual C++ toolsets, which again is particularly challenging due to the Windows SDK changes.
VS 2015 supports targeting Windows Vista SP2, Windows 7 SP1, Windows 8.0, Windows 8.1, Windows 10, and optionally Windows XP SP3. It does not support targeting Windows Vista RTM, Windows Vista SP1, or Windows 7 RTM.

Visual Studio 2012 for windows 8 not showing win32 console application option

I downloaded Microsoft visual studio 2012 for windows 8 to run C++ programs but when I go to New Project -> Templates -> Visual C++ it doesn't show option for win32 console application instead its showing App XAML files .What can be the solution to this problem ?
You have probably downloaded the version which allows only the development of Windows 8 apps.If you are not interested in doing so you should download the Express for Desktop version.