Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.0\bin\Microsoft.Common.CurrentVersion.targets(4105,5): error MSB3030: Could not copy the file "D:\bootmgr" because it was not found. 1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4105,5): error MSB3030: Could not copy the file "D:\BOOTNXT" because it was not found. 1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4105,5): error MSB3030: Could not copy the file "D:\pagefile.sys" because it was not found. 1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4105,5): error MSB3030: Could not copy the file "D:\swapfile.sys" because it was not found. 

My colleague can build with no errors.

like image 631
Addeladde Avatar asked Sep 11 '15 12:09

Addeladde


2 Answers

I encountered the same issue.

The problem starts when you upgrade the DotNetCompilerPlatform to version 1.0.1.

To work around this issue you can downgrade to version 1.0.0 using the NuGet package manager.

EDIT: If you uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform AND Microsoft.Net.Compilers, and then install the DotNetCompilerPlatform (has a dependency on the Microsoft.Net.Compilers package so it will automatically install that) package again the error disappears for good so it seems.

Still not sure what happens under water but I can work again!

like image 158
Martijn Kooij Avatar answered Oct 22 '22 04:10

Martijn Kooij


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
like image 39
Greg Woods Avatar answered Oct 22 '22 05:10

Greg Woods