Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openApi is not reachable when calling from the azure #665

Open
TonyWuAGL opened this issue Aug 6, 2024 · 1 comment
Open

openApi is not reachable when calling from the azure #665

TonyWuAGL opened this issue Aug 6, 2024 · 1 comment

Comments

@TonyWuAGL
Copy link

Describe the issue
when I try to call the swagger endpoint no matter is RenderSwaggerUI or RenderSwaggerDocument is all return messages: "Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified." However is worked in the local environment. And been looking inside the code from function app, nowhere has been used Microsoft.VisualStudio.TestPlatform.ObjectModel

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Azure Function'
  2. Click on 'RenderSwaggerUI' under Functions
  3. Click on 'Get Function URL' under Functions and copy the URL from _master (Host key)
  4. See error

Expected behavior
Show swagger ui page.

Environment (please complete the following information, if applicable):

  • OS: Windows
  • Browser chrome
  • Version latest
@CNBoland
Copy link

We ran into similiar issue. For us, the problem was that our deployment pipeline was publishing the entire VS solution to an output folder (no longer supported. check your build log far a related warning). This included unit tests and all their dependencies. We solved the problem by changing the pipeline to publish only the Function App project (e.g. dotnet publish .\FunctionApp1).

That you're seeing an assembly load error on something named *.TestPlatform.* in the deployed application is a tell that you may have the same problem we did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants