Error installing Report Viewer in Visual Studio 2019, my project structure is incompatible.

Emerson Medeiros 21 Reputation points
2021-04-07T14:39:14.13+00:00

When installing Report Viewer in Visual Studio 2019, it gives the following error:

"The package 'Microsoft.ReportingServices.ReportViewerControl.Winforms 150.1449.0' was restored using
'.NETFramework, Versão = v4.6.1, .NETFramework, Versão = v4.6.2, .NETFramework, Versão = v4.7, .NETFramework, Versão = v4.7.1, .NETFramework, Version = v4.7.2, .NETFramework, Version = v4.8 ' instead of the target structure of the project ' net5.0-windows7.0 '. This package may not be fully compatible with your project. "

I have already researched a lot and did not get the solution.

Can you help me can you help me?

I understood that the structure of my project is
net5.0-windows7.0 it's the Report Viewer is for up .NETFramework, Version = v4.8.
But in the Visual Studio 2019 gives no option to
.NETFramework, Versão = v4.8, only .net 5.0, core 3.1 and core 3.0.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,799 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,569 questions
0 comments No comments
{count} votes

Accepted answer
  1. Karen Payne MVP 35,036 Reputation points
    2021-04-07T15:09:56.527+00:00
    2 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Lukas Yu -MSFT 5,816 Reputation points
    2021-04-08T08:09:28.463+00:00

    Hi,

    Karen has give you proper solution. I think it should work for your environment.

    I am curious why you can't create .Net Framwork project? What kind project are you trying?

    You could in your visual studio installer find and check the .Net Framework developing tools as :
    85627-image.png


  2. Emerson Medeiros 21 Reputation points
    2021-04-08T17:16:35.647+00:00

    Excellent Karen!
    I started my project by choosing the wrong option.
    I'll redo it from the beginning but it will be worth it.
    Thank you very much!

    I chose this option:
    85887-captura-de-tela-2021-04-08-140941.png

    Where should I have chosen this:

    85820-captura-de-tela-2021-04-08-140600.png

    0 comments No comments