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.

Aditya Dalai 25 Reputation points
2023-04-10T05:51:06.2166667+00:00

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. User's image

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 . User's image

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,908 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,002 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,166 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.