简体   繁体   English

Visual Studio Express 2015中的C ++新文件问题

[英]C++ New File Issue in Visual Studio Express 2015

I have a peculiar issue in Visual Studio Express 2015. I am trying to create a new empty Win32 Console Application project in Visual C++. 我在Visual Studio Express 2015中有一个特殊的问题。我正在尝试在Visual C ++中创建一个新的空Win32控制台应用程序项目。 I can create a new project, clear the check boxes for precompiled headers and SDL checks as well as check the box for "Empty Project". 我可以创建一个新项目,清除预编译标题和SDL检查的复选框,并选中“清空项目”框。 The project is created, but when I go to add a new item to my source files, I have nothing to choose from under "Installed". 项目已创建,但当我向源文件添加新项目时,我在“已安装”下无法选择。 Under previous versions, I could choose a new blank C++ (.cpp) file or a Header (.h) file. 在以前的版本中,我可以选择一个新的空白C ++(。cpp)文件或一个Header(.h)文件。 I can create new .vb files under Visual Basic and new .cs files under C#, but the "Add" button is grayed out when I try to create a new C++ file. 我可以在Visual Basic下创建新的.vb文件,在C#下创建新的.cs文件,但是当我尝试创建新的C ++文件时,“添加”按钮显示为灰色。 Anybody got any ideas? 有人有任何想法吗? I've installed this on three different computers with the same results (Windows 7 OS on all 3). 我在三台不同的计算机上安装了相同的结果(所有3台Windows 7操作系统)。 I've attached a screenshot of the Add new item dialog. 我附上了添加新项目对话框的屏幕截图。

截图

What worked for me was to copy all the files except the Utility directory from C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\VCProjectItems_WDExpress into C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcprojectitems 对我有用的是将除实用程序目录之外的所有文件从C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ VC \\ VCProjectItems_WDExpress复制到C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ VC \\ vcprojectitems

When I added an item (Right click on Source Files directory in Visual Studio Express Solution Explorer), all the cpp items were available. 当我添加一个项目(右键单击Visual Studio Express解决方案资源管理器中的源文件目录)时,所有cpp项都可用。

I encountered this problem after downloading and installing Visual Studio Express 14.0 on April 16 2016. This seems to be the re-emergence of a problem encountered in earlier versions of Visual Studio Express. 我在2016年4月16日下载并安装Visual Studio Express 14.0后遇到此问题。这似乎是早期版本的Visual Studio Express中遇到的问题的重新出现。 This is a link to a workaround for version 12.0, involving a straightforward edit to the registry: 这是指向版本12.0的变通方法的链接 ,涉及对注册表的直接编辑:

[HKEY_CURRENT_USER\\Software\\Microsoft\\WDExpress\\12.0_Config\\Projects{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC943}\\AddItemTemplates\\TemplateDirs{F1C25864-3097-11D2-A5C5-00C04F7968B4}/1] [HKEY_CURRENT_USER \\ SOFTWARE \\微软\\ WDExpress \\ 12.0_Config \\项目{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC943} \\ AddItemTemplates \\ TemplateDirs {F1C25864-3097-11D2-A5C5-00C04F7968B4} / 1]

"TemplatesDir"="C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\\\VC\\VCProjectItems_WDExpress" “TemplatesDir”=“C:\\ Program Files(x86)\\ Microsoft Visual Studio 12.0 \\\\ VC \\ VCProjectItems_WDExpress”

I followed the instructions except for altering the version number from 12.0 to 14.0 where relevant, and it solved the problem. 我按照说明操作,除了在相关的地方将版本号从12.0改为14.0之外,它解决了问题。

Possibly the problem arose because alongside the installation of Studio Express, it seems that a Microsoft Update updated the Microsoft Visual C++ Redistributable (x64) and (x86). 可能出现问题是因为除了安装Studio Express之外,似乎Microsoft Update更新了Microsoft Visual C ++ Redistributable(x64)和(x86)。 The consequence was an error message at the end of the Studio Express installation, because the version number of these installed C++ components was higher than those included in the Studio Express download. 结果是Studio Express安装结束时出现错误消息,因为这些已安装的C ++组件的版本号高于Studio Express下载中包含的版本号。 Deinstalling the later versions and then rerunning the Studio Express installation was successful in so far as there was no error message, but this problem with New Item was there. 卸载更高版本然后重新运行Studio Express安装是成功的,因为没有错误消息,但New Item的问题就在那里。

