nasch
nasch

Reputation: 5498

Visual Studio publish doesn't report errors

I have a WCF web service using Visual Studio 2015. If I have a compile error in C# code, when I publish the web service (to a file location) the "build" will succeed, and continue through a successful publish:

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

If I then deploy to an IIS web server and call the web service there, the call fails and returns a page describing the compilation error.

When publishing, the output in VS starts with Build started: but apparently it isn't really doing a build because any build would have failed, and in fact if I do a build instead of publish, it does report the error(s). Do I have to remember to build before publishing to check for errors, or is there a way to get it to really for realz compile the code?

Upvotes: 1

Views: 965

Answers (1)

Yogesh
Yogesh

Reputation: 685

If solution has many projects then try building them one at a time.

Try below steps:

  • Restart Visual Studio.
  • Restart Computer
  • Rebuild all
  • Clean Solution then Rebuild All

Also you can check below

Setting the MSBuild project build output verbosity (in Options > Projects and Solutions > Build and Run setting area) to "Diagnostic" as shown below. This then showed that the custom action was what had failed.

https://blogs.msdn.microsoft.com/saraford/2008/10/07/did-you-know-you-can-configure-the-msbuild-verbosity-in-the-output-window-329/

Upvotes: 1

Related Questions