错误 MSB3027:无法复制“C:pagefile.sys"到“bin oslynpagefile.sys".超过 10 次重试次数.失败 [英] Error MSB3027: Could not copy "C:pagefile.sys" to "bin oslynpagefile.sys". Exceeded retry count of 10. Failed

查看:161
本文介绍了错误 MSB3027:无法复制“C:pagefile.sys"到“bin oslynpagefile.sys".超过 10 次重试次数.失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 VS 2013 时遇到此错误:

I am consistently getting this error with VS 2013:

无法将C:pagefile.sys"复制到bin oslynpagefile.sys".超过 10 次重试次数.失败.无法复制文件"C:pagefile.sys" 到 "bin oslynpagefile.sys".进程不能访问文件

Could not copy "C:pagefile.sys" to "bin oslynpagefile.sys". Exceeded retry count of 10. Failed. Unable to copy file "C:pagefile.sys" to "bin oslynpagefile.sys". The process cannot access the file

请帮帮我.

推荐答案

Pramod 评论中的这个答案所示问题源于 Microsoft.CodeDom.Providers.DotNetCompilerPlatform nuget 包,特别是从版本 1.0.0 升级到 1.0.1.

As indicated in this answer from Pramod's comment the problem stems from the Microsoft.CodeDom.Providers.DotNetCompilerPlatform nuget package, specifically upgrading from version 1.0.0 to 1.0.1.

然而,对我来说,使用 Visual Studio 降级会导致进一步的构建错误.为了解决这个问题,我必须手动编辑我的 csproj 和 packages.config 文件,删除对 Microsoft.Net.CompilersMicrosoft.CodeDom.Providers.DotNetCompilerPlatform 的所有引用.

For me however, downgrading using Visual Studio caused further build errors. To solve the problem I had to manually edit my csproj and packages.config files, removing all references to Microsoft.Net.Compilers and Microsoft.CodeDom.Providers.DotNetCompilerPlatform.

具体来说,这意味着:

  • 删除两个库的所有版本的相关 <Import Project="... 部分(通常在 csproj 的开头)
  • 删除两个库的两个版本的 部分
  • 从packages.config 中删除所有Microsoft.CodeDom.Providers.DotNetCompilerPlatformMicrosoft.Net.Compilers 包.
  • Removing the relevant <Import Project="... sections for all versions of both libraries (usually towards the beginning of the csproj)
  • Removing the <Reference Include="... sections for both versions of both libraries
  • Removing the <Error Condition="!Exists(... sections for both versions of both libraries from within the EnsureNuGetPackageBuildImports target section
  • Removing all Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers packages from the packages.config.

然后我能够在 VS 和(按顺序)管理项目 nuget 包:

I was then able to manage the projects nuget packages in VS and (in order) :

  • 添加Microsoft.Net.Compilers 版本1.2.2
  • 添加Microsoft.CodeDom.Providers.DotNetCompilerPlatform 版本1.0.1
  • Add Microsoft.Net.Compilers version 1.2.2
  • Add Microsoft.CodeDom.Providers.DotNetCompilerPlatform version 1.0.1

这解决了页面文件构建错误,以及促使我首先尝试升级的运行时错误.

This solved the pagefile build error, and the runtime error which prompted me to try and upgrade in the first place.

这篇关于错误 MSB3027:无法复制“C:pagefile.sys"到“bin oslynpagefile.sys".超过 10 次重试次数.失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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