Visual Studio Professional 2015和Windows 10 - 各种IDE错误

时间:2022-10-10 21:02:35

I have recently done the following on my Macbook Pro

我最近在Macbook Pro上完成了以下操作

  1. Installed VMWare 8 and updated to latest version

    安装VMWare 8并更新到最新版本

  2. Installed Visual Studio 2015 from msdn (licensed via subscription)

    从msdn安装的Visual Studio 2015(通过订阅获得许可)

  3. Updated extensions/etc via the extensions/updates menu

    通过扩展/更新菜单更新了扩展/ etc

  4. Cloned my repository

    克隆了我的存储库

  5. Opened a solution originally created with VS.NET 2013 4a.) Allowed nuget to restore packages (which it did)

    打开最初使用VS.NET 2013 4a创建的解决方案。)允许nuget恢复包(它做了)

  6. Attempted to get on and 'do work'

    试图继续“工作”

The problem here is, that it is regularly unusable for the following reasons:

这里的问题是,由于以下原因,它经常无法使用:

  • I regularly get 'object reference not set to an instance of an object' when trying to close the IDE! I have to kill devenv.exe from taskmgr.
  • 在尝试关闭IDE时,我经常得到“对象引用没有设置为对象的实例”!我必须从taskmgr杀死devenv.exe。
  • I regularly get 'Value cannot be null. Parameter name: compositionService' when trying to add references. I simply can't add references
  • 我经常得到'价值不能为空。尝试添加引用时的参数名称:compositionService'。我根本无法添加引用
  • I see regular dialog prompts telling me that extensions have crashed and would I like to continue seeing this error message
  • 我看到定期对话框提示告诉我扩展已崩溃,我是否想继续看到此错误消息
  • It is incredibly slow to react, by comparison with VS2013 which was relatively snappy.
  • 与相对敏捷的VS2013相比,它的反应非常缓慢。

I have a feeling that all are related to something and finding that something is my goal.

我感觉所有都与某些事情有关,并发现某些事情是我的目标。

I have, so far: - Removed everything from the componentModelCache folder in the app data for the 14.0 folder, which prompted a load of reloading of MEF components (whatever they are!) when I reloaded the solution. This doesn't appear to have done a great deal, but it was stated as a potential solution for the 'cant load package x' problem.

到目前为止,我已经: - 从14.0文件夹的应用程序数据中的componentModelCache文件夹中删除了所有内容,当我重新加载解决方案时,这会导致重新加载MEF组件(无论它们是什么!)。这似乎没有做太多,但它被称为'无法加载包x'问题的潜在解决方案。

It is random how long it is usable before these errors manifest themselves, but it's very frequent throughout the day that I'm killing the executable and re-opening.

在这些错误表现出来之前它是可以随机使用多长时间,但是我整天都非常频繁地杀死可执行文件并重新打开。

I find it hard to believe that this software was shipped in this condition - so I assume that there's something that I need to do to remedy this situation with my local environment, solution, projects - or something else.

我发现很难相信这个软件是在这种情况下发货的 - 所以我认为我需要采取一些措施来解决我的本地环境,解决方案,项目或其他问题。

I am going to try and create a new solution and add the projects, one by one - but all I'm really doing is trial and error/clutching at straws.

我将尝试创建一个新的解决方案并逐个添加项目 - 但我真正做的就是试验和错误/抓住吸管。

Any advice on how to remedy my IDE? I have no hope of being remotely productive at present!

关于如何补救我的IDE的任何建议?我目前没有希望远程高效!

3 个解决方案

#1


11  

I think the VM issues were a red herring. I get these errors in Windows 10 running on the hardware (not in a VM). The most common error is the compositionService one. I also get "The TestWindowPackage did not load correctly."

我认为VM问题是一个红色的鲱鱼。我在Windows 10上运行硬件(而不是VM)时遇到这些错误。最常见的错误是compositionService one。我也得到“TestWindowPackage没有正确加载。”

It seems to happen after installing some updates, and get fixed by install some updates. It leaves the Solution Explorer unable to expand folders. Running as administrator does work around the issue, but other than that I would have to wait for an update in "Extensions and Updates" and then hopefully it would clear up.

它似乎发生在安装一些更新后,并通过安装一些更新得到修复。它使解决方案资源管理器无法展开文件夹。以管理员身份运行确实解决了这个问题,但除此之外,我必须等待“扩展和更新”中的更新,然后希望它能够清理。

After installing the UWP tools, I got the errors again and this time could not even close Visual Studio without killing the process.

安装UWP工具后,我再次收到错误,这次甚至无法关闭Visual Studio而不会终止进程。

Now I have found a scriptable solution in Oleg's answer to the TestWindowPackage issue.

现在我在Oleg对TestWindowPackage问题的回答中找到了一个可编写脚本的解决方案。

Posted by Oleg [MSFT] on 1/29/2013 at 1:10 PM

Oleg [MSFT]于2013年1月29日下午1:10发布

This may be caused by a corruption in the metadata cache Visual Studio maintains for its various components. Could you run the following two steps from the Developer Command Prompt for VS2012 and let us know if this fixed the problem? Please run these commands "As Administrator" to avoid file access errors.

这可能是由Visual Studio为其各种组件维护的元数据缓存中的损坏引起的。你可以从VS2012的开发人员命令提示符运行以下两个步骤,让我们知道这是否解决了这个问题?请运行这些命令“以管理员身份”以避免文件访问错误。

