2
votes

I had an Asp.Net MVC project, in VS 2013 update 4, and now I continue working on it in VS 2015. The Asp.Net version is not upgraded, i.e. I still use the stable asp.net 4 and MVC 5. The problem is: I cannot publish this project anymore. During the publish, it complains about xml files of every library I use, like EF, OWIN, ... both for Nuget libraries and normal .net framework libraries. I tried adding these xml files from other sources and the publish proceeds further, but it raises another error like this:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(2991,5): Error : Copying file obj\Release\Package\PackageTmp\Content\bootstrap-rtl.min.css to obj\Release\Package\PackageTmp\obj\Release\Package\PackageTmp\Content\bootstrap-rtl.min.css failed. Could not find file 'obj\Release\Package\PackageTmp\Content\bootstrap-rtl.min.css'.

I removed this file from the project and the error still refers to this file. I searched the solution folder for this name, both in file names and file contents and I don't have it anywhere. It seems that Visual Studio has cached the publish procedure somewhere and does not update it when the project changes.

Any hints or solutions?

1
@TirthakShah your edit made the post unreadable. Don't use inline code to highlight random terms. - CodeCaster
Clean/rebuild your project, if this won't fix it, go on nuget console and update all your packages, build and publish. - SilentTremor
No, cleaning/deleting bin & obj, updating all nuget packages might only solve the problem with xml files. The problem with the css is still there - Alireza
Any new about this issue?? I'm getting the same error with the very first file of the project. - Soluciones Intuitivas
Please see the answer - Alireza

1 Answers

1
votes

In our case the solution was to create a new clean project, then copy all source code files (C# code, javascript, css, razor templates, html, ..., but not for example, contents of bin and obj folders) from the old project into the new one, and then adding them to project (in solution explorer).

Don't waste too much time on solving this problem, dodge it.