当您尝试update-database
或add-migration
时,在VS 2019以及ASP.NET Core 2.2和Entity Framework的最新更新中会发生此问题。它只能在HP Omen笔记本电脑上显示,而可以在Lenovo上使用。
The specified deps.json [...] does not exist
。它试图在bin\Debug\netcoreapp2.2
处找到项目目录中的x.deps.json。
我尝试了以下解决方案,但没有解决:
Platform: MCD
-在我的笔记本电脑上根本不存在; bin\Debug\netcoreapp2.2
-> bin\MCD\Debug\netcoreapp2.2
; dotnet ef database update -v
。请注意,此有效,但在VS中仍然无效。尝试这些解决方案后,我还重新启动了机器。
我的.csproj文件:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Binance.Net" Version="4.2.2" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.6" />
<PackageReference Include="Hangfire.Core" Version="1.7.6" />
<PackageReference Include="Hangfire.SqlServer" Version="1.7.6" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
<PackageReference Include="NSwag.AspNetCore" Version="13.0.6" />
</ItemGroup>
</Project>
我的环境变量:
PS C:\WINDOWS\system32> ls env:
Name Value
---- -----
ALLUSERSPROFILE C:\ProgramData
APPDATA C:\Users\Admin\AppData\Roaming
ChocolateyInstall C:\ProgramData\chocolatey
ChocolateyLastPathUpdate Fri Feb 1 21:10:26 2019
CommonProgramFiles C:\Program Files\Common Files
CommonProgramFiles(x86) C:\Program Files (x86)\Common Files
CommonProgramW6432 C:\Program Files\Common Files
COMPUTERNAME DESKTOP-VB77N85
ComSpec C:\WINDOWS\system32\cmd.exe
DriverData C:\Windows\System32\Drivers\DriverData
DXSDK_DIR C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\
HOMEDRIVE C:
HOMEPATH \Users\Admin
LOCALAPPDATA C:\Users\Admin\AppData\Local
LOGONSERVER \\DESKTOP-VB77N85
NUMBER_OF_PROCESSORS 12
OneDrive C:\Users\Admin\OneDrive
OS Windows_NT
Path C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Boxstarter;C:\Program Files (x86)\Com...
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
PROCESSOR_ARCHITECTURE AMD64
PROCESSOR_IDENTIFIER Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
PROCESSOR_LEVEL 6
PROCESSOR_REVISION 9e0a
ProgramData C:\ProgramData
ProgramFiles C:\Program Files
ProgramFiles(x86) C:\Program Files (x86)
ProgramW6432 C:\Program Files
PSModulePath C:\Users\Admin\Documents\WindowsPowerShell\Modules;C:\ProgramData\Boxstarter;C:\Progr...
PUBLIC C:\Users\Public
QtMsBuild C:\Users\Admin\AppData\Local\QtMsBuild
SystemDrive C:
SystemRoot C:\WINDOWS
TEMP C:\Users\Admin\AppData\Local\Temp
TMP C:\Users\Admin\AppData\Local\Temp
USERDOMAIN DESKTOP-VB77N85
USERDOMAIN_ROAMINGPROFILE DESKTOP-VB77N85
USERNAME Admin
USERPROFILE C:\Users\Admin
VS100COMNTOOLS C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
windir C:\WINDOWS
我尝试了在github / stackoverflow / Google搜索中找到的所有内容。我不知道怎么了由于dotnet命令有效,因此我认为它可能来自环境变量。
有什么想法吗?我可以使用dotnet命令作为解决方案,但最好通过VS进行修复。