gpt4 book ai didi

c# - 如何在 Nant 0.91 中使用正则表达式调用 C#

转载 作者:行者123 更新时间:2023-11-30 15:03:57 26 4
gpt4 key购买 nike

在 Nant 0.85 中,您可以调用 C# 脚本,它会导入 System.Text.RegularExpressions 命名空间。现在在 0.91 中不再是这种情况,我似乎无法正确导入 System.Text.RegularExpressions。我尝试添加以下内容

<imports>
<import namespace="System.Text.RegularExpressions" />
</imports>

我看到 System.Text.RegularExpressions 被添加到 using 语句中,但我一直收到错误:

The type or namespace name 'RegularExpressions' does not exist in the namespace 'System.Text' (are you missing an assembly reference?)

最佳答案

您需要添加对 System.dll 的引用:

<references>
<include name="System.dll" />
</references>

关于c# - 如何在 Nant 0.91 中使用正则表达式调用 C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10952911/

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