question

ParallelsDeviceMgmt-1681 avatar image
2 Votes"
ParallelsDeviceMgmt-1681 asked Jason-MSFT edited

Stuck migrating to new style console extension (Configuration Manager 2103).

having tried to add our custom node in Assets and Compliance.

Here is the node xml (its minimalistic version which reproduces the problem):

 <?xml version="1.0" encoding="utf-8"?>
 <!-- SCCM Console / Assets and Compliance / Parallels Device Management -->
 <RootNodeDescription Id="ParallelsManagementAdd-on" SearchFolderId="ParallelsManagementAdd-on" DisplayName="Parallels Device Management" Description="Manage Mac computers and Parallels Desktop.">
   <ViewAssemblyDescriptions>
     <ViewAssemblyDescription>
       <Assembly>AdminUI.HomePageView.dll</Assembly>
       <Type>Microsoft.ConfigurationManagement.AdminConsole.HomePageView.ViewDescription</Type>
       <CustomData>
         <HomePageConfigurationData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
           <TileList>
             <TileDescription ShowGenericGettingStartedTile="true" />
           </TileList>
         </HomePageConfigurationData>
       </CustomData>
     </ViewAssemblyDescription>
   </ViewAssemblyDescriptions>
 </RootNodeDescription>

As a result: the node itself did appeared (on the left side of console window), but the expected node view (on the right side) is not shown.

Also we have the following entry in SmsAdminUI.log:

 [11, PID:9572][07/22/2021 16:19:19] :The 'AssemblyPath' assembly (C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\Extensions\91269007-78e9-4cc6-85dc-a5305acb4d39\10.0\bin\AdminUI.HomePageView.dll) was not found.\r\nSystem.IO.FileNotFoundException\r\nCould not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\Extensions\91269007-78e9-4cc6-85dc-a5305acb4d39\10.0\bin\AdminUI.HomePageView.dll' or one of its dependencies. The system cannot find the file specified.\r\n   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
    at System.Reflection.Assembly.LoadFrom(String assemblyFile)
    at Microsoft.ConfigurationManagement.AdminConsole.Common.UtilityClass.LoadAssemblyByName(String assemblyName, Boolean reflectOnly)\r\n

So, the question is What are we doing wrong?

Thanks.

mem-cm-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jason-MSFT avatar image
0 Votes"
Jason-MSFT answered Jason-MSFT edited

Hi @ParallelsDeviceMgmt-1681. I've looped in the dev team to review and upon initial review, the issue is familiar although they are investigating. The initial thought is to update your Assembly node to reference the DLL using a full path that makes use of an environment variable:

 <Assembly>%SMS_ADMIN_UI_PATH%\AdminUI.HomePageView.DLL</Assembly> 

instead of just

 <Assembly>AdminUI.HomePageView.DLL</Assembly>


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jason-MSFT avatar image
1 Vote"
Jason-MSFT answered Jason-MSFT edited

After some more review, the above doesn't appear to work but using a relative path will. This is a bit ugly, but should work:

 <Assembly>..\..\..\..\bin\AdminUI.HomePageView.DLL</Assembly>
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.