dotnet-try 想要访问钥匙串中的密钥“tmp...”。我应该授予它访问权限吗?

问题描述 投票:0回答:1

我正在观看 YouTube 上的 LINQ 简介视频,该视频要求我们安装 dotnet-try。因此,安装它并按照说明从空目录运行

dotnet try demo
。它会打开一个浏览器窗口
https://localhost:<port-num>
并弹出一个窗口显示

dotnet-try 希望在您的钥匙串中访问密钥“tmp...”。 要允许此操作,请输入“登录”钥匙串密码。

这合法吗?我打开 Keychain Access 并搜索该密钥,但它不在那里。任何地方都没有名称以

"tmp"
开头的键。

keychain dotnet-tool
1个回答
0
投票

我的电脑也遇到类似的情况,问题已通过以下步骤解决:

环境:

操作系统:Win 11

.NET SDK:已安装.NET Core 3.0 SDK、.NET Core 3.1 SDK、.NET 6.0 SDK、.NET 8.0 SDK。

1.确保您安装了最新版本的“dotnet try”工具。

如果使用命令“dotnet tool install -g dotnet-try”安装它,则需要先卸载它:

dotnet tool uninstall -g dotnet-try

如果使用命令“dotnet tool install -g Microsoft.dotnet-try”安装它,则需要先卸载它:

dotnet tool uninstall -g Microsoft.dotnet-try

然后使用以下命令安装最新版本的“dotnet try”: dotnet 工具安装-g --add-source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" Microsoft.dotnet-try

在Windows中,建议以管理员权限在“cmd”中运行以上命令。

2.确保您安装了.NET 3.0和.NET 3.1 SDK

您可以运行以下命令来检查:

dotnet --list-sdks

如果您没有安装它们,请从下面的链接下载并安装它们。

https://dotnet.microsoft.com/en-us/download/dotnet/3.0 https://dotnet.microsoft.com/en-us/download/dotnet/3.1

注意:目前.NET core 3.1 SDK的版本为“3.1.416”。

3.使用 git shell 使用以下命令克隆代码

git clone https://github.com/dotnet/try-samples

4.在“try-samples”文件夹的根目录下创建global.json:

内容如下:

{
  "sdk": {
    "version": "3.1.416"
  }
}

注意:此处的版本“3.1.416”应与步骤2中的相同。

5.尝试使用“dotnet try verify”命令编译它

cd try-samples/
dotnet try verify

如果没有发生异常,请跳至下面的下一步。 否则尝试从所有 .csproj 文件中删除对包“System.CommandLine.Experimental”的引用。

6.运行“dotnet try”命令在浏览器中打开网页:

dotnet try ".\101-linq-samples"

7.尝试网络上的示例。

愿对你有帮助。


参考资料:

https://github.com/dotnet/try/blob/main/DotNetTryLocal.md

https://github.com/dotnet/try/issues/938#issuecomment-1023604536

© www.soinside.com 2019 - 2024. All rights reserved.