My solution runs fine locally.
When deploying it to Azure, I get an HTTP 500 when calling the site and I can see this exception in Application Insights:
System.InvalidOperationException: Can't find 'C:\home\site\wwwroot\GrpcCodeFirst.Api.deps.json'. This file is required for functional tests to run properly. There should be a copy of the file on your source project bin folder. If that is not the case, make sure that the property PreserveCompilationContext is set to true on your project file. E.g '<PreserveCompilationContext>true</PreserveCompilationContext>'. For functional tests to work they need to either run from the build output folder or the GrpcCodeFirst.Api.deps.json file from your application's output directory must be copied to the folder where the tests are running on. A common cause for this error is having shadow copying enabled when the tests run.
I tried and set the PreserveCompilationContext, rebuilt, and redeployed.
But still got the same result.
When looking at the Function App with Kudu, I can see GrpcCodeFirst.FunctionApp.deps.json, but not the file mentioned in the exception.
Thanks for this Lib :-)
My solution runs fine locally. When deploying it to Azure, I get an HTTP 500 when calling the site and I can see this exception in Application Insights:
System.InvalidOperationException: Can't find 'C:\home\site\wwwroot\GrpcCodeFirst.Api.deps.json'. This file is required for functional tests to run properly. There should be a copy of the file on your source project bin folder. If that is not the case, make sure that the property PreserveCompilationContext is set to true on your project file. E.g '<PreserveCompilationContext>true</PreserveCompilationContext>'. For functional tests to work they need to either run from the build output folder or the GrpcCodeFirst.Api.deps.json file from your application's output directory must be copied to the folder where the tests are running on. A common cause for this error is having shadow copying enabled when the tests run.
I tried and set the
PreserveCompilationContext
, rebuilt, and redeployed. But still got the same result.When looking at the Function App with Kudu, I can see
GrpcCodeFirst.FunctionApp.deps.json
, but not the file mentioned in the exception.Did you ever see this? Any idea how to fix it?
This is my code sample: https://github.com/thinktecture/blazor-wasm-grpc-code-first/tree/functionsapp
Thanks!