My application needs to print a Crystal Reports report. It does not show a preview, just takes two parameters and shows a print dialog to set the printer. It works fine on computers that have Crystal Reports installed, but I do not have a way to enforce clients have it already installed.
I have read in various places that adding the ClickOnce prerequisite "SAP Crystal Reports Runtime Engine for .NET Framework" would allow the required Crystal Reports libraries to be registered on the client. When installing the application on the client, it does download the runtime, and installs the runtime, but the application fails to install stating that various CrystalDecisions and CrystalReports assemblies must be registered in GAC.
The first is CrystalDecisions.ReportAppServer.CommonObjectModel. If I add a reference to this in the project and redeploy, then it just gives another message about another assembly. I literally did this 15 times, and never got a seamless install.
What am I missing? I followed this guide from the SAP website (zipped, 2.2 MB, contains a Microsoft Compiled HTML Help file, crnet_dg_2010_en.chm).
I had this problem: for Click-Once applications, you must download and install the 32-bit version of the Crystal Reports Runtime on the client regardless of the client computer's architecture. I ended up installing both the 32-bit and the 64-bit using the MSIs provided on SAP's site to cover all bases and make the GAC error to go away. Afterwards, everything ran smoothly.
Download and install the MSIs (not the executable) from here
FOR CLICK ONCE DEPLOYMENT
In addition to making SAP Crystal Reports Runtime a prerequisite, you need to modify the product.xml file on the development machine. This file is located in: {Program Files}\Microsoft SDKs\Windows\v*.0A\Bootstrapper\Packages\Crystal Reports for .NET Framework 4.0\
Find the following line and comment it out:
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>
Now, re-publish your solution and the setup should install both runtimes on 64-bit machines.
If the above solution didn't work try this,
Go into your project Properties.
Go to the Publish tab.
Click the Application Files button.
Change Publish Status from Prerequisites(auto) to Exclude any file with CrystalDecisions or BusinessObjects in the name.
Click OK
Rebuild your application, then republish it to your site or file share to be installed by your clients.
I found it in this location:
C:\Program Files (x86)\SAP BusinessObjects\BootStrapper\Packages\Crystal Reports for .NET Framework 4.0
C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages
Related
I have a VB.Net winforms application that it includes all the DLL in its BIN folder, i deploy it to the client's server everything works good without installing anything on each workstation.. i take a shortcut from the server..
the problem is when i try from any station to preview a crystal report file even tho i installed the runtimes on the server where the shortcut is located but it doesnt work without installing the runtime on each workstation
Any idea how to reference or load crystal report runtime from where the shortcut is located?
I have a C# application running on the .NET Framework 4.5 deployed via Microsoft ClickOnce. I also am utilizing a small utility from a Microsoft SDK called DComPerm.exe which is a C++ application that I had to compile separately. My main application uses Process.Start() to access this executable.
When I first tried running this on a client machine, I got an error message stating that VCRUNTIME140.dll was missing when the application tried to call DComPerm.exe.
This makes sense... since that program was compiled in C++ it needs the Visual C++ 2015 Redistributable package, which had not been installed on the client machine. I want to make this as painless as possible, so I was hoping I could bundle the VC++ 2015 Redist with my ClickOnce application. Under the project properties > Publish tab, there's a button for Prerequisites, which allows me to specify that the application should bundle the redistributable package.
That sounds great in theory, but it doesn't work. Now when I try to install my ClickOnce application on the client machine, it doesn't work. The installation fails and points me to a log file, which contains the following relevant information:
'Visual C++ "14" Runtime Libraries (x86)' RunCheck result: Install Needed
Installation of components 'Visual C++ "14" Runtime Libraries (x86)' was accepted.
Copying files to temporary directory "C:\Users\Owner\AppData\Local\Temp\VSD3872.tmp\"
Downloading files to "C:\Users\Owner\AppData\Local\Temp\VSD3872.tmp\"
(8/4/2016 12:57:48 PM) Downloading 'vcredist_x86\vcredist_x86.exe' from 'http://go.microsoft.com/fwlink/?LinkID=800028&clcid=0x409' to 'C:\Users\Owner\AppData\Local\Temp\VSD3872.tmp\'
Download completed at 8/4/2016 12:57:49 PM
Downloading failed with HRESULT=-2146697208
And that message makes it pretty clear what the problem is: the link that it's trying to use to download the redist package is dead. Only... I'm not sure how I can tell it to find the correct link. I'm quite surprised that it can't find it automagically as that seems like a bug with Visual Studio. Some searching revealed that the correct link is actually this one, but that's not what ClickOnce is resolving. I also saw that by checking the box this was the corresponding XML update to my csproj file:
<BootstrapperPackage Include="Microsoft.Visual.C++.14.0.x86">
<Visible>False</Visible>
<ProductName>Visual C++ "14" Runtime Libraries %28x86%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
Is there some XML tag I can use to specify the location explicitly? Or how else can I fix this? How can I bundle the redistributable without breaking my application?
I had pretty much the exact same problem. You asked how to specify the download location that ClickOnce resolves. In order to do that, open
C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\vcredist_x86\en\package.xml
and edit the attribute with Name="https://go.microsoft.com/fwlink/..." to the correct URL. By the way, thanks for finding the correct download link, I hadn't been able to find it until seeing this post.
The VC++ Redis installed correctly on the client's computer after doing this.
I have a ClickOnce WPF application. It was installing correctly until I changed ReportViewer from Version 10 to Version 11.
I know get the following error when trying to install:
The application requires that assembly Microsoft.ReportViewer.WinForms Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) First.
How do I fix this and still have it using ClickOnce, I can't do a manual install as the users don't have permissions; they only have permissions to use ClickOnce.
I tried changing the Microsoft.ReportViewer.WinForms.dll Publish status from Prerequisite to Include, but still the error persists.
I was able to get this to work on a machine with the same problem although I needed to download two .msi applications.
First I downloaded and installed SQLSysClrTypes. It is located here as it is needed to install report viewer.
Just click download, it'll take you onto a page with a scroll bar. SQLSysClrTypes is near the bottom. Just tick that and hit next, and you can download and install that.
I got report viewer from here.
After installing the both of them. I was able to grab from my ClickOnce with reportviewer 11 and it downloaded and ran successfully where previously I was having the exact same problem.
As an addendum, I was logged onto admin so this solution may not be the best if you don't have admin.
Add it as a prerequisite to the installer.
Right click your project and go to Properties.
Click the Publish tab.
Click Prerequisites....
Find Microsoft Visual Studio 2010 Report Viewer and check it. (There may be a different version available since the update, check for that.)
Upon installation of your application it will now download report viewer for the user.
If you go to the NuGet package manager, you can install the Microsoft.Winforms.ReportViewer 11 version from there. This will get all the dependent DLL files, and everything will be there.
My C# code loads a C++ DLL. It works fine on my PC, where Visual Studio 2008 is installed. But on other machines the program stop with an exception
Unhandeled exception: system.dllnotfoundexception unable to load dll ...
this application has failed becasue the application configuration is incorrect....
How can I make this code run on a machine that doesn't have VS 2008 installed?
You must distribute your DLL along with your project if it is a custom DLL of yours. If not, you must install the required DLL either with a custom installer or if it is from a different provider, a installer of them.
This post might be a bit older, but
DLL Files And .NET ClickOnce Deployment
I want to deploy one of my .NET apps as a ClickOnce application. The issue is that I am connecting to Oracle (see previous posts here and here). Connecting to Oracle requires at least, 4 DLL files that generally have to be in the same directory as the EXE file. The issue is that when the program is published, the DLLs are not referenced in any way, so the program won’t work.
Then I read about adding the files to the project, so that ClickOnce and the Publish processor will figure out that the DLLs are required and add them to the manifest.
Here is the process in Visual Studio 2005:
1. Put the 4 DLL files in their own directory in your solution directory (for ease of use mostly).
2. Add all four files to your project by going to “Project->Add Existing Item…”
3. Click on each DLL file in the solution explorer and then change their property: “Copy To Output Directory” to “Copy Always”.
That’s it! Now when I publish or even run the application I don’t have to worry about if the DLL files are where they should be.
in vs 2008 on project:
Properties>c/c++ >Runtime Library > choose: Multi-threaded Debug (/MTd)
I am working in .net 4.0, I need to create deployment setup in visual studio 2012 with all prerequisites like .netframework 4.0,sqlite etc.
when i create the setup in english (default), it is working good, means it is installing all the things properly on client machine.
But when i change the default language to french, it give an error
1: The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX40\dotNetFx40LP_Full_x86_x64fr.exe' in item 'Microsoft .NET Framework 4 (x86 and x64)' can not be located on disk. See Help for more information.
2: General failure building bootstrapper
3: Unrecoverable build error
Please help me, how can i remove this error.
Another thing is that when i change the settings for prerequisites like "download the prerequisites from the vendor's website", then it does not give an error.
But i need to install from local disk/folder including in setup folder.
It is necessary to place the file into the proper language directory.
Here, you're missing the \fr part in your path.
So you must place the file dotNetFx40LP_Full_x86_x64fr.exe to directory c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40\fr for 64 bit windows or to c:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40\fr for 32 bit windows.