Visual C# Developer Center > Visual C# Forums > Visual C# IDE > Using VB powerpack controls in C# projects
Ask a questionAsk a question
 

AnswerUsing VB powerpack controls in C# projects

  • Monday, October 26, 2009 9:48 AMSimon Heffer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I came across a 'line shape' that seemed useful for my C# project. It was only afterwards I realised it was part of  Visual Basic PowerPacks. Do I have to install an extra dll/assembly along with my exe when deliverying the application?

Answers

All Replies

  • Monday, October 26, 2009 10:18 AMthomas_woelfer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    yes, you'll need to install the powerpack. (however, there's a bootstrapper package for easy installation.)

    WM_HOPETHISHELPS
    -thomas woelfer
    http://www.die.de/blog
  • Monday, October 26, 2009 10:31 AMSimon Heffer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks Thomas.

    I'm presuming this controls have appeared in my C# project because I have VB included in my VS installation (I just installed everything).

    So do I already have this bootstrapper package , anyone know how I can identify it?

    Of course it would have been better if the project had automatically bundled it up somehow as it does with the other controls in my project ;) or given me some warning, ho hum...
  • Monday, October 26, 2009 11:10 AMSimon Heffer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I've installed VisualBasicPowerPack3Setup.exe but the app is still not finding the assembly. any ideas gratefully received!
  • Monday, October 26, 2009 1:54 PMMarcel Roma Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Take a look at the Publish pane of the project designer. Click the 'Prerequisites...' button. This should open a dialog where you can look for available Microsoft Visual Basic PowerPacks (1.1/3.0).

    The packages are installed under %programfiles%\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages.

    The files for the controls are installed to the GAC.

  • Monday, October 26, 2009 2:06 PMthomas_woelfer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    >> Of course it would have been better if the project had automatically bundled it up somehow as it does with the other controls in my project

    well it _did_ add a reference to that library to your project, or otherwise you wouldn't be able to compile.

    so incase you have a setup project in visual studio for your app, it will also add the assembly to the setup as an automatically detected dependecy. i _think_ the preferred method to install it is to add the bootstrapper to your setups prerequisites.

    WM_HOPETHISHELPS
    -thomas woelfer


    http://www.die.de/blog
  • Monday, October 26, 2009 2:15 PMSimon Heffer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks both.

    Found the bootstrapper but as I said the app still couldn't find the assembly.
    Now the installer chaps say running an exe from within an MSI makes their life too complicated ;)

    I've chickened out and removed the line.

    Thanks anyway for your efforts.
    Si
  • Monday, October 26, 2009 2:44 PMMarcel Roma Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    the app still couldn't find the assembly.
    How could the assembly be found, if it never was installed to the GAC...   ;-)
  • Thursday, October 29, 2009 3:11 AMJi.ZhouMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hello Simon,

    Have you fixed the issue? As far as I know, to deploy a C# application with VB.NET PowerPacks component using msi, we just need to,
    1.Right click the setup project and click the Property
    2.In the property dialog, click the Prerequisites button
    3.In the Prerequisites dialog, just select the "Microsoft Visual Basic PowerPacks 1.2"

    After that, if you deploy your application to the target machine, you can find
    Microsoft.VisualBasic.PowerPacks.Vs
    Microsoft.VisualBasic.PowerPacks.Package
    in the target machine's GAC (typically in C:\Windows\Assembly)
    See more information in,
    http://msdn.microsoft.com/en-us/library/7eh4aaa5(VS.100).aspx

    The bootstrapper just detect the desired component and install it for us. Of course, you can download and install it manually too.
    http://www.microsoft.com/downloads/details.aspx?FamilyId=371368A8-7FDC-441F-8E7D-FE78D96D4063&displaylang=en

    Have a nice day!

     

    Ji Zhou

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Friday, October 30, 2009 1:56 PMSimon Heffer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks Ji Zhou.

    The first proposal won't work as I'm not deploying the application. The app's part of a larger product and the installer tech's someone else's problem. They prefer a 'merge module' to an .exe for pre-reqs - not my area so I bow to their greater knowledge. Anyway it's all for the sake of one line shape on one form so I just removed it. I guess I may revist this if I need to make more use of the VB stuff.

    Thanks again,
    Simon