我正在尝试将具有两个rptproj项目的解决方案部署到本地SSRS ReportServer:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe" \
"C:\Users\Documents\Reports\Reports.sln" /target:Deploy /p:TargetServerUrl=http://localhost/ReportServer /p:configuration="Release" /p:Username="MYSERVER\ReportDeployer" /p:Password=sOmepAsSwoRD
rdl文件的构建成功,但是在尝试部署时,几乎立即失败,并显示以下消息:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Reporting Services\Microsoft.ReportingServices.MS
Builder.targets(30,5): error : : Could not connect to the report server http://localhost/ReportServer. Verify that t
he TargetServerURL is valid and that you have the correct permissions to connect to the report server.
我已验证ReportServer正在运行,并且可以使用在/ p:Username和/ p:Password中提供的凭据来访问它,并且该用户对该ReportServer的根文件夹具有所有权限。这些报告已经在Visual Studio中发布了很多次-VS仅显示凭据弹出窗口,然后成功。
我还尝试了wget,它成功通过了身份验证并加载了ReportServer页面:
wget http://localhost/ReportServer --user "MYSERVER\ReportDeployer" --password sOmepAsSwoRD
--2019-03-22 23:11:19-- http://localhost/ReportServer
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Basic realm="localhost"
Reusing existing connection to [localhost]:80.
HTTP request sent, awaiting response... 200 OK
Length: 574 [text/html]
Saving to: 'ReportServer.1'
ReportServer.1 100%[===================================================>] 574 --.-KB/s in 0s
2019-03-22 23:11:19 (11.4 MB/s) - 'ReportServer.1' saved [574/574]
MSBuild有什么问题?如何使其与本地ReportServer一起使用?
我还尝试了devenv.com命令行
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.com" "C:\Users\Documents\Reports\Reports.sln" /deploy
希望它会显示更详细的错误信息。但似乎忽略了deploy命令和输出:
------ Build started: Project: Reports, Configuration: Release ------
Build Build complete
...
------ Skipped Deploy: Project: Reports, Configuration: Release ------
Project not selected to build for this solution configuration
========== Build: 2 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 2 skipped ==========
为什么说“开始构建”,而如果我在Visual Studio中运行“部署”,则输出“部署开始”并确实部署了项目?
然后如何自动执行SSRS项目部署?