Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishing Website on Visual Studio 2010 fails (MVC3)

I am trying to publish the website using Publish option provided in the properties of the solution Explorer in Visual Studio 2010 but I am getting errors , below is the error:

Error 1 Copying file obj\Release\Package\PackageTmp\Content\css\Site.css to obj\Release\Package\PackageTmp\obj\Release\Package\PackageTmp\Content\css\Site.css failed. Could not find file 'obj\Release\Package\PackageTmp\Content\css\Site.css'

Any ideas or suggestion , why this error is popping up causing publishing to fail. Also I check my obj\Release folder , almost all the files have got an exclaimation mark next to it.

like image 274
Mr A Avatar asked Dec 12 '22 11:12

Mr A


1 Answers

Go into windows explorer, navigate to the root of your website, locate the bin and obj folders and send them to the recycle bin. Build the app and try to publish again.

EDIT

It's because you have a file reference in your project that doesn't exist or is a different version to what your project file expects. Try clicking the Show All Files in the solution explorer and finding the file with the yellow triangle next to it. Then right click -> Exclude from project. That should solve your problem.

like image 166
simonlchilds Avatar answered Jan 06 '23 07:01

simonlchilds