-
Notifications
You must be signed in to change notification settings - Fork 161
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
$metadata endpoint does not work when creating the host from a Console Application #1306
Comments
This is very interesting.... I personally had no idea the SDK had that kind of influence in the application side. Out of curiosity, does it work if you use the Worker SDK? |
Tested! Doesn't work too... |
FYI: https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview The difference between "Microsoft.NET.Sdk" and "Microsoft.NET.Sdk.Web": |
Shouldn't the nuget package automatically update the project's SDK? Or if not, include a |
I don't think that is a thing.
But the question is "what is missing exactly"? Why does the metadata controller only work on the Web SDK? I would be careful with any attempted solution before we fully understand that bit. |
Assemblies affected
ASP.NET Core OData 9.0.0
Describe the bug
Creating a console application then adding a WebHost to it containing oData, makes the /$metadata endpoint to not be created, generating a 404 - NotFound.
Reproduce steps
Data Model
EDM (CSDL) Model
404 - NotFound
Request/Response
http://localhost:5900/Pesquisa/$metadata
404 - NotFound
Expected behavior
Return the metadata
Additional context
In the project file if I change the Project Sdk it works:
Doesn't Work:
<Project Sdk="Microsoft.NET.Sdk">
Works:
<Project Sdk="Microsoft.NET.Sdk.Web">
The text was updated successfully, but these errors were encountered: