Visual Studio Community 2015 中的 C++ 项目为什么只包含通用应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32345925/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How come C++ project in Visual Studio Community 2015 only contain Universal Apps?
提问by David Lee
First, let me show you what I have..
首先,让我告诉你我有什么..
I tried creating C++ project with Win32 and standard C++11 support but I couldn't find any under "File > New > Project > Installed > Templates > Visual C++ > Windows". (Universal Windows App is the only option here ...)
我尝试使用 Win32 和标准 C++11 支持创建 C++ 项目,但在“文件 > 新建 > 项目 > 已安装 > 模板 > Visual C++ > Windows”下找不到任何内容。(Universal Windows App 是这里唯一的选择......)
I wish that the subpaths under my "File > New > Project > Installed > Templates > Visual C++ > Windows" have all three items that Visual C# and Basic already have underneath ("Universal", "Windows 8", "Classic Desktop"). To be more specific, I wish my "Visual C++ > Windows" to look like this..
我希望我的“文件 > 新建 > 项目 > 已安装 > 模板 > Visual C++ > Windows”下的子路径包含 Visual C# 和 Basic 下的所有三个项目(“通用”、“Windows 8”、“经典桌面”) . 更具体地说,我希望我的“Visual C++ > Windows”看起来像这样..
I know that I can code Win32/C++ using "Universal Windows Apps" template but Win32 support is limited and it comes with bunch of .Net stuff that I don't need. Please don't get me wrong, I do love .Net and WPF and I myself was once a C# programmer (WinForm in particular) and I think of .Net to be the future of Windows development but right now I need to start with empty project with Win32/C++ support.
我知道我可以使用“通用 Windows 应用程序”模板对 Win32/C++ 进行编码,但对 Win32 的支持是有限的,并且它带有一堆我不需要的 .Net 东西。请不要误会我的意思,我确实喜欢 .Net 和 WPF,而且我自己曾经是一名 C# 程序员(尤其是 WinForm),我认为 .Net 是 Windows 开发的未来,但现在我需要从空开始支持 Win32/C++ 的项目。
Is this problem confined to Community version only? (anyone tried VS2015 Pro/Ent ? please let me know)
这个问题是否仅限于社区版?(有人试过 VS2015 Pro/Ent 吗?请告诉我)
EDIT:
Definitely can't be a solution to this problem.. but I found that I can circumvent the problem as below:
编辑:绝对不能解决这个问题..但我发现我可以绕过这个问题,如下所示:
Here's how it works. Instead of searching for templates in "Installed > Visual C++ > Windows", I just go to "Installed > Samples > Visual C++ > Desktop" and Hurray! I see a Win32 "C++ UTF-8 Conversion Helpers" sample. I'll just use it to create projects and then discard anything unnecessary to make it empty. One hell of a pathetic approach just to get an empty C++ project :(
这是它的工作原理。我没有在“已安装 > Visual C++ > Windows”中搜索模板,而是转到“已安装 > 示例 > Visual C++ > 桌面”,万岁!我看到了一个 Win32“C++ UTF-8 转换助手”示例。我只会用它来创建项目,然后丢弃任何不必要的东西以使其为空。只是为了获得一个空的 C++ 项目,这是一种可悲的方法:(
EDIT: I posted the same questionon Microsoft Developer Network. After another day of trials and errors, thisis the furthest I went. Still no sign of "Classic Desktop" under C++
编辑:我在 Microsoft Developer Network 上发布了同样的问题。经过一天的反复试验,这是我走得最远的一次。在 C++ 下仍然没有“经典桌面”的迹象
回答by David Lee
Finally, I found an answer to this problem....
终于,我找到了这个问题的答案......
I was so stupid to keep on launching vs-community using the wrong shortcut.
我太愚蠢了,继续使用错误的快捷方式启动 vs-community。
If you want to see all the C++ templates (including win32,MFC,ATL,...), you must use the shortcut "Visual Studio 2015" not the "Blend for Visual Studio 2015" (screenshot)
如果您想查看所有 C++ 模板(包括 win32、MFC、ATL、...),您必须使用快捷方式“Visual Studio 2015”而不是“Blend for Visual Studio 2015”(截图)
There are two shortcuts after you install Visual Studio Community 2015. As you see, they each point to the different target. So you need to use the shortcut that runs "devenv.exe" not the "Blend.exe".
安装 Visual Studio Community 2015 后有两个快捷方式。如您所见,它们分别指向不同的目标。因此,您需要使用运行“devenv.exe”而不是“Blend.exe”的快捷方式。
But its strange that the first launch after the ISOinstallation launches "devenv.exe" but the web installer(vs_community.exe) launches "Blend.exe".
但奇怪的是,ISO安装后的第一次启动启动了“ devenv.exe”,但网络安装程序(vs_community.exe)启动了“Blend.exe”。
I guess I'm the only one here who made such a stupid mistake. May be I should delete this question if not so many find it useful.
我想我是这里唯一犯了如此愚蠢错误的人。如果没有那么多人觉得它有用,我可能应该删除这个问题。