我在dot-net core 3.0.100中创建了一个项目。但是我在尝试运行该项目时遇到了神秘的错误,这是在我安装了下面列出的一些软件包之后发生的。
- > Microsoft.AspNet.WebApi.Core 5.2.7 5.2.7
- > Microsoft.AspNetCore.Mvc 2.2.0 2.2.0
- > Microsoft.AspNetCore.Razor.Language 2.2.0 2.2.0
- > Microsoft.EntityFrameworkCore 3.1.0 3.1.0
- > Microsoft.EntityFrameworkCore.Design 3.1.0 3.1.0
- > Microsoft.EntityFrameworkCore.Tools 3.1.0 3.1.0
- > Npgsql.EntityFrameworkCore.PostgreSQL 3.1.0 3.1.0
- > Swashbuckle.AspNetCore 5.0.0-rc4 5.0.0-rc4
检测到错误的邮件
[![D:\AngularAdmin-panel\API\API.csproj : warning NU1701: Package 'Microsoft.AspNet.WebApi.Core 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.0'. This package may not be fully compatible with your project.
D:\AngularAdmin-panel\API\API.csproj : warning NU1701: Package 'Microsoft.AspNet.WebApi.Core 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.0'. This package may not be fully compatible with your project.
C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets(404,5): warning RAZORSDK1006: Detected Razor language version downgrade. This is typically caused by a reference to the Microsoft.AspNetCore.Razor.Design package. Consider removing this package reference. \[D:\AngularAdmin-panel\API\API.csproj\]
CSC : warning CS8034: Unable to load Analyzer assembly C:\Users\DEV4\.nuget\packages\microsoft.aspnetcore.mvc.analyzers\2.2.0\analyzers\dotnet\cs\Microsoft.AspNetCore.Mvc.Analyzers.dll : Assembly with same name is already loaded \[D:\AngularAdmin-panel\API\API.csproj\]
Startup.cs(29,16): error CS0246: The type or namespace name 'IConfigurtion' could not be found (are you missing a using directive or an assembly reference?) \[D:\AngularAdmin-panel\API\API.csproj\]
The build failed. Fix the build errors and run again.][1]][1]