我需要在没有Visual Studio的情况下运行项目。所以我读到它可以通过dotnet命令运行。但是当我尝试像这样运行它时-使用
dotnet运行--project ProjectName.csproj
它使我犯了这些错误。
C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj : error NU1100: Unable to resolve 'Microsoft.VisualStudio.Web.CodeGeneration.Tools (>= 2.0.2)' for '.NETCoreApp,Version=v2.2'.
C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj : warning NU1603: RemotePcWeb depends on Microsoft.AspNetCore.All (>= 2.0.5) but Microsoft.AspNetCore.All 2.0.5 was not found. An approximate best match of Microsoft.AspNetCore.All 2.2.0 was resolved.
C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj : warning NU1603: RemotePcWeb depends on Microsoft.NETCore.App (>= 2.0.0) but Microsoft.NETCore.App 2.0.0 was not found. An approximate best match of Microsoft.NETCore.App 2.2.0 was resolved.
C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj : error NU1100: Unable to resolve 'Microsoft.jQuery.Unobtrusive.Ajax (>= 3.2.6)' for '.NETCoreApp,Version=v2.0'.
C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj : error NU1100: Unable to resolve 'Microsoft.VisualStudio.Web.CodeGeneration.Design (>= 2.0.2)' for '.NETCoreApp,Version=v2.0'.
C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj : error NU1100: Unable to resolve 'Newtonsoft.Json (>= 12.0.2)' for '.NETCoreApp,Version=v2.0'.
C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj : error NU1100: Unable to resolve 'System.Drawing.Common (>= 4.5.1)' for '.NETCoreApp,Version=v2.0'.
C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj : error NU1100: Unable to resolve 'ZKWeb.System.Drawing (>= 4.0.1)' for '.NETCoreApp,Version=v2.0'.
C:\Program Files\dotnet\sdk\2.2.107\NuGet.targets(114,5): error : Value cannot be null. [C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj]
C:\Program Files\dotnet\sdk\2.2.107\NuGet.targets(114,5): error : Parameter name: path [C:\Users\Student\Desktop\RemotePc\RemotePcWeb\RemotePcWeb.csproj]
我什至运行dotnet restore --force,尝试了另一个.net核心sdk,但没有任何效果。我了解我需要还原nuget软件包,但我读到dotnet restore应该可以做到这一点,但事实并非如此。有人可以帮我吗?谢谢