visual-studio 创建新项目时出现错误“对象引用未设置为对象的实例”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1372883/
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
While creating new project I am getting error "object reference not set to an instance of an object"
提问by malay
I have just started to use silverlight in visual studio 2k8. I have installed silverlight 3 tools for visual studio 2K8. Now while creating a new project an error is thrown - "object reference is not set to an instance of an object". Screen-shots are attached. Could you guyz please help?
我刚刚开始在 Visual Studio 2k8 中使用 Silverlight。我已经为 Visual Studio 2K8 安装了 Silverlight 3 工具。现在,在创建新项目时会引发错误 - “对象引用未设置为对象的实例”。附上截图。你能帮忙吗?
回答by pho79
Try re-setting your Visual Studio settings. Go to Start > Visual Studio Command Prompt (2008) and run the commands sequentially:
尝试重新设置 Visual Studio 设置。转到开始 > Visual Studio 命令提示符 (2008) 并按顺序运行命令:
devenv /ResetSettings
devenv /ResetSkipPKGS
See if this does the trick...
看看这是否有用...
回答by Arif
I had a similar problem with Visual Studio 2017. When I disable my ReSharperfrom Tools > Extensions and Updates, then this message is disappeared.
我在Visual Studio 2017 上遇到了类似的问题。当我从Tools > Extensions and Updates禁用我的ReSharper 时,此消息消失。
回答by VS1
Have you installed VS2008 SP1 before installing Silverlight 3 tools?
您在安装 Silverlight 3 工具之前是否安装了 VS2008 SP1?
I would recommend you to uninstall Silverlight 3 tools first and then look at the Instructions in the below MSDN download link and install Silverlight 3 tools following these instructions:
我建议您先卸载 Silverlight 3 工具,然后查看下面 MSDN 下载链接中的说明并按照以下说明安装 Silverlight 3 工具:
http://www.microsoft.com/download/en/details.aspx?id=9394
http://www.microsoft.com/download/en/details.aspx?id=9394
==================================================================
================================================== ================
Ready reference for Installation Instructions:
安装说明的准备参考:
Before installing Silverlight 3 Tools:
在安装 Silverlight 3 工具之前:
Upgrade Microsoft Visual Studio 2008 to Service Pack 1 and make sure that the Visual Web Developer feature is installed. or Install Microsoft Visual Web Developer 2008 Express with SP1. Uninstall any Beta or Preview versions of Expression Blend
将 Microsoft Visual Studio 2008 升级到 Service Pack 1,并确保安装了 Visual Web Developer 功能。或安装带有 SP1 的 Microsoft Visual Web Developer 2008 Express。卸载 Expression Blend 的任何 Beta 版或预览版
Note: This release will not work with the Visual Studio 2008 RTM or Visual Studio 2008 SP1 BETA.
注意:此版本不适用于 Visual Studio 2008 RTM 或 Visual Studio 2008 SP1 BETA。
===================================================================
================================================== ==================
回答by Daryl
I had a similar issue once and I just did a complete repair of VS. Have you tried that? Not an uninstall/reinstall, but a repair?
我曾经遇到过类似的问题,我刚刚对 VS 进行了完整的修复。你试过吗?不是卸载/重新安装,而是修复?
回答by Sourabh
I face the same problem and now solved it............
我面临同样的问题,现在解决了......
Follow the given path and shift+delete everything.
按照给定的路径和 shift+delete 一切。
Windows XP:
视窗 XP:
C:\Documents and Settings\your_user_name\Local Settings\Application Data\Microsoft\Team Foundation\2.0\Cache
C:\Documents and Settings\your_user_name\Local Settings\Application Data\Microsoft\Team Foundation\2.0\Cache
C:\Documents and Settings\your_user_name\Local Settings\Application Data\Microsoft\Team Foundation\3.0\Cache
C:\Documents and Settings\your_user_name\Local Settings\Application Data\Microsoft\Team Foundation\3.0\Cache
Windows 7:
Windows 7的:
C:\Users\your_user_name\AppData\Local\Microsoft\Team Foundation\2.0\Cache
C:\Users\your_user_name\AppData\Local\Microsoft\Team Foundation\2.0\Cache
C:\Users\your_user_name\AppData\Local\Microsoft\Team Foundation\3.0\Cache
C:\Users\your_user_name\AppData\Local\Microsoft\Team Foundation\3.0\Cache
C:\Users\your_user_name\AppData\Local\Microsoft\Team Foundation\4.0\Cache
C:\Users\your_user_name\AppData\Local\Microsoft\Team Foundation\4.0\Cache
So the solution is "TO CLEAR THE CACHE OF YOUR SYSTEM"
所以解决方案是“清除系统缓存”
回答by John Salver
I had a similar issue, but with Windows 8, VS2012 Pro and WP8 SDK.
我遇到了类似的问题,但使用的是 Windows 8、VS2012 Pro 和 WP8 SDK。
Try to either update or remove NuGet.
尝试更新或删除 NuGet。
My Solution: UNINSTALLEDNuGet (as updates to it did not work)
我的解决方案:UNINSTALLEDNuGet(因为它的更新不起作用)
回答by Arumugam Prasanth
I too had similar issue faced in my VS 2015, Windows 10 OS.
我在 VS 2015、Windows 10 操作系统中也遇到了类似的问题。
Solution : Close the VS IDE and Open it again.
解决方案:关闭 VS IDE 并再次打开它。
Hope it should be resolution.
希望它应该是决议。