Use an administrator command prompt. Here I have updated the commands for Visual Studio 2015:

使用管理员命令提示符。在这里,我更新了Visual Studio 2015的命令:

del %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
"c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" /setup

#2


1  

So,

所以,

This turned out to be appear to be related to the virtual machine and environment.

事实证明这似乎与虚拟机和环境有关。

I had a bunch of failed Windows updates showing in the windows update screen in Windows 10. I shut down every app and restarted these, along with updating to the large November update to Windows 10.

我在Windows 10的Windows更新屏幕中显示了一堆失败的Windows更新。我关闭了每个应用程序并重新启动了这些更新,同时更新到Windows 10的大型11月更新。

I also upped the number of cores to the VM, from 2 to 4 and the same for memory. This had the desired effect on performance, also.

我还增加了VM的内核数量,从2到4,内存相同。这也对性能产生了预期的影响。

Once these two had been done, a reboot later and the environment was working fine.

完成这两个后,稍后重启,环境工作正常。

This, therefore, is a complete niche occurrence I guess that was somehow related to a slightly dodgy Windows state and/or lack of 'grunt' Odd.

因此,这是一个完整的利基发生,我猜这是某种程度上与一个略微狡猾的Windows状态和/或缺乏'咕噜'奇怪相关。

#3


0  

Try disabling some of Visual Studio extensions.

尝试禁用某些Visual Studio扩展。

I had this same message - together with another message mentioned in Visual Studio - Error when clicking on Solution -> Properties (Object reference not set to an instance of an object).

我有同样的消息 - 连同Visual Studio中提到的另一条消息 - 单击解决方案时出错 - >属性(对象引用未设置为对象的实例)。

Disabling an extension solved this issue for me.

禁用扩展程序为我解决了这个问题。

#1


11  

I think the VM issues were a red herring. I get these errors in Windows 10 running on the hardware (not in a VM). The most common error is the compositionService one. I also get "The TestWindowPackage did not load correctly."

我认为VM问题是一个红色的鲱鱼。我在Windows 10上运行硬件(而不是VM)时遇到这些错误。最常见的错误是compositionService one。我也得到“TestWindowPackage没有正确加载。”

It seems to happen after installing some updates, and get fixed by install some updates. It leaves the Solution Explorer unable to expand folders. Running as administrator does work around the issue, but other than that I would have to wait for an update in "Extensions and Updates" and then hopefully it would clear up.

它似乎发生在安装一些更新后,并通过安装一些更新得到修复。它使解决方案资源管理器无法展开文件夹。以管理员身份运行确实解决了这个问题,但除此之外,我必须等待“扩展和更新”中的更新,然后希望它能够清理。

After installing the UWP tools, I got the errors again and this time could not even close Visual Studio without killing the process.

安装UWP工具后,我再次收到错误,这次甚至无法关闭Visual Studio而不会终止进程。

Now I have found a scriptable solution in Oleg's answer to the TestWindowPackage issue.

现在我在Oleg对TestWindowPackage问题的回答中找到了一个可编写脚本的解决方案。

Posted by Oleg [MSFT] on 1/29/2013 at 1:10 PM

Oleg [MSFT]于2013年1月29日下午1:10发布

This may be caused by a corruption in the metadata cache Visual Studio maintains for its various components. Could you run the following two steps from the Developer Command Prompt for VS2012 and let us know if this fixed the problem? Please run these commands "As Administrator" to avoid file access errors.

这可能是由Visual Studio为其各种组件维护的元数据缓存中的损坏引起的。你可以从VS2012的开发人员命令提示符运行以下两个步骤,让我们知道这是否解决了这个问题?请运行这些命令“以管理员身份”以避免文件访问错误。

Use an administrator command prompt. Here I have updated the commands for Visual Studio 2015:

使用管理员命令提示符。在这里,我更新了Visual Studio 2015的命令:

del %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
"c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" /setup

#2


1  

So,

所以,

This turned out to be appear to be related to the virtual machine and environment.

事实证明这似乎与虚拟机和环境有关。

I had a bunch of failed Windows updates showing in the windows update screen in Windows 10. I shut down every app and restarted these, along with updating to the large November update to Windows 10.

我在Windows 10的Windows更新屏幕中显示了一堆失败的Windows更新。我关闭了每个应用程序并重新启动了这些更新,同时更新到Windows 10的大型11月更新。

I also upped the number of cores to the VM, from 2 to 4 and the same for memory. This had the desired effect on performance, also.

我还增加了VM的内核数量,从2到4,内存相同。这也对性能产生了预期的影响。

Once these two had been done, a reboot later and the environment was working fine.

完成这两个后,稍后重启,环境工作正常。

This, therefore, is a complete niche occurrence I guess that was somehow related to a slightly dodgy Windows state and/or lack of 'grunt' Odd.

因此,这是一个完整的利基发生,我猜这是某种程度上与一个略微狡猾的Windows状态和/或缺乏'咕噜'奇怪相关。

#3


0  

Try disabling some of Visual Studio extensions.

尝试禁用某些Visual Studio扩展。

I had this same message - together with another message mentioned in Visual Studio - Error when clicking on Solution -> Properties (Object reference not set to an instance of an object).

我有同样的消息 - 连同Visual Studio中提到的另一条消息 - 单击解决方案时出错 - >属性(对象引用未设置为对象的实例)。

Disabling an extension solved this issue for me.

禁用扩展程序为我解决了这个问题。