Visual Studio 2015 에서 제작한 리포트뷰어를 Visual Studio 2019 (아마도 Visual Studio 2017 이상)에서 수정을 한 후 그대로 사용을 하면 에러를 발생한다.
The definition of this report is not valid or supported by this version of Reporting Services.
The report definition may have been created with a later version of Reporting Services,
or contain content that is not well-formed or not valid based on Reporting Services schemas.
Details: The report definition has an invalid target namespace
'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition'
which cannot be upgraded.
Visual Studio 2015 에서 작성한 리포트뷰어는 version 10.0 이고 아래 스키마를 사용하고
'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'
반면 Visual Studio 2019 에서 작성한 리포트뷰어는 version 15.0 이고 아래 스키마를 사용하기 때문이다.
'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition'
그렇다고 스키마를 변경한다고 해도 에러가 난다. 아래와 같이 진행해보자.
1. Nuget 관리자에서 Microsoft.ReportingServices.ReportViewerControl.WebForms 를 설치한다.
150.xxxx.x 버전으로 설치한다.

2. web.config 파일에서 reportviewer 관련된 부분에서 아래와 같이 모두 수정한다.
Version="15.0.0.0"
PublicKeyToken="89845DCD8080CC91"
3. 리포트뷰어 관련 aspx 파일 헤더를 변경한다.
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
마이크로소프트 Visual Studio Professional 2022 기업용 영구라이선스
COUPANG
www.coupang.com
이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.
'IT 소식 및 활용하기' 카테고리의 다른 글
최강 가성비 - 스노우맨100분3GB 1,980원 평생요금제 (0) | 2023.01.06 |
---|---|
레노버 P11 기본 설치 게임앱 삭제 (0) | 2022.04.28 |
레노버 P11 기본앱 제거 (0) | 2022.04.21 |
레노버 P11 구매 후기 (0) | 2022.04.11 |
갤럭시탭 A7 Lite 셀룰러(lte) 버전 구매 후기 (0) | 2022.03.08 |