在Visual Studio 2015中运行asp.net应用程序时出错

时间:2022-09-20 23:13:31

In my company I'm running Visual Studio 2015 Enterprise and just recently upgraded to Windows 10. Unfortunately, now I can't run any web project using versions of asp.net earlier than 5 (owin/katana) - always getting error :

在我的公司,我正在运行Visual Studio 2015 Enterprise,最近刚升级到Windows 10.不幸的是,现在我无法使用早于5的版本的asp.net(owin / katana)运行任何Web项目 - 总是收到错误:

"Could not load file1or assembly 'XXX' or one of its dependencies. The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020) ".

“无法加载file1或程序集'XXX'或其依赖项之一。该进程无法访问该文件,因为它正被另一个进程使用。(HRESULT异常:0x80070020)”。

Now, I've found a few posts like this and the answer is mostly that some other application is running on port 80, 8080 etc blocking visual studio's iis express. The problem is that I get this error regardless of port I'm using (even on some random 34535 etc).

现在,我发现了一些像这样的帖子,答案主要是其他一些应用程序在端口80,8080上运行,阻止了visual studio的iis express。问题是,无论我使用哪个端口,我都会收到此错误(即使在一些随机的34535等)。

The interesting part is that when I run kestrel (app on asp.net 5) it works and runs fine without any error.

有趣的是,当我运行kestrel(asp.net 5上的应用程序)时,它可以正常运行并且没有任何错误。

Anyone has any ideas ?

有人有什么想法吗?

1 个解决方案

#1


0  

Okay, so I had this issue and resolved it by uninstalling Panda antivirus, which presumably was locking the assemblies for just long enough to interfere with loading them some of the time.

好的,所以我遇到了这个问题,并通过卸载Panda防病毒来解决它,这可能是将程序集锁定的时间足够长,以便在某些时候干扰加载它们。

If anyone else is having this issue, and there is definitely an assembly that won't load (as opposed to a port that's already been bound to) then try checking your antivirus!

如果其他人遇到这个问题,并且肯定有一个无法加载的程序集(而不是已绑定的端口),那么请尝试检查您的防病毒软件!

#1


0  

Okay, so I had this issue and resolved it by uninstalling Panda antivirus, which presumably was locking the assemblies for just long enough to interfere with loading them some of the time.

好的,所以我遇到了这个问题,并通过卸载Panda防病毒来解决它,这可能是将程序集锁定的时间足够长,以便在某些时候干扰加载它们。

If anyone else is having this issue, and there is definitely an assembly that won't load (as opposed to a port that's already been bound to) then try checking your antivirus!

如果其他人遇到这个问题,并且肯定有一个无法加载的程序集(而不是已绑定的端口),那么请尝试检查您的防病毒软件!