I upgrade my project that have 2 classes library and one Mvc project to MVC Core 3.0 from 2.2 whit this page enter link description here
change .net
<TargetFramework>netcoreapp3.0</TargetFramework>
2.change like this
<ItemGroup> <!--<PackageReference Include="Microsoft.AspNetCore.App" />--> <!--<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />--> <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.0.0" /> <!--<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />--> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" /> </ItemGroup>
3.my satrtup.cs
`
app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseDefaultFiles(); app.UseCookiePolicy();app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapRazorPages(); });`
My program.cs
public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); });
but when I run my project get this error
This localhost page can’t be foundNo webpage was found for the web address: https://localhost:44374/ HTTP ERROR 404