提问人:Frank Lombard 提问时间:11/2/2023 最后编辑:Frank Lombard 更新时间:11/2/2023 访问量:14
无法在 DirectML 存储库中还原 Nuget 包
Can't Restore Nuget Packages in DirectML repo
问:
我正在尝试让“HelloDirectML”示例正常工作,但我收到一个错误,指出 需要还原 Nuget 包。我尝试使用控制台进行还原,当您右键单击 Visual Studio 中的解决方案或项目文件时,它没有“还原 Nuget”菜单选项。因此,我无法运行示例。
那么,如何恢复此类项目的 nuget 包呢?
当我尝试在 Visual Studio 2022 中生成 HelloDirectML 解决方案时,我得到:
1>------ 生成已开始:项目:HelloDirectML,配置:调试|手臂------ 1>E:\Repos\DirectML\Samples\HelloDirectML\HelloDirectML.vcxproj(445,5):错误:此项目引用此计算机上缺少的 NuGet 包。使用 NuGet 包还原下载它们。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 packages\Microsoft.Windows.ImplementationLibrary.1.0.220914.1\build\native\Microsoft.Windows.ImplementationLibrary.targets。 ========== 构建:0 次成功,1 次失败,0 次最新,0 次跳过==========
我尝试了控制台还原和安装软件包
PM> NuGet\Install-Package Microsoft.Windows.ImplementationLibrary - 版本 1.0.231028.1
响应:
NuGet\Install-Package:找不到项目“默认”。 在第 行:1 字符:1
- NuGet\Install-Package Microsoft.Windows.ImplementationLibrary -Versio ...
-
+ CategoryInfo : ObjectNotFound: (Default:String) [Install-Package], ItemNotFoundException + FullyQualifiedErrorId : NuGetProjectNotFound,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
dotnet 添加包 Microsoft.Windows.ImplementationLibrary --version 1.0.231028.1
响应:
在 中找不到任何项目。E:\Repos\DirectML\
答: 暂无答案
评论