Could not load type 'System.Object' from assembly 'System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because the parent does not exist.
Previously my application was build on .net framework 4.8 and the setup has done by using wix toolset version 3.11.2 . due to some reason we have migrated some of the component into .net .standard 2.0 and one of the project in to .net 6 because it was a console application. and we are able to build and the application using visual studio.
<Component Id="_COMP_Data_UI_dll" Guid="{b55258eb-3a2a-4575-afd1-1385beb03c01}">
<File Id="_FILE_Data_UI_dll" Name="Data.UI.dll" KeyPath="yes" Assembly=".net" AssemblyManifest="_FILE_Data_UI_dll" AssemblyApplication="_FILE_Data_UI_dll" DiskId="1" Source="$(var.SourceDir)\Data.UI.dll" />
</Component>
since .net 6 doesn't support AssemblyManifest, Assembly attributes in wix I have removed those attributes.
<Component Id="_COMP_Data_UI_dll" Guid="{b55258eb-3a2a-4575-afd1-1385beb03c01}"> <File Id="_FILE_Data_UI_dll" Name="Data.UI.dll" KeyPath="yes" DiskId="1" Source="$(var.SourceDir)\Data.UI.dll" /> </Component>
now when I create the setup ,I am able to create and after installation i got a message that Could not load type 'System.Object' from assembly 'System.Runtime.dll version 6.0.0.0" in the event viewer when I manually put System.Runtime.dll version 6.0.0.0 inside the gac a different error is coming, saying that Could not load type 'System.Object' from assembly 'System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because the parent does not exist.
I have tested through visual studio 2022 it is working fine only during installation it gives error in this below line which is in a .net standard 2.0 application .