gpt4 book ai didi

c# - 使用 ImageGen 时出现类型或 namespace 错误

转载 作者:行者123 更新时间:2023-12-04 17:00:48 24 4
gpt4 key购买 nike

我正在使用 ImageGen 显示图像,我添加了 ImageGen.ashx 并添加了 ImageGen 的配置文件,并在 webconfig 上添加了一些设置:

<configSections>
<section name="ImageGenConfiguration" type="ImageGen.ImageGenConfigurationHandler,ImageGen" />
</configSections>
<ImageGenConfiguration configSource="config\ImageGen.config" />

但是当我尝试编译它时会出现错误:

找不到类型或命名空间名称“ImageGen”(您是否缺少 using 指令或程序集引用?)C:\Ergo\ImageGen.ashx 12
ImageGen.ashx 是:
<%@ WebHandler Language="c#" Class="RequestHandler" %>

公共(public)类 RequestHandler : System.Web.IHttpHandler
{
public bool IsReusable
{
得到 { 返回假; }
}
public void ProcessRequest(System.Web.HttpContext context)
{
ImageGen.ImageGenQueryStringParser parser = new ImageGen.ImageGenQueryStringParser();
parser.Process(context);
parser = null;
}

}

任何意见或建议将不胜感激,干杯

最佳答案

您是否将 ImageGen.dll 复制到您的 bin 文件夹并在项目中引用它?

克里斯

关于c# - 使用 ImageGen 时出现类型或 namespace 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7660193/

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