Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publish Web to file system from Visual Studio 2010 does nothing but delete

When I try to publish in Windows 7 from Visual Studio 2010 via File System, no files are added to my target folder. If I choose "Replace matching files with local copies", nothing happens. If I choose "Delete existing files prior to publish", it deletes the files in the target folder, but no new files are published. This is the output I get:

Deleting existing files...

Publishing folder /...

========== Build: 3 succeeded or up-to-date, 0 failed, 0 skipped ==========

========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

Any thoughts?

EDIT: Forgot to mention that I'm running VS as an Administrator. If I don't, publish will explicitly fail.

like image 327
Sjur Avatar asked Jan 12 '11 14:01

Sjur


People also ask

How do I publish a Web service in Visual Studio 2010?

A simple way: you switch to release mode, update your web. config for production, right click on your service project and from the menu select publish. Then you publish it to the local folder. This way it copies only the files needed.

How do I publish an entire solution in Visual Studio?

To publish from Visual Studio, do the following: Change the solution configuration from Debug to Release on the toolbar to build a Release (rather than a Debug) version of your app. Right-click on the project (not the solution) in Solution Explorer and select Publish. In the Publish tab, select Publish.

What is the difference between build and publish in Visual Studio?

Build compiles the source code into a (hopefully) runnable application. Publish takes the results of the build, along with any needed third-party libraries and puts it somewhere for other people to run it.

How do I publish my website in Visual Studio?

In Solution Explorer, right-click your project and choose Publish. If you're publishing this web app for the first time, next you see the Publish wizard. Visual Studio filters the list of destinations depending on the type of web app.


2 Answers

I ran into the same problem, after checking publish output, event logs, turning on and checking visual studio logs etc I then decided to remove the web publish (via add/remove) which I believe had been recently updated to v1.0.30810.0. This resolved the problem.

like image 135
Matt Jordan Avatar answered Oct 27 '22 21:10

Matt Jordan


I hope this issue has been resolved in the meanwhile, but something similar happened to me recently. In my case, the Build Action of the file had somehow been set to None. If the Build Action of a file is set to None, Publish Web will skip the file. To check the Build Action, select the file in the Solution Explorer and press F4 to go to the Properties Window.

like image 32
Brian Rogers Avatar answered Oct 27 '22 22:10

Brian Rogers