You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行dotnet build遇NU1101错误:找不到WebEid.Security包

解决WebEid.Security包找不到及本地集成问题

问题说明

执行dotnet build时触发错误:

error NU1101 : Unable to find package 'WebEid.Security'. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget, nuget.org, web-eid.js

已定位到WebEid.Security的源码,但尝试通过发布获取dll、添加文件路径到包管理器的方式均未成功集成。


方法一:本地打包NuGet包并安装

  • 克隆WebEid.Security源码到本地
  • 进入源码的src/WebEid.Security目录
  • 执行打包命令生成NuGet包:
    dotnet pack -c Release
    
    打包完成后,bin/Release目录下会生成WebEid.Security.x.x.x.nupkg格式的文件
  • 切换到示例项目目录,执行以下命令安装本地包(替换[包所在目录路径]为实际的.nupkg文件所在目录):
    dotnet add package WebEid.Security --source "[包所在目录路径]"
    
    也可以在Visual Studio中,通过NuGet包管理器添加本地源,再搜索安装该包

方法二:直接添加项目引用

  • 克隆WebEid.Security源码到本地,建议和示例项目放在同一父目录下
  • 打开示例项目的.csproj文件,添加如下项目引用节点(替换路径为实际的WebEid.Security项目文件路径):
    <ItemGroup>
      <ProjectReference Include="../web-eid-authtoken-validation-dotnet/src/WebEid.Security/WebEid.Security.csproj" />
    </ItemGroup>
    
  • 保存文件后,在示例项目目录执行dotnet restore,再运行dotnet build即可完成构建

内容的提问来源于stack exchange,提问作者Rikako

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.03 05:42:12