Monday, 6 December 2010

Type projections, views and unsealed MP's

I was in the process of creating a view to show all Computers, basically a replica of the view under Configuration Items, but within my own management pack.

However, when I went to use the Computer (typical) type project for my view I got this error message:


This happens because the type projection for Computer (typical) is stored in the unsealed MP ServiceManager.ConfigurationManagement.Configuration.xml
This then means that trying to reference this type projection for views in your own MP is impossible without a bit of tweaking.

It's a fairly easy workaround though, simply recreate the type projection in your own MP.
the XML you will need is:

<TypeProjection ID="AllComputers.View.ProjectionType" Accessibility="Public" Type="Windows!Microsoft.Windows.Computer">
<Component Path="$Context/Path[Relationship='ConfigurationManager!Microsoft.SystemCenter.ConfigurationManager.DeployedComputerRunsWindowsComputer' SeedRole='Target']$" Alias="PhysicalComputer" />
<Component Path="$Context/Path[Relationship='Windows!Microsoft.Windows.ComputerHostsOperatingSystem']$" Alias="OperatingSystem" />
</TypeProjection>

You'll need to make sure you've got some references in as well, either use these, or if you've already got them referenced, change the code above to match your reference:

<Reference Alias="Windows">
<ID>Microsoft.Windows.Library</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>

<Reference Alias="ConfigurationManager">
<ID>Microsoft.SystemCenter.ConfigurationManager</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>

Finally, add a display string and make sure you change the name so that it differs from the built in type projection "Computers (typical)".

<DisplayString ElementID="AllComputers.View.ProjectionType">
<Name>Computer (typical - for custom views)</Name>
<Description>Defines the properties of computers typically used in views</Description>
</DisplayString>

17 comments:

mahendar cherry said...

We use USB device to transfer data into our PC and Laptops
www.windowslibrary.org/

Game Hacker said...


Game Hacker is an android app which is very popular that is used to hack or manipulate many popular games.
game hacker download

Eric Luster said...

MsMpEng.exe AntiMalware Service Executable is the core process of Windows Defender’s background process, Learn How to stop it from eating your system resources.
Antimalware Service Executable – High Usage Fix

Seth Rollins said...


Gangstar Vegas is an open world action-adventure video game developed by Gameloft for Android, iOS.
gangstarvegasmodapk.me

antimalware service executable said...

I found very interesting and nice keep sharing awesome shared
disable antimalware service windows 10

The Fresh Images said...


Don't forget to check out https://thefreshimages.com/krishna-images.html on The Fresh Images.

Sophie Grace said...

I found very interesting and nice keep sharing awesome shared html color picker

kanu said...

amazing post man get url

kanu said...

amazing post man icloud for windows

kanu said...

amazing post man aaron spin rewriter

kanu said...

amazing post man cvs myhr login

badmanlive said...

It's surprising you aren't more popular given that you definitely possess the gift.
kerala lottery today result

kanu said...

Great aptoide apk

kanu said...

Amazing Achieve3000 Login www.achieve3000.com login portal

kanu said...

Great icloud.com sign in

kanu said...

Amazing free Cloud storage services

kanu said...

nice post....Install Aptoide iOS