Share via


How to install Microsoft.SqlServer.Diagnostic.STrace v 10.0.0.0 on a customer PC ?

Question

Friday, August 27, 2010 8:48 AM

Hello.

Following my previous post regarding this issue with VS2008, I have converted my ClickOnce Winform application to VS 2010 and Framework 4.0, hoping the need to manually install this dll on the customer machine (Windows XP SP3) will disappear. Unfortunately no. After having downloaded Windows Installer 4.5 and .NET Framework 4, and rebooted twice, the program still claim for this dll in the Global Assembly Cache.

Is there an additional required component that I have to tick in the required component list (projet property, publish tab) in order to do so automatically?

Or is it really necessary to install this dll manually in the GAC? If yes : where can I take it? How can I install it in the GAC (I have never done such a task)?

Thank you in advance,

Gilbert

All replies (4)

Tuesday, August 31, 2010 3:22 AM âś…Answered | 1 vote

Hi Gilbert,

Another way to add the referenced assemblies to the ClickOnce deployment is adding them as common data files to the project. When it is installed by a customer, they will be copied to the application directory. You could follow the thread below to add files to a project:
http://social.msdn.microsoft.com/Forums/en/winforms/thread/bc343b47-7c74-415a-8abd-39348c047960

ClickOnce does not support GAC installation directly. A workaround is to create a Setup Project, add the 'Global Assembly Cache Folder' special folder in the File System view and add the assemblies(dlls) to that folder. Then we can create a custom prerequisite of the msi package generated by the Setup Project created just now and add this prerequisite to the ClickOnce(Publish tab-> Prerequisites button).
To create a Setup Project:
http://msdn.microsoft.com/en-us/library/ms235317(VS.80).aspx
To create a custom prerequisite:
http://www.codeproject.com/KB/aspnet/Add_Custom_Prerequisite.aspx

Let me know if this helps or not.
Aland Li

MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact [email protected]

 

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.


Monday, August 30, 2010 9:31 AM

Hi Gilbert,

The assembly below is not contained in .Net framework 4 so the issue cannot be fixed by installing it. However, we can solve the issue in another way: Set the 'Copy Local' property of all the referenced libraries which are related to sqlserver to true. Then these dlls will be included in the ClickOnce deployment. You could take a look at the feedback below:
http://connect.microsoft.com/VisualStudio/feedback/details/524869/unable-to-deploy-vsto-referencing-sql-smo-after-installing-vs2010

Regards,
Aland Li

MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact [email protected]

Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.


Monday, August 30, 2010 1:58 PM

Hi Aland.

Thank you for your reply. I had already read the link you gave me, but they do not explain how to install the dll's in the GAC, therefore my current post.

So, what I did after having read your answer :

  1. I listed the references in the Solution explorer.
  2. I right-clicked on each reference beginning with "Microsoft.SqlServer." (ConnectionInfo, Management.Sdk.Sfc, Smo) / Properties / Local copy set from False to True.
  3. I published the project again.

However that does not solve my issue, because the customer PC continues to claim for the dll...

Regards,

Gilbert


Tuesday, August 31, 2010 12:24 PM

Hi Aland.

Thank you for your reply. I have done what you recommended, and it works well.

To summarize in a single place for other readers:

  1. Create a new project (can be in a new solution) of type "Setup project".
  2. Add the 'Global Assembly Cache Folder' special folder in the File System view and add the necessary assemblies (dlls) to that folder (in my case only one assembly was necessary: Microsoft.SqlServer.Management.SmoMetadataProvider.dll, it called all the others. This assembly can be found in C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.Management.SmoMetadataProvider.
  3. Generate this project.
  4. Execute "Bootstrapper Manifest Generator" (can be downloaded from http://code.msdn.microsoft.com/bmg).
  5. Menu File / New
  6. Select "Package Manifest".
  7. Type a project name.
  8. Click on the "Add Install File" icon (top left) and browse to the msi file you just generated at step 3.
  9. Give a display name (will appear in the requisite list) and click on the "Build" icon (top left).
  10. Restart Visual Studio. Your msi is now displayed in the Requisite Components list under the name you gave at step 9. Tick it and publish.

Regards,

Gilbert