简体   繁体   English

Visual Studio 2010,Visual Studio 2008和ClickOnce的Crystal Report

[英]Visual Studio 2010, Crystal Report for Visual Studio 2008 and ClickOnce

I'm in a bit of trouble here. 我在这里遇到了一些麻烦。 I upgraded one of our Winforms products from VS2008 to VS2010 about 4 weeks ago. 我大约4周前将我们的Winforms产品之一从VS2008升级到VS2010。 The conversion was fine but we used Crystal Reports so had to install the VS2010 Crsytal Reports for Visual Studio 2010 Beta 2. This was fine and gave me the designer etc. back for crystal. 转换很好,但我们使用了Crystal Reports,因此不得不为Visual Studio 2010 Beta 2安装VS2010 Crsytal报告。这很好,并且给了我设计师等回来的水晶。 I chose not to convert the reports when the solution opens so they are still setup for the original version of crystal. 当解决方案打开时,我选择不转换报告,因此它们仍然设置为原始版本的水晶。

We then continued with 4 weeks worth of development and now I come to do my first ClickOnce deploy under Vsiaul Studio 2010 and I'm having serious issues. 然后我们继续进行了为期4周的开发,现在我在Vsiaul Studio 2010下进行了第一次ClickOnce部署,我遇到了严重的问题。 ClickOnce Application files are set to having CrystalReports related modules as Prerequisites. ClickOnce应用程序文件设置为将CrystalReports相关模块作为先决条件。 I still want the end user to use the Crystal Reports for VS2008 rather than the runtime for 2010 which is ridiculously big and a beta. 我仍然希望最终用户使用Crystal Reports for VS2008而不是2010年的运行时,这是非常大的和beta版。

When I publish the manifest is saying that the dependency for crystal is on version 14.0.2000.0 (VS2010 version of crystal report) but all the DLL references in the projects are set to use specific version and to point to 10.5.3700.0 (VS2008 version of crystal report). 当我发布清单时,说水晶的依赖是版本14.0.2000.0(VS2010版本的水晶报告)但项目中的所有DLL引用都设置为使用特定版本并指向10.5.3700.0(VS2008版本的水晶报告)。 This means when trying to install from ClickOnce it fails saying: 这意味着当尝试从ClickOnce安装时,它失败了:

"Unable to install or run the application The application requires that assembly CrystalDecisions.CrystalReports.Engine Version 14.0.2000.0 be installed in the Global Assembly Cache (GAC) first)" “无法安装或运行应用程序应用程序需要首先在全局程序集缓存(GAC)中安装程序集CrystalDecisions.CrystalReports.Engine版本14.0.2000.0”

I can't work out why the manifest is intent on using that version number given all the references are pointing to another version. 我无法弄清楚为什么清单意图使用该版本号,因为所有引用都指向另一个版本。 If I bundle the VS2010 crystal runtimes that are beta into the ClickOnce deploy then the client gets the opposite error message saying that 10.5.3700.0 is required. 如果我将beta版的VS2010晶体运行时捆绑到ClickOnce部署中,则客户端会收到相反的错误消息,指出需要10.5.3700.0。 If I install 10.5.3700.0 on the client they get a working system but I have to install the 10.5.3700.0 version manually and before that they've first had to endure an epic install of the 2010 runtime (14.0.2000.0) which doesn't even get used. 如果我在客户端上安装10.5.3700.0,他们就会得到一个正常工作的系统,但我必须手动安装10.5.3700.0版本,之前他们首先必须忍受2010年运行时(14.0.2000.0)的史诗安装。甚至得到使用。

Essentially I am trying to get the manifest to say 10.5.3700.0 or figure out why VS2010 is intent on putting a newer version number in there. 基本上我试图让清单说10.5.3700.0或弄清楚为什么VS2010打算在那里放一个更新的版本号。

Please help. 请帮忙。 Thanks 谢谢

I converted the solution back to VS2008. 我将解决方案转换回VS2008。 Going back was relatively seamless. 回去相对无缝。 Since Crystal is in beta, the runtimes used to be ridiculously big, and I was losing large amounts of time on the ClickOnce deploys. 由于Crystal处于测试阶段,因此运行时间过于庞大,而且我在ClickOnce部署上失去了大量时间。 The rollback solved all three. 回滚解决了这三个问题。

I'm not happy about going back but the realities of using Crystal Reports in the year 2010 are pretty bad. 我不乐意回去,但在2010年使用Crystal Reports的现实非常糟糕。 I'll monitor progress from SAP as I know they are aiming to reduce runtimes this quarter and move out of beta. 我将监控SAP的进展,因为我知道他们的目标是减少本季度的运行时间并退出测试阶段。

Do you have the new CR stuff installed on your computer where you are building the application? 您是否在构建应用程序的计算机上安装了新的CR内容? If so, it's probably referencing the assemblies in the GAC. 如果是这样,它可能引用了GAC中的程序集。

You can try copying the assemblies you need into the project and setting the reference to point at the local copies, then on the reference set "copy local" to true. 您可以尝试将所需的程序集复制到项目中,并将引用设置为指向本地副本,然后将引用集“copy local”设置为true。 This will make sure it is referencing the local copies and not the ones in the GAC. 这将确保它引用本地副本而不是GAC中的副本。

If that doesn't work, I would try copying the prerequisite for the previous version of Crystal Reports from the VS2008 folder to the VS2010 folder. 如果这不起作用,我会尝试将先前版本的Crystal Reports的先决条件从VS2008文件夹复制到VS2010文件夹。 You will find the packages here: 你会在这里找到包裹:

C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v6.0A\\Bootstrapper\\Packages (64-bit machine) C:\\ Program Files(x86)\\ Microsoft SDKs \\ Windows \\ v6.0A \\ Bootstrapper \\ Packages(64位机器)
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Bootstrapper\\Packages C:\\ Program Files \\ Microsoft SDKs \\ Windows \\ v6.0A \\ Bootstrapper \\ Packages

Then close and reopen Visual Studio, and the old prerequisite should show up in VS and allow you to select it. 然后关闭并重新打开Visual Studio,旧的先决条件应该显示在VS中并允许您选择它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM