title: How to access build warnings in a post-build event in Visual Studio?
body: <p><strong>General task</strong>. My task is to make a build (of a set of <em>C#</em> projects) failed if there exists such DLLs which were not found and thus were not copied to the output folder. It seems that a corresponding warning is not a warning of a compiler, thus I cannot provide a warning code to the "Treat warnings as errors" option in Visual Studio. The workaround I found is to use <em>MsBuild</em> like it is described <a href="https://stackoverflow.com/questions/17495278/how-can-i-treat-msb3245-could-not-resolve-reference-warning-as-an-error">here</a>. However I still cannot find any solution for building with a <em>Visual Studio</em>.</p>
  
  <p><strong>Question</strong>. Is there a way to obtain a build log and especially build warnings in a post-build event in <em>Visual Studio</em> and make the build failed if some exact warnings exist?</p>
  
  <p><strong>What I looked at</strong>. Looked <a href="https://stackoverflow.com/questions/36336900/check-for-build-errors-in-visual-studio-post-build-step">here</a>, but suggested macro is not a convinient solution.
  According to <a href="https://msdn.microsoft.com/en-us/library/jj651643.aspx" rel="nofollow noreferrer">this</a> and <a href="https://stackoverflow.com/questions/11526552/what-is-the-default-location-for-msbuild-logs">this</a> <em>Visual Studio</em> does not save build logs for <em>C#</em> projects.</p>
  
  <p><strong>More specific</strong>. I have been asked to provide information about the specific warning which I want to make an error of. This is "MSB3245: Could not resolve this reference. Could not locate the assembly..."</p>