【问题标题】:Reference XtraReport in Dotnet Core application在 Dotnet Core 应用程序中引用 XtraReport
【发布时间】:2019-08-21 14:15:43
【问题描述】:

我想创建一个 dotnet 核心控制台应用程序,它应该使用 DevExpress XtraReport 创建 pdf 报告。

如何在我的 csproj 中引用 devexpress dll

非常感谢

编辑: 该项目针对 net462

这是我的csproj

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net462</TargetFramework>
    <OutputType>Exe</OutputType>
  </PropertyGroup>

  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Https" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.2" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="wwwroot/" />
  </ItemGroup>

  <ItemGroup>
    <Content Include="Properties/**">
        <CopyToPublishDirectory>Always</CopyToPublishDirectory>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="tempkey.rsa">
        <CopyToPublishDirectory>Always</CopyToPublishDirectory>
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

</Project>

【问题讨论】:

    标签: devexpress .net-core


    【解决方案1】:

    参考这个 - Reporting support for .Net core

    这里很难谈论可能的估计,就像 NET Core 2.0 所做的那样 不支持 System.Drawing,Sörnt。此刻,一切 .NET Standard 2.0 中可用的是一些绘图原语,仅此而已 (见差异)。另一方面,实现自定义绘图库 适用于任何可能的目标 .NET 平台是一个非常 复杂的任务——我会说这和做一份新的报道一样难 引擎从头开始。是的,有一些绘图的替代方案 (例如,Mono 的 gdipluslib),但它们有很多兼容性问题 我们需要处理,更何况有些领域(如实际 印刷)根本不包括在内。当然,要兼容 .NET Standard 是我们期待的东西,但也有 仍然缺少我们的引擎严重依赖的部分。不用说, .NET Core 的发展速度比 旧版 .NET Framework,因此我们很有可能会看到更多和 corefx 团队很快就会提供更多功能/API。

    .net 核心应用程序尚不支持它。在 asp.net 核心应用程序中可能有一些解决方法。请参阅下面的参考链接。

    参考资料:
    XtraReports in .NET Core
    XtraReports for ASP.NET Core
    Reporting support for .Net core

    【讨论】:

      【解决方案2】:

      【讨论】:

      • 即使你的目标是net462?
      • .net core 应用程序可以针对 .net core 1、net core 1.1 和 net core 2。不是 net462
      • 我以 net462 为目标,因为我使用的是 Entity Framework 6(核心不支持 Oracle)。我把我的 csproj 放在了 OP 中
      • 所以这不是 dotnet 核心。它是 aspnet 核心。
      • 你说得对,对不起。那么可以参考XtraReport吗?
      猜你喜欢
      • 2018-12-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-16
      相关资源
      最近更新 更多