Project Builds But Can't Publish

Project builds but can't publish

So I made it work.

The problem was the version of the "Microsoft.Net.Compilers". I downgraded from v2.6.1 to v2.4.0.

I don't know why so if someone knows it would be cool to know.

c# net can't publish project, build succeeded in visual studio 2015

"solved" it using visual studio 2017 for publishing.

VS2017: Solution builds but publish fails

VS2017: Solution builds but publish fails

(According to the error messages, they are all common errors. we could not give the most direct correct answer for this issue, we can only give you some troubleshootings. In order to avoid losing contact in the round-trip comments, I post those troubleshootings as answer instead of comments.).

You can try:

  • Clean solution then rebuild it.
  • Go to Solution Explorer. Right click on Solution. Go to Properties. Go to Configuration Manager. Check if the checkboxes under Build are checked or not. If any or all of them are unchecked, then check them and try build the solution again.
  • Remove the project reference and then adding it back in again, and check if all those missing dll file exists in the bin folder.
  • Delete bin/obj folder, build again and try to restart Visual Studio.

Publish failed' but build succeeded?

You can try this:

  1. Perform precompilation against the web application.

  2. Clear the target directory(virtual directory in IIS or physical file
    folder) and deploy all the files (of the web application) into the target
    directory.


In the output window you can check at which stage does the publish website
operation fail. For example, at the first stage, if there are some error
which will only occur at precompilation, that will cause the stage 1 fail.
Or some times if the target directory has something configured incorrectly.
Such as the IIS virtual dir is not set to the correct ASP.NET version or
some old files are locked and prevent them from being cleared. Mostly,
publish failed will be caused by IIS side configuration issue such as
authentication setting....

Source link

You can open the output window by pressing Ctrl+W, O.

ClickOnce - Cannot publish because a project failed to build

I solved my problem. The problem was the "Modified" time of some files. I used the program Timestamp to fix it.

As I said in my question, the problem was that I build the solution and the date was in the future. Because of that, every time I pressed F5 Visual Studio was building the whole solution again and Publish ClickOnce wasn't working.



Related Topics



Leave a reply



Submit