So I'm working on an msbuild custom task to run as "AfterPublish" to restart some services after the publish completes. This will be in a Nuget package. The user has to add the custom task to their NetSDK project file and provide some parameters. If the parameters are not valid the custom task does a Log.Error call. While testing using Visual Studio 2022 and the Publish panel I see that on my machine this always causes a diagnostic log to be generated and the attached dialog put out.
 The log file isn't useful - it is about an exception regarding Microsoft.WebTools.Shared.Exceptions.WebToolsException. The error message that is generated by the custom task is what the user has to fix. I think this diagnostic log will cause confusion if users see it. Of course, if you run msbuild as a command line there is no issue, this is Visual Studio behavior. I have my message level for Build set at "minimal" in Visual Studio options. My question: is this normal, or did I sometime in a previous life turn on some diagnostics to cause these logs to be generated? Anyway to stop this behavior? Just putting in garbage in a source unit so that it doesn't compile also generates this dialog and diagnostic log during publish. Builds work, this is just Publish behavior. |