Starts in:
1 DAY
19 HRS
5 MIN
48 SEC
Starts in:
1 D
19 H
5 M
48 S
Open Closed

Integration devexpress reports and getting Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0 error #8148


User avatar
0
mian.tayyab@innoppia.pk created

Hello Support Team,

We're working on a project using ABP.IO V8 and .NET 8, with an Angular frontend. The backend utilizes a DDD architecture and MS SQL Database.

We've integrated DevExpress reports into the backend but are encountering the following error.

{ "error": "Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.", "result": null, "success": false }

When we tested a standalone .NET 8 project without ABP, the simple static report worked fine.

We suspect there may be issues with the ABP framework or some missing configuration. Could you please assist us with this matter?


16 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share a test project?

    Thanks

    liming.ma@volosoft.com

  • User Avatar
    0
    mian.tayyab@innoppia.pk created

    Hello Maliming,

    Thank you for getting back to me. I've shared the test repository here:

    https://github.com/tayyab48/abp_v8_devexpress_reports_v24

    You'll find three reports within it: one static and two utilizing an object data source.

    Note: We've successfully used the same codebase for ABP v7 and DevExpress 23 in a separate project with no issues.

    Your swift reply would be greatly appreciated.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Hi

    Please make your repos private and invite github.com/maliming

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you add your DevExpress.Reporting.Core nuget source to Github?

    I can't restore packages.

    Also, why do you use the DLL Reference in Host.csproj?

  • User Avatar
    0
    mian.tayyab@innoppia.pk created

    Hi, I made the repository to private and share it with you. Secondly, You would find a folder "References", I added the DevExpress.Reporting.Core nuget source and related DLL's to run the project.

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you add the nuget source?

    https://nuget.devexpress.com/

  • User Avatar
    0
    mian.tayyab@innoppia.pk created

    I suggest to you install reports from following Devexpress Link. https://go.devexpress.com/DevexpressDownload_UniversalTrial.aspx

    There is only one Package related to DevExpress which I added with nuget devexpress.reporting.core v24.1.6

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, I will try that;.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    abp_v8_devexpress_reports_v24\aspnet-core\src\Innoppia.DevExpressReports.HttpApi.Host> dotnet run

    I can run the HttpApi.Host project without error. Do I need other steps to reproduce?

  • User Avatar
    0
    mian.tayyab@innoppia.pk created

    Hi, to reproduce the error, you need to run both projects backend and frontend and click "Static report" front-end side. I have attached error screenshot. You can also check the error from console of backend.

    Kindly solve it at your earliest. Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, I will try this.

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please update your Innoppia.DevExpressReports.HttpApi.Host as follows:

    <Project Sdk="Microsoft.NET.Sdk.Web">
    
      <Import Project="..\..\common.props" />
    
      <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <Nullable>enable</Nullable>
        <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
        <RootNamespace>Innoppia.DevExpressReports</RootNamespace>
        <PreserveCompilationReferences>true</PreserveCompilationReferences>
      </PropertyGroup>
    
      <PropertyGroup Condition=" '$(RunConfiguration)' == 'Innoppia.DevExpressReports.HttpApi.Host' " />
      <ItemGroup>
        <PackageReference Include="AspNetCore.HealthChecks.UI" Version="8.0.0" />
        <PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.0" />
        <PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="8.0.0" />
        <PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
        <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
        <PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.4" />
        <PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="8.0.4" />
        <PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="8.0.4" />
        <PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" Version="8.3.2" />
        <PackageReference Include="Volo.Abp.Autofac" Version="8.3.2" />
        <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="8.3.2" />
        <PackageReference Include="Volo.Abp.Swashbuckle" Version="8.3.2" />
        <PackageReference Include="Volo.Abp.Account.Pro.Public.Web.OpenIddict" Version="8.3.2" />
        <PackageReference Include="Volo.Abp.Account.Pro.Public.Web.Impersonation" Version="8.3.2" />
    	<PackageReference Include="DevExpress.Reporting.Core" Version="24.1.6" />
          <PackageReference Include="System.ServiceModel.Primitives" Version="8.0.0" />
      </ItemGroup>
    
      <ItemGroup>
        <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX" Version="3.2.0" />
      </ItemGroup>
    
      <ItemGroup>
        <ProjectReference Include="..\Innoppia.DevExpressReports.Application\Innoppia.DevExpressReports.Application.csproj" />
        <ProjectReference Include="..\Innoppia.DevExpressReports.EntityFrameworkCore\Innoppia.DevExpressReports.EntityFrameworkCore.csproj" />
        <ProjectReference Include="..\Innoppia.DevExpressReports.HttpApi\Innoppia.DevExpressReports.HttpApi.csproj" />
      </ItemGroup>
    
      <ItemGroup Condition="Exists('./openiddict.pfx')">
        <None Remove="openiddict.pfx" />
        <EmbeddedResource Include="openiddict.pfx">
          <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </EmbeddedResource>
      </ItemGroup>
    
      <ItemGroup>
        <Compile Remove="Logs\**" />
        <Content Remove="Logs\**" />
        <EmbeddedResource Remove="Logs\**" />
        <None Remove="Logs\**" />
      </ItemGroup>
    
    	<ItemGroup>
    		<Reference Include="DevExpress.AspNetCore.Common.v24.1">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.AspNetCore.Common.v24.1.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.AspNetCore.Core.v24.1">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.AspNetCore.Core.v24.1.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.AspNetCore.Reporting.v24.1">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.AspNetCore.Reporting.v24.1.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.Utils.v24.1">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.Utils.v24.1.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.Web.Reporting.v24.1.Common.Services">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.Web.Reporting.v24.1.Common.Services.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.Web.Resources.v24.1">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.Web.Resources.v24.1.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.Web.v24.1">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.Web.v24.1.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.XtraReports.v24.1">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.XtraReports.v24.1.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.XtraReports.v24.1.CodeCompletion">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.XtraReports.v24.1.CodeCompletion.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.XtraReports.v24.1.Extensions">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.XtraReports.v24.1.Extensions.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.XtraReports.v24.1.Service">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.XtraReports.v24.1.Service.dll</HintPath>
    		</Reference>
    		<Reference Include="DevExpress.XtraReports.v24.1.Web">
    			<HintPath>C:\Program Files\DevExpress 24.1\Components\Bin\NetCore\DevExpress.XtraReports.v24.1.Web.dll</HintPath>
    		</Reference>
    	</ItemGroup>
    
    </Project>
    
    
  • User Avatar
    0
    mian.tayyab@innoppia.pk created

    Its working. Thanks,

    Is there way out to use AppService Method as a datasource ? Do you any example of using AppService?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    There is no example of this. I'm not familiar with DevExpress

  • User Avatar
    0
    mian.tayyab@innoppia.pk created

    Hi,

    I am getting following errors. Report is trying to get data from AppService or Class in Application project.

    Report <---> DataSource Class <---> AppService Class

    Although I Implemented UnitOfWork in DataSource. Please check the attachments

    Is there any work around to fix it?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You should use the async method.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06