Strange Build error after upgrading to Visual studio 2015 wants to copy pagefile.sys

前端 未结 7 1375
名媛妹妹
名媛妹妹 2020-12-08 19:56

I get this error when building an MVC project in a solution. No references to those files exists in my solution at all.

C:\\Program Files (x86)\\MSBuild\\14.         


        
相关标签:
7条回答
  • 2020-12-08 20:07

    Having VS 2015 14.0.25431.01 Update 3, without Xamarin, neither DotNetCompilerPlatform nuget package, and having more build configurations (eg. Debug and RCDebug), i get the unexpected copy which would be coming from another build (eg. copy corresponding to RCDebug but i Rebuild on Debug). It did not worked by deleting all the Bin folders, or Clean on every build config then Build. It builds fine BUT turns bad when Run.

    0 讨论(0)
  • 2020-12-08 20:08

    I have fixed the problem by upgrading 'Mocrosoft.Net.Compilers' to 2.6.1.

    0 讨论(0)
  • 2020-12-08 20:14

    I used to have the same issue but I just removed Microsoft.CodeDom.Providers.DotNetCompilerPlatform and then installed 1.0.0. I found that after that it all looks good.

    0 讨论(0)
  • 2020-12-08 20:14

    Just uninstalling Microsoft.CodeDom.Providers.DotNetCompilerPlatform from one of our projects fixed this issue for me in Visual Studio 2017.

    0 讨论(0)
  • 2020-12-08 20:17

    I had the exact same problem. I didn't upgrade DotNetCompilerPlatform to 1.0.1.

    My solution was...

    • Exit visual studio
    • Delete your solution's "packages" folder
    • Relaunch VS. The NuGet package manager console window will prompt to restore packages. Do it.
    • Build your solution
    0 讨论(0)
  • 2020-12-08 20:24

    As other's have mentioned it's the upgrade from version 1.0.0 to 1.0.1 of Microsoft.CodeDom.Providers.DotNetCompilerPlatform that causes this problem.

    It's possible to solve this without downgrading, see my explanation in this answer. To summarise, what solved it for me was removing all references to the offending libraries manually (simply removing them in VS was not enough) and then re-adding the latest versions.

    On further investigation this appears to be due to the 1.0.1 nuget package not clearing up all of the references to 1.0.0 in the csproj. Why this is causing it try and copy the pagefile however is anyone's guess.

    0 讨论(0)
提交回复
热议问题