title: Publishing an Azure function returns "Publish has encountered an error" path \bin does not exist
body: <p>I'm trying to publish my first test function to Azure functions.  When I publish I get the error:</p>
  
  <pre><code>Publish has encountered an error.
  Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details. 
  
  A diagnostic log has been written to the following location:
  "C:\Users\me\AppData\Local\Temp\tmp2C29.tmp"
  </code></pre>
  
  <p>The contest of that file say it was an unknown error, check the output log.</p>
  
  <p>When I look at my output window I see this:</p>
  
  <pre><code>2&gt;Unhandled Exception: System.IO.DirectoryNotFoundException: The path `D:\Dev\FunctionsTest-master\custom-binding\obj\Debug\netstandard2.0\PubTmp\Out\bin` does not exist. Unable to generate Azure Functions extensions metadata file.
  2&gt;   at ExtensionsMetadataGenerator.ExtensionsMetadataGenerator.Generate(String sourcePath, String outputPath, Action`1 logger) in D:\src\gh.fabiocav\azure-functions-host\tools\ExtensionsMetadataGenerator\src\ExtensionsMetadataGenerator.Console\ExtensionsMetadataGenerator.cs:line 25
  2&gt;   at ExtensionsMetadataGenerator.Console.Program.Main(String[] args) in D:\src\gh.fabiocav\azure-functions-host\tools\ExtensionsMetadataGenerator\src\ExtensionsMetadataGenerator.Console\Program.cs:line 28
  2&gt;Metadata generation failed.
  </code></pre>
  
  <p>I looked and the ...\PubTmp\Out\bin folder is not where it's being compiled.  The actual folder is \PubTmp\Out\ (one folder higher).</p>
  
  <p>I don't see any way of changing the folder location, I tried under properties of the function - build, but that path is the top level; not the final path.</p>
  
  <p>I also don't see any way of selecting where the publish is looking for the compiled functions to publish.</p>
  
  <p>How do I get these locations to be the same for the publish to work?</p>