Critical error: Failed to compile shadow assembly. error CS0433
search cancel

Critical error: Failed to compile shadow assembly. error CS0433

book

Article ID: 277023

calendar_today

Updated On:

Products

IT Management Suite Client Management Suite

Issue/Introduction

During a reconfigure of the installed products (or during re-attaching the database), the following messages were noticed in the NS logs after SIM failed to reconfigure:

A critical error occurred:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Altiris.NS.Exceptions.AeXException: Critical error: Failed to compile shadow assembly.
 
error CS0433

 

 

Environment

ITMS 8.7

Cause

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0433

Resolution

Try the following:

You will need to clear out the "Temporary ASP.NET Files" folder:

  1. Close SIM 
  2. Perform an iisreset
  3. Delete all the folders and files within the "Temporary ASP.NET Files" folder (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files)
  4. Open SIM and Restart reconfiguration process one more time.

Explanation

  • Step 1: remove resource locks from the folders/files we need to delete.
  • Steps 2-3: remove all of the old build files

 

Also verify the following:

We found that in some occasions the permissions in the machine keys directory needed to have the service account (App Identity) added instead of just having them in the administrators group:

Option 1:

Give your App Identity Full Control in NTFS security permissions to the following folder: C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys 

Option 2:

  1. Change security on directory:
    • C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys
  2. Add your App Identity account, with the following minimum "Advanced" set of NTFS permissions (Full Control is a better setting):
    • Create files / write data
    • Create folders / append data
    • Write attributes
    • Write extended attributes
    • Delete
  3. After hitting apply, accept that 5 directories were "Access is denied", if any.

Additional Information

NOTE: If you are using the steps to swap out the APP ID account and running into this issue, add BOTH App ID accounts with Full Control to the MachineKeys folder

Also see KB 162951 - Receiving multiple errors regarding "DAL Generator failed for"