in Service Manager

Include DLL Files in Management Pack Bundle with Visual Studio Authoring Extensions (VSAE)

Since I am mostly using Visual Studio with Authoring Extensions to design Management Packs, I was happy to find an easy way to add external dll resource files to a Management Pack Bundle.

Marcel Zehner wrote a nice blog post about creating a custom CI class with VSAE.

When I was working on a project for which I had to design some custom Service Manager Console forms I had to bundle a DLL file which contained the custom forms with the Management Pack .

This could have been done by just build the Management Pack in Visual Studio and afterwards create the Management Pack bundle with Fastseal.exe to include appropriate the DLL file.

However this is pretty annoying if you are developing forms and (in my case) constantly changing Management Packs and testing things in Service Manager Console.

To make things easier you can reference the DLL (or any other) file in your Service Manager 2012 Management Pack Visual Studio Project. Simply right-click on “References” and choose “Add Reference”. You are now able to browse to the DLL file you want to bundle with your Management Pack.

Add reference

Referenced DLL file

Go to the properties of the newly added File and change “Package To Bundle” to “True”

Reference properties

Now the file is going to be bundled with the Management Pack if you have chosen to “Generate sealed and signed management pack” in the properties of the project.

Build properties

Happy authoring 🙂

Stefan

Write a Comment

Comment

  1. Hi,

    I am using Visual Studio 2013 Ultimate with System Center 2012 Visual Studio Authoring Extensions. While creating new Service Manager 2012 R2 management which references my assembly (custom forms), the assembly is not included in the bundle.

    Steps:
    •File | New Project > Service Manager 2012 R2 Management Pack (.NET Framework 3.5).
    •Create new class, folder, view, type projections…
    •Add custom assembly (WPF User Control, while adding a warning is displayed that assembly or one of it dependencies requires a later version of the .NET Framework than the one specified in the project. Assembly was build referencing .NET Framework 3.5 so I ignore the warning).
    •Set assembly property Package To Bundle to True.
    •As part of the management pack I also bundle bitmap image (Build Action: Embedded Resource).

    Managment pack builds successfully but it DOES NOT contain my assembly. It does however contain the bitmap resource. What am I doing wrong

    Thanks for any suggestions,

    Blaz

Webmentions

  • How to create a custom SCSM console task by using some C# and XML magic :-) March 13, 2015

    Hi,

    I am using Visual Studio 2013 Ultimate with System Center 2012 Visual Studio Authoring Extensions. While creating new Service Manager 2012 R2 management which references my assembly (custom forms), the assembly is not included in the bundle.

    Steps:
    •File | New Project > Service Manager 2012 R2 Management Pack (.NET Framework 3.5).
    •Create new class, folder, view, type projections…
    •Add custom assembly (WPF User Control, while adding a warning is displayed that assembly or one of it dependencies requires a later version of the .NET Framework than the one specified in the project. Assembly was build referencing .NET Framework 3.5 so I ignore the warning).
    •Set assembly property Package To Bundle to True.
    •As part of the management pack I also bundle bitmap image (Build Action: Embedded Resource).

    Managment pack builds successfully but it DOES NOT contain my assembly. It does however contain the bitmap resource. What am I doing wrong

    Thanks for any suggestions,

    Blaz

  • How to create a custom SCSM console task by using some C# and XML magic :-) | scsmlab March 13, 2015

    Hi,

    I am using Visual Studio 2013 Ultimate with System Center 2012 Visual Studio Authoring Extensions. While creating new Service Manager 2012 R2 management which references my assembly (custom forms), the assembly is not included in the bundle.

    Steps:
    •File | New Project > Service Manager 2012 R2 Management Pack (.NET Framework 3.5).
    •Create new class, folder, view, type projections…
    •Add custom assembly (WPF User Control, while adding a warning is displayed that assembly or one of it dependencies requires a later version of the .NET Framework than the one specified in the project. Assembly was build referencing .NET Framework 3.5 so I ignore the warning).
    •Set assembly property Package To Bundle to True.
    •As part of the management pack I also bundle bitmap image (Build Action: Embedded Resource).

    Managment pack builds successfully but it DOES NOT contain my assembly. It does however contain the bitmap resource. What am I doing wrong

    Thanks for any suggestions,

    Blaz