Microsoft.ReportViewer.WinForms.V15 not compatible with .NET Core 3.1 - How to show RDLC in WPF Core?

安稳与你 提交于 2021-02-18 18:57:49

问题


I have wpf core 3.1 project and installed Microsoft RDLC Report Designer extention on VS 2019 and created a rdlc file. Now I want to show that rdlc in a window but there is not ReportViewer control. I installed Microsoft.ReportViewer.WinForms v15 package from nuget but it shows error :

"Package 'Microsoft.ReportViewer.WinForms' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project."

How can we show a rdlc in wpf core?


回答1:


Hate to tell you but the answer is: you do not. THere is no known viewer. Please wait until .NET core is no more - which should happen in the unification in .NET 5 towards end of the year.

There is a lot of stuff .NET core has holes in at the moment. You stumbled on one.




回答2:


I wanted print A4 paper for invoice and customer contract , so I forgot ssrs and maked it by wpf print capability : https://github.com/Abel13/Invoice




回答3:


I've the same problem, and my working solution is to replace:

Microsoft.ReportViewer.WinForms

with:
lkosson reportviewercore




回答4:


i had the some prblm but i solved it by adding

Microsoft.ReportViewer.Common.dll and Microsoft.ReportViewer.WinForms.dll to your app folder welcome bro



来源:https://stackoverflow.com/questions/61673864/microsoft-reportviewer-winforms-v15-not-compatible-with-net-core-3-1-how-to-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!