I get the following error when I try to publish.
1>------ Build started: Project: FunctionApp, Configuration: Release Any CPU ------
1>FunctionApp -> D:\Repositories\signalr-service-quickstart-serverless-chat\src\chat\csharp\bin\Release\netstandard2.0\bin\FunctionApp.dll
2>------ Publish started: Project: FunctionApp, Configuration: Release Any CPU ------
2>FunctionApp -> D:\Repositories\signalr-service-quickstart-serverless-chat\src\chat\csharp\bin\Release\netstandard2.0\bin\FunctionApp.dll
2>FunctionApp -> D:\Repositories\signalr-service-quickstart-serverless-chat\src\chat\csharp\obj\Release\netstandard2.0\PubTmp\Out\
2>
2>Unhandled Exception: System.IO.DirectoryNotFoundException: The path `D:\Repositories\signalr-service-quickstart-serverless-chat\src\chat\csharp\obj\Release\netstandard2.0\PubTmp\Out\bin` does not exist. Unable to generate Azure Functions extensions metadata file.
2> 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> 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>Metadata generation failed.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
Contents of tmp file:
12/3/2019 9:50:05 AM
System.AggregateException: One or more errors occurred. ---> System.Exception: Publishing failed.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.Publish.Framework.Model.DefaultPublishSteps.<>c__DisplayClass26_0.<IsBuildCompletedSuccessfully>b__2()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Publish.Framework.Model.DefaultPublishSteps.<DefaultCorePublishStep>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__202.MoveNext()
---> (Inner Exception #0) System.Exception: Publishing failed.<---
System.Exception: Publishing failed.
===================
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@lordlycastle, Thanks for the question! We are taking a look into this and will get back to you soon.
@lordlycastle,
I tried to repro your scenario and I was able to publish without any issues.
As I was unable to repro your scenario, I was wondering if have you tried creating the directory manually in the bin/debug directory ?
If you tried creating it manually, that might be why you are seeing this error because you need to created the directory path from inside the code and see if that helps.
Also take a look at this doc for more reference : DirectoryNotFoundExceptionClass
I hope this information helps.
Please feel free to revert back with any questions you might have regarding this matter.
@lordlycastle ,
Have you tried the above options that I have mentioned?
If so, what message did you get after trying to publish ?
Please respond back to us so we can investigate further and help you resolve your issue.
I hope to hear back from you soon.
@lordlycastle , Since we haven't heard back from you, We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.