Publish Website Getting Empty Folder

北城以北 提交于 2019-11-29 16:35:07

问题


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


回答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 :)




回答2:


Try building the project in release mode first then publish.




回答3:


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.




回答4:


Creating a new profile helps solved my problem.

How to: Deploy a Web Project Using One-Click Publish in Visual Studio




回答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.




回答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




回答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_SITES\BUILD_TEMP\Package\PackageTmp

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.




回答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.




回答9:


Recreate publish profile this should resolve



来源:https://stackoverflow.com/questions/13073284/publish-website-getting-empty-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!