Posted 1 May 2024, 6:46 pm EST
I am trying to add a Section Report to an existing ASP.NET MVC application written in .NET 8. I keep getting the error “Could not add all required packages to the project.”
Forums Home / ActiveReports / General Discussion
Posted by: carolynlschroeder on 1 May 2024, 6:46 pm EST
Posted 1 May 2024, 6:46 pm EST
I am trying to add a Section Report to an existing ASP.NET MVC application written in .NET 8. I keep getting the error “Could not add all required packages to the project.”
Posted 2 May 2024, 12:21 am EST
Hi Carolyn,
It would be difficult for us to comment on the issue with the current information. Please provide us with the following so that we can investigate the cause further and get back to you accordingly:
Posted 2 May 2024, 3:47 pm EST
I am using v18. I tried this in both VS 2022 and VS 2022 Preview and received the same error message. I was able to make it past the nuget package installation problems. Then I tried to move in a code based section report from a .NET 6 project where I used v16. It wouldn’t even compile. I am abandoning hope.
Posted 3 May 2024, 2:07 am EST
Hi Carolyn,
Could you please share with us your sample stripped-down application replicating the issue so that we can replicate it at our end and investigate it further?
Posted 3 May 2024, 3:55 am EST
I absolutely will not give you a sample project with my intellectual property. It is your job to provide sample projects. All I am asking is for the list of the nuget packages I need in order to compile a .NET 6 v16 code based section report in .NET 8 v18.
Posted 6 May 2024, 6:01 am EST
Hi Carolyn,
Try using the ActiveReports File Converter tool to upgrade all the required packages from ActiveReports 16 to ActiveReports 18. From the Visual Studio Tools menu, select Convert to ActiveReports 18 and it will update all the required dependencies and not cause a difference between versions. After that, clean and rebuild your project, and it should work.
Also, there have been a few breaking changes between ActiveReports 16 and ActiveReports 18. Please refer to the breaking changes for each version using the following links:
Also, please let us know about your ActiveReports use-case and what ActiveReports components (JSViewer, WebDesigner or ASP.NET WebViewer) you are using in your project so that we can provide you with the list of required packages based on that.
If the issue persists at your end, please share with us a screenshot of the error along with a very basic sample that reproduces the issue. We understand that sharing your original sample would not be feasible for you, but we would need a sample replicating the issue at our end in order to provide you with a solution.
Posted 6 May 2024, 3:10 pm EST
I tried the ActiveReports File Converter tool. It seemed to work fine for .NET 6. I am trying to bring these changes into my .NET 8 project but am getting errors with
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.5.0" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" /> <PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.5.0" />
I think I need these versions for MESCIUS.ActiveReports 18.0.0
The conflict comes with
I have tried downgrading this package to 18.0.0 without success.
I have tried to create a sample project for you starting with an Active Reports 6 code based section report but cannot open the designer in .NET Framework 4.8. It is failing with the error: The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: SampleReport — The base class ‘System.Void’ cannot be designed.
I have tried this both in Visual Studio Community 2022 17.9.6 and Visual Studio Community 2022 Preview 17.10.0 Preview 6.
Posted 7 May 2024, 12:41 am EST
Hi Carolyn,
>> I have tried to create a sample project for you starting with an Active Reports 6 code based section report but cannot open the designer in .NET Framework 4.8.
Please note that .NET 4.8 has been officially supported in ActiveReports 14 and onwards. Designing ActiveReports 6 reports in .NET 4.8 might not be possible as it is a legacy version. Please refer to the attached documentation link for ActiveReports 6 requirements: Requirements
>> I have tried this both in Visual Studio Community 2022 17.9.6 and Visual Studio Community 2022 Preview 17.10.0 Preview 6.
Visual Studio 2022 is officially supported in ActiveReports 15 and onwards only. For ActiveReports 6, please use Visual Studio 2005, 2008, or 2010.
Also, AFAIK, the ActiveReports 18 Code-Based Report report item is available for .NET Framework projects only and not .NET Core. We would suggest that you refer to the below-mentioned steps as a workaround to design code-based Section Reports in .NET Core:
Open Visual Studio and select the ActiveReports 18 Winforms Application template, which is a .NET Core project.
Select the Section report type.
In the Solution Explorer, right-click the solution node and go to Add > New Project.
Select the ActiveReports 17 Section report Application (code-based) template and configure the project for the target .NET Framework version.
In the Solution Explorer, right-click the .NET Core project and go to Add > Add Existing Item.
Navigate to the .NET Framework project and select the report file: SectionReport1.cs.
Select the Add As Link option to add the report files as a link.
Double-click the linked SectionReport1.cs (in the .NET Framework project) to open the ActiveReports Integrated Designer for the report.
Now design the report. You will observe that the modification of a report in the .NET Framework project leads to the modification of the report in the .NET Core project.
In the Form1_Load method of the .NET Core project, add the following code to load the code-based Section Report to the Viewer:
viewer1.LoadDocument(new SectionReport1());
Go to the Visual Studio Tools menu and select Convert to ActiveReports 18 to resolve any inconsistencies in versions of the packages.
After that, Clean and Rebuild your project to successfully design code-based Section Reports in .NET Core.
You may also refer to the attached sample, where we have implemented the same for you. If you still face any issues, please share your sample application that you created for testing or edit the attached sample so that it reproduces the issue and send it back to us so that we may investigate and get back to you accordingly.
Posted 7 May 2024, 10:52 am EST
I was finally getting my code based section report working in Active Reports 18 running in .NET 8. It was previously an Active Reports 16 code based section report (sorry for the typo above) running in .NET 6. The File Converter tool was the most helpful of any suggestions. That and a lot of guess work finally solved the problem.
Posted 7 May 2024, 11:41 pm EST
Hi Carolyn,
We are glad that your issue has been resolved! Feel free to get back to us if you face any issues or have any further questions, and we’ll be glad to assist!