I did ALMOST the same as Mr. Hill 我和希尔先生的做法几乎相同

I copied the whole directory and renamed the copied directory to the second one. 我复制了整个目录并将复制的目录重命名为第二个目录。 I found it wasn't even in the directory. 我发现它甚至不在目录中。 I am Windows 10 Home Edition. 我是Windows 10家庭版。 ... also trying to get back up to speed to the latest VC Studio and Windows, .... don't laugh but I'm very happy with V6.0 and Win XP, but I can't keep supporting Windows XP forever. ...还试图回到最新的VC Studio和Windows的速度,....不要笑,但我对V6.0和Win XP非常满意,但我无法继续支持Windows XP永远。 See changes at the bottom of my post. 查看帖子底部的更改。

Btw all the apps that I make in V6.0 work in Windows 10: As Databases, I'm using my own database made from fopen,fwrite, sqlite and Dao MSACCESS 97 . 顺便说一句,我在V6.0中制作的所有应用程序都在Windows 10中运行:作为数据库,我使用自己的数据库,由fopen,fwrite, sqlite and Dao MSACCESS 97 There is one app that I have to port to MFC. 有一个应用程序,我必须移植到MFC。 It's not necessary that I upgrade to the Latest VStudio at the moment, But I'm going to be doing it. 我现在没有必要升级到最新的VStudio,但我会这样做。 Can't live in the past forever,... well maybe lol? 永远不能过去,...也许哈哈?

Also, I don't like the new GUI features of WINDOWS 7 and WINDOWS 10. My recommendation to MICROSOFT is to make Windows 11 with a look and feel more like Windows XP(or at least a switch to give users that option) but of course they will be obligated to add new features to keep up with technology. 此外,我不喜欢WINDOWS 7和WINDOWS 10的新GUI功能。我对MICROSOFT的建议是使Windows 11的外观更像是Windows XP(或者至少是为用户提供选项的开关),但是当然,他们有义务添加新功能以跟上技术发展。 I don't like all the pop-ups on rollovers and the new files control dialog. 我不喜欢翻转和新文件控制对话框上的所有弹出窗口。

..sorry for the types: These new PCs and WINDOWS 10 are very cumbersome with all the pop up that appears when you do rollovers. 适用于各种类型:这些新PC和WINDOWS 10非常繁琐,当您进行翻转时会出现所有弹出窗口。

Thanks to everyone on this thread, and special thanks to Mr. Hill 感谢这个主题的每个人,特别感谢希尔先生

Chaneges to system: Chaneges to system:

C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\VCProjectItems_WDExpress into C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\VCProjectItems C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ VC \\ VCProjectItems_WDExpress到C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ VC \\ VCProjectItems

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C ++ Microsoft Visual Studio 2015调试问题(无法找到或打开PDB文件。) - C++ Microsoft Visual Studio 2015 Debug issue (Cannot find or open the PDB file.) 问题包括Visual Studio 2015 for c ++程序中的curl lib - Issue including curl lib in Visual Studio 2015 for c++ program Visual Studio 2015 - 没有 c/c++ 属性,但文件是 cpp - Visual Studio 2015 - no c/c++ properties, but file is cpp C ++ boost nuget无法打开Visual Studio 2015文件 - C++ boost nuget cannot open file Visual Studio 2015 从Visual Studio 2015调试时找不到C ++文件 - C++ file not found when debugging from visual studio 2015 如何在 Visual Studio Community 2015 上打开输入文件、C++? - How to open input file, C++ on visual studio community 2015? visual Studio 2015 c ++将独立的dll文件添加到项目 - visual studio 2015 c++ add a standalone dll file to a project Visual Studio Express中C ++中的内存分配问题 - Memory allocation issue in C++ in visual studio express 在Visual Studio Express 2015中的同一项目中混合使用c ++和c# - Mix c++ and c# in the same project inside Visual Studio Express 2015 如何在“ Microsoft Visual Studio Community 2015”的现有“ C ++项目”中创建新的“头文件(.h)”? - How do I create a new “header file (.h)” in an existing “C++ Project” in “Microsoft Visual Studio Community 2015”?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM