CleanWPPAllFilesInSingleFolder 错误使我的项目不再加载

我使用 VS2012创建了一个动态数据项目。这一切都工作,然后我开始配置网络部署设置。我不确定我到底改变了什么设置,因为没有错误。但是,当我尝试加载解决方案时,我得到了下面的项目错误,它将不再加载。

Specified condition "$(CleanWPPAllFilesInSingleFolder)" evaluates to "" instead of a boolean. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets

我无法在 csproj 文件中看到 CleanWPPAllFilesInSingleFolder。对于如何修复这个问题有什么想法吗? 这样我就可以再次加载这个项目了?

14167 次浏览

I just had this issue as well. Try the following:

  1. Close Visual Studio
  2. Delete your .user and .suo files
  3. Re-open the solution.

This worked for me.

I've found a very very weird (and working) workaround for this type of deploy issues, if you have tried closing & opening VS with no luck, try to close all open document prior to the publish process. weird huh? :)

so the complete fix-it guide for this type of issues would be like the following:

  1. Try "Clean" then rebuild
  2. If it's still not publishing, try closing & reopening your project again
  3. Still no luck? try closing VS but this time delete all the *.user & *.suo files, then open up your solution again and give it a try.
  4. Finally, if all these steps are not working, try my newest trick, close all the opened document and give it a try
  5. 5.

let me know if this has helped you :)

I closed and re-opened my solution. I'm inclined to believe it's a defect in the Preview feature as that was the only thing I did differently before it started happening. I haven't been able to reproduce it since, however.

In my case, it turned out that IIS was not installed on the destination server! Installing it fixed the problem.

In my case after removing all *.user and *.suo I had to restart VS.

All I did was close Visual Studio then Reopened it. Done