here was the original msg :
dotnet add myproject.csproj package Microsoft.AspNetCore -v 5.0.0-preview.5.*---> "Unable to find package Microsoft.AspNetCore with version (>= 5.0.0-preview.5)"
nuget is still a complete joke of a tool
.net 5 should not be allowed to come out until you fix the horribleness of nuget
aspnetcore 3.0was released 2019-09-23
cmdthat is invalid as you are trying to add something not existing
Microsoft.NET.Sdk.Webis not the true fix, it's a way bigger change, if fact that
SDKis doing a
FrameworkReferenceunder the hood
Microsoft.NET.Sdk.WebSDK will tell the compiler that you are not doing a ClassLib but a "Web" project (hence the
netstandardanymore, it only target
netcoreapp 3.x or 5.x? => make sure to target
<FrameworkReference Include="Microsoft.AspNetCore.App" />
2,xand maybe need
netstandard? => multiple
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks> </PropertyGroup> <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'"> <FrameworkReference Include="Microsoft.AspNetCore.App" /> </ItemGroup> <ItemGroup Condition=" '$(TargetFramework)' != 'netcoreapp3.0'"> <PackageReference Include="Microsoft.AspNetCore.Mvc.Cors" Version="2.1.3" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Formatters.Json" Version="2.1.3" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" /> </ItemGroup> </Project>
Microsoft.NET.Sdk.Webjust imports this? https://github.com/dotnet/sdk/blob/3e4ea07af4f44b89db53293490baee600229fdc7/src/WebSdk/Web/Sdk/Sdk.props
@Meai1 I have no idea what's you are trying to acheive but given this :
They already created a hugely complicated system called nuget and now they cant even put an http server into it.
I would say that you are not familiar at all with
dotnet in general right ?
Do you need help to understand how it actually work ?
Works properly for few millions of project to create
AspNetCore also work pretty well
And the tooling is VERY intuitive and easy to use