简体   繁体   English

DevExpress 错误缺少 using 指令或程序集引用

[英]DevExpress error is missing a using directive or an assembly reference

I am working with mvc and DevExpress trying to force a download of a report that I already have created我正在使用 mvc 和 DevExpress 试图强制下载我已经创建的报告

I have the following error:我有以下错误:

The type or name of the 'Reports' namespace does not exist in the 'BLL.Reportes' namespace (missing any assembly reference?) “BLL.Reportes”命名空间中不存在“Reports”命名空间的类型或名称(缺少任何程序集引用?)

My code C#我的代码 C#

public ActionResult Test()
    {

        var report = new BLL.Reportes.SolicitudReporte(); <--- error
        var stream = new MemoryStream();
        report.ExportToPdf(stream);
        var cd = new System.Net.Mime.ContentDisposition
        {
            FileName = "ReportTest.pdf",
            Inline = false,
        };
        Response.AppendHeader("Content-Disposition", cd.ToString());
        return File(stream.ToArray(), "application/pdf");
    }

If I am using my reference to my project called "BLL"....如果我使用我对名为“BLL”的项目的引用....

在此处输入图片说明 在此处输入图片说明

Try to remove the reference and add it again with the visual studio function:尝试删除引用并使用 Visual Studio 功能再次添加它: 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM