This project has moved. For the latest updates, please go here.

Custumization references

Topics: Support Requests
Jun 9, 2014 at 2:55 PM
Hi Guys, I've downloaded the source code but cannot build solution as Customization reference is missing, any ideas where I could get it?
Coordinator
Jun 10, 2014 at 7:57 AM
The customization reference is not part of the Project; you can remove all references or you can get the dll from an existing Installation...
Jun 10, 2014 at 9:01 AM
Ok thank you. I have few more errors when trying to build the solution maybe you could give me a clue?

Warning 1 Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string' C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\Controls\WMIBrowser.xaml.cs 100 29 SCCMCliCtr
Warning 2 Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string' C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\Controls\WMIBrowser.xaml.cs 238 29 SCCMCliCtr
Error 4 The name 'SCCMCliCtr' does not exist in the current context C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\MainPage.xaml.cs 49 36 SCCMCliCtr
Error 5 The name 'SCCMCliCtr' does not exist in the current context C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\MainPage.xaml.cs 54 21 SCCMCliCtr
Error 6 The name 'SCCMCliCtr' does not exist in the current context C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\MainPage.xaml.cs 54 63 SCCMCliCtr
Warning 3 The variable 'ex' is declared but never used C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\Controls\CollectionVariables.xaml.cs 93 42 SCCMCliCtr


Plus I guess Plugin_CMResourceExplorer.dll
Explorer.dll, SelUpdate.dll and Opensource.pfx is only for licensed users?

Thanks
Coordinator
Jun 10, 2014 at 9:11 AM
The Reference to SCCMCliCtr in your Errors are references to the customization library; So either add the library or change the code...

Yes, the Plugins are not part of the Open-Source Project, but I can give you an example of a plugin if you want to build your own...


Roger
Jun 10, 2014 at 9:20 AM
That would be great! :) I'll try to build my own with your examples.
Jun 10, 2014 at 10:12 AM
Coordinator
Jun 10, 2014 at 10:39 AM
Edited Jun 10, 2014 at 10:40 AM
1) Create a WPF User Control Library. The Namespace must start with "AgentActionTool_" and the Name of the DLL must start with "Plugin"

2)WPF Code Example (You have to reference the RibbonControlsLibrary):
<UserControl x:Class="AgentActionTools.AgentActionTool_Test"
             xmlns:rib="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="100">
    <Grid VerticalAlignment="Top" HorizontalAlignment="Left">
            <rib:RibbonButton Name="btOpenTest" Label="Test" ToolTip="Start Test" SmallImageSource="Images/test.ico" Click="btOpen_Click" VerticalAlignment="Top" HorizontalAlignment="Left" HorizontalContentAlignment="Center" />
    </Grid>
</UserControl>
3) C# Code:
using sccmclictr.automation;

namespace AgentActionTools
{
    /// <summary>
    /// Interaction logic for UserControl1.xaml
    /// </summary>
    public partial class AgentActionTool_Test : UserControl
    {
        public AgentActionTool_Test()
        {
            InitializeComponent();
        }

        private void btOpen_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Type t = System.Reflection.Assembly.GetEntryAssembly().GetType("ClientCenter.Common", false, true);
                System.Reflection.PropertyInfo pInfo = t.GetProperty("Agent");
                SCCMAgent oAgent = (SCCMAgent)pInfo.GetValue(null, null);
                string sHost = oAgent.TargetHostname;
        
        //Custom Code here 

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }

        }
    }
}
Jun 10, 2014 at 10:53 AM
Edited Jun 10, 2014 at 11:21 AM
Very Nice, thank you!

I have one last (I hope) question. Still failing to build the code. I get this error:

Error 1 The command ""C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool" sign /n "Open Source Developer" /d "Client Center for Configuration Manager" /t "http://timestamp.comodoca.com/authenticode" "C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\obj\Debug\SCCMCliCtrWPF.exe"" exited with code 9009. C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\qc30xe0h.tmp_proj 380 5 SCCMCliCtr

Google tells me this is related to location, but when I place signtool to the location needed I get an error:
no certificates were found that met all the given criteria.


Or maybe I could get the password for OpneSource.pfx?

Thank you for your help.
Developer
Jun 10, 2014 at 12:00 PM
Hi,

Just edit the "Signing" under settings and untick the options for both signing options there.

Regards
Mattias
Jun 10, 2014 at 12:14 PM
Did not help

Error 1 No certificates were found that met all the given criteria. C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\EXEC SCCMCliCtr
Error 2 The command ""C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\signtool" sign /n "Open Source Developer" /d "Client Center for Configuration Manager" /t "http://timestamp.comodoca.com/authenticode" "C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\obj\Debug\SCCMCliCtrWPF.exe"" exited with code 1. C:\DEV\sccmclictr-30140 (4)\SCCMCliCtrWPF\SCCMCliCtrWPF\vgm0ijv4.tmp_proj 383 5 SCCMCliCtr


Tried rebuilding with no luck :(
Coordinator
Jun 10, 2014 at 12:18 PM
... edit SCCMCliCtrWPF.csproj and remove these lines... These are postbuild Events to sign the compiled files. It's not using the OpenSource.pfx (you can delete this reference).
Jun 10, 2014 at 12:27 PM
You guys rock!