gpt4 book ai didi

C# 交互式窗口不会引用我的代码

转载 作者:太空狗 更新时间:2023-10-30 01:00:27 24 4
gpt4 key购买 nike

在 Visual Studio 2017 中,我试图在 c# 交互窗口中运行一些代码。这适用于非常简单的情况(例如使用系统)但是,当我尝试引用稍微晦涩的库时,它失败了

using Microsoft.AspNetCore.Cryptography.KeyDerivation;

(1,17): error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

这是一个 dot net core 2.0 项目,有人建议我可以右键单击该项目并选择“初始化与项目的交互”,但是这个选项在项目或解决方案上都没有出现。

我需要知道如何为交互窗口添加对代码库的引用。

最佳答案

  1. 通过导航到“ View > 其他窗口 > C# 交互”打开交互窗口

  2. 右键单击您的项目并选择“初始化与项目交互”

enter image description here

关于C# 交互式窗口不会引用我的代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46198760/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com