VS 2015创建新项目时出现错误“对象引用未设置为对象的实例" [英] VS 2015 Error “Object reference not set to an instance of an object” when creating a new project

查看:161
本文介绍了VS 2015创建新项目时出现错误“对象引用未设置为对象的实例"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi All.

我将Windows 7 Enterprise和VS 2015 Enterprise与Update 3一起使用.VisualStudio出现问题.我先卸载然后重新安装了VS2015.重新安装后,我需要运行修复模式.最后我有能力运行VS.当我打开它时,我发现 缺少ASP.NET模板.在MSDN论坛中,我找到了帖子:

I'm using Windows 7 Enterprise and VS 2015 Enterprise with Update 3. I have problem with Visual Studio. I uninstall and then reinstalled VS 2015. After re-installation I need to run Repair mode. Finally I have ability to run VS. When I open it I found that ASP.NET templates was missed. In MSDN forum I found post:

https://social.msdn.microsoft.com/Forums/zh-CN/2b75f659-521e-4e08-b093-11d7bfb63ef1/missing-web-templates-for-c-in-visual-studio-2015?forum=netfxsetup

https://social.msdn.microsoft.com/Forums/en-US/2b75f659-521e-4e08-b093-11d7bfb63ef1/missing-web-templates-for-c-in-visual-studio-2015?forum=netfxsetup

我提出了这样的建议:

I performed such suggestion:

请转到项目存储文件夹,例如C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ ProjectTemplates,然后检查是否为CSharp/Web文件夹.如果此文件夹及其子项存在,请打开管理CMD窗口并浏览 到C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE并运行以下命令:

devenv/resetuserdata
devenv/resetSettings
devenv/InstallVSTemplates

Please go to the project store folder like C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates and check if the CSharp/Web folder. if this folder and its subitems are existing, Please open an administrative CMD window and navigate to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE and run the following commands:

devenv /resetuserdata
devenv /resetSettings
devenv /InstallVSTemplates

现在,当我打开Visual Studio并单击新建项目时;我就像在闪烁该屏幕一样

Now when I open Visual Studio and click New Project I'm getting like blink that screen

然后出现错误信息:

如何解决问题?如果要解决问题最好卸载VS.如何使用Update 3完全卸载VS 2015 Enterprise?

How to fix the problem? If to solve the problem better to uninstall VS. How to uninstall VS 2015 Enterprise with Update 3 completely?

谢谢.

推荐答案

zleug,

欢迎来到MSDN论坛.

看起来您已经为不同的问题或相关问题打开了多个不同的线程,最好完全卸载VS 2015并重新安装它,它将执行干净的安装而无需问题.

>>如何使用Update 3完全卸载VS 2015 Enterprise?

如果您想完全卸载VS 2015,可以尝试以下方法: /span>

If you want to perform a complete uninstall of VS 2015, you can have a try with the following methods:

1.强制卸载命令以删除:

  • Run the command executable file /uninstall /force like vs_enterprise.exe /uninstall /force in the elevated command prompt, What’s more, you can see here: https://blogs.msdn.microsoft.com/heaths/2015/07/17/removing-visual-studio-components-left-behind-after-an-uninstall/
  • Reboot machine if prompted
  • Rename or delete folders-

C:\ Program Files(x86)\ Microsoft Visual Studio 14.0

C:\ Program Files \ Microsoft Visual Studio 14.0

C:\ users \ user \ Documents \ Visual Studio 2015

C:\ users \ user \ AppData \ Roaming \ Microsoft \ VisualStudio \ 14.0

C:\ users \ user \ AppData \ Local \ Microsoft \ VisualStudio \ 14.0

C:\ users \ user \ AppData \ Local \ Microsoft \ VSCommon \ 14.0

  • 转到注册表编辑器(开始>>运行>> regedit)并删除/重命名以下注册表-
  • Go to the registry editor (start >> run >> regedit) and remove/rename the following registries-
  1. HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ VisualStudio \ 14.0
  2. HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ VisualStudio \ 14.0
  3. HKEY_CURRENT_USER \ Software \ Microsoft \ VisualStudio \ 14.0
  4. HKEY_CURRENT_USER \ Software \ Microsoft \ VisualStudio \ 14.0_Config
  1. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0
  2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0
  3. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0
  4. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config

2. Visual Studio卸载程序工具: https://github.com/Microsoft/VisualStudioUninstaller/releases .此可执行文件旨在清除/烧录所有Preview/RC/RTM版本 Visual Studio 2013,Visual Studio 2015和Visual Studio vNext版本.应该使用它作为最后的手段来清理用户的系统,然后再重新构想计算机.

2. The Visual Studio Uninstaller tool: https://github.com/Microsoft/VisualStudioUninstaller/releases. This executable is designed to cleanup/scorch all Preview/RC/RTM releases of Visual Studio 2013, Visual Studio 2015 and Visual Studio vNext. It should be used as a last resort to clean up the user's system before resorting to reimaging the machine.

在下一次安装之前,请确保您的操作系统已升级到Windows 7 SP1,Windows Update已更新到日期,暂时禁用所有防病毒软件并清理%temp% 文件夹,使用带有更新3的VS Enterprise 2015的正常ISO文件进行安装,并以管理员身份运行安装程序.

Before the next installation, please make sure your OS is upgraded to Windows 7 SP1, windows update is up-to-date, temporarily disable any antivirus software and clean up the %temp% folder, use a healthy ISO file of VS enterprise 2015 with update 3 to install, run the installer as administrator.

顺便说一句,我发现您已经打开了几个相关的线程,并且其中的一些已修复,如果解决了您原来的线程,可以请您将该解决方案标记为答案,并且可以帮到您我们专注于您当前的话题, 非常感谢您的合作与支持.

BTW, I found you already opened several related thread and some were fixed, could you please mark the solution as answer if it solved your original thread and that can help us to focus on your current thread, thank you very much for your cooperation and support.

最好的问候,

Sara


这篇关于VS 2015创建新项目时出现错误“对象引用未设置为对象的实例"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