I Have Build project with visual studio but when i want to publish my website i get an empty folder and nothing there ! no error or warning ,
Building directory '/project/Users/'. Pre-compilation Complete ------ Publish started: Project: F:...project, Configuration: Debug Any CPU ------ Connecting to site E:project... Publishing directory /... ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ========== ========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
e:project is empty
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Build your project (not rebuild) it will work 🙂
OR
Other workaround is publish in debug mode first then change settings and publish in release mode. it will surely work 🙂
Method 2
In my case there was a little item in the .csproj file that I had to remove. I had to unload the project, edit the .csproj, then hunt down and remove the following XML tag:
<Target Name="GatherAllFilesToPublish"> </Target>
Once I republished, all was well.
Method 3
Try building the project in release mode first then publish.
Method 4
Creating a new profile helps solved my problem.
How to: Deploy a Web Project Using One-Click Publish in Visual Studio
Method 5
In visual studio 2013 there is a bug that will produce empty folder when you publish only if you are using existing publish profile/settings. The existing profile setting may have come from code you checkout or got from another source. The solution is to create your own publish profile from scratch and make a new folder for it.

Start wizard from beginning.

Method 6
Try checking the Properties > Build Action of your files if it was set to None. If it is, it will not copy your files, just the folders. On my project, it was set to
Build Action = Content
Method 7
I’m having this issue with vs2015 update 3. I had changed my build folder (due to paths too long error), and i can see the last steps in the publish output:
Copying all files to temporary location below for package/publish:
3>D:DEPLOYED_SITESBUILD_TEMPPackagePackageTmp
So i can at least get to the files in the PackageTmp folder. I could create a post build event which can copy the build files to the correct output folder.
Method 8
In my case I had checked on “Include IIS settings as configured in IIS express” in the project properties << Package/Publish Web *” section. Once I unchecked this option the publish worked as expected.
Method 9
Recreate publish profile this should resolve
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0