Visual Studio web project publish not working

Someone asked on Stack Overflow:

I have a finished web project ready to publish. It works fine when I run it in Visual Studio. Then I go to publish it. Visual Studio claims the publication was successful, but when I go to the site on IIS it does not work. The published file system doesn’t even have the Images folder, and the links to the Scripts and other folders don’t work.

To describe what’s happening, first I choose Build—>Publish site. I create a publish profile like so:

enter image description here

Then I publish it as a File System and pick the folder:

enter image description here

Then I publish it as Release:

enter image description here

Then I press Publish:

enter image description here

Here is the output of the publish website by Visual Studio:

------ Build started: Project: LangSite, Configuration: Release Any CPU ------ LangSite -> C:\Users\Administrator\documents\visual studio 2013\Projects\LangSite_151209\LangSite_151209\bin\LangSite_151209.dll ------ Publish started: Project: LangSite, Configuration: Release Any CPU ------ Connecting to C:\Users\Administrator\Documents\LangTestSite… Transformed Web.config using C:\Users\Administrator\documents\visual studio 2013\Projects\LangSite_151209\LangSite_151209\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config. Copying all files to temporary location below for package/publish: obj\Release\Package\PackageTmp. Publishing folder /… Publishing folder Areas… Publishing folder Areas/HelpPage… Publishing folder Areas/HelpPage/Views… Publishing folder Areas/HelpPage/Views/Help… Publishing folder Areas/HelpPage/Views/Help/DisplayTemplates… Publishing folder Areas/HelpPage/Views/Shared… Publishing folder bin… Publishing folder Content… Publishing folder fonts… Publishing folder Scripts… Publishing folder Views… Publishing folder Views/Home… Publishing folder Views/Shared… Site was published successfully file:///C:/Users/Administrator/Documents/LangTestSite

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

Here is the layout of the file folders in Visual Studio:

enter image description here

And here is the file structure of the published site. Notice, no Images folder:

enter image description here

When I try to go to the site, I get a page of broken links: enter image description here enter image description here

Clearly I am not using the publish web project correctly, but I don’t see any different way to do it. What am I doing wrong?

I posted the following answer, which was chosen as the accepted answer and received 1 upvote:

Chances are that your images are in the file system, but they are not in your actual project.

You’ll want to tell Visual Studio to ‘show all files’ its one of the icons in the top of the solution explorer. From there you can see the grayed out items show up under the images folder, and right click and “include in project”.


Originally posted on Stack Overflow — 1 upvotes (accepted answer). Licensed under CC BY-SA.

signed letter b

Dad. Geek. Gamer. Software developer. Cloud user. Old Car enthusiast.  Blogger.


Top Posts


profile for Nate on Stack Exchange, a network of free, community-driven Q&A sites
a proud member of the blue team of 512KB club
Thoughts, opinions, and ideas shared here are my own. © 2026 Nate Bross.