Open Molinware opened 2 months ago
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">
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? Microsoft.NET.Sdk.Worker
?
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">
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?
Microsoft.NET.Sdk.Worker
?
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 .props
and .targets
file in the package to import the SDK like here
@corranrogue9
Shouldn't the nuget package automatically update the project's SDK?
I don't think that is a thing.
Or if not, include a
.props
and.targets
file in the package to import the SDK like here
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
Add FrameworkReference and oData in the .csproj file:
using System.Net; using Microsoft.AspNetCore.OData; using Microsoft.OData.Edm; using Microsoft.OData.ModelBuilder;
namespace TestePesquisaConsole;
internal class Program { static void Main(string[] args) { Host.CreateDefaultBuilder() .ConfigureWebHostDefaults( webHost => { webHost.UseStartup();
webHost.ConfigureKestrel(kestrel =>
{
kestrel.Listen(IPAddress.Any, 5900);
});
})
.Build()
.Run();
}
}
public class ClientePsqDto { [Key] public long Identificador { get; set; }
}