0

Im trying to pass the source code of a C# Grpc server into a Windows Service Project. Following these steps but when I execute InstallUtil MyService.exe the process stops indicating

System.Reflection.ReflectionTypeLoadException: No se pueden cargar uno o varios
tipos requeridos. Recupere la propiedad LoaderExceptions para obtener más información.

How can I solve it?

MigRome
  • 1,095
  • 1
  • 12
  • 28

2 Answers2

0

Try setting the Copy Local attribute of project's references to true.

More info here: Error message 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'

Community
  • 1
  • 1
0

InstallUtil is for installation of windows service, which we are using earlier for .net framework. As this will be in .net Core, we need to use a cs command.

Following is the example command you can use:

sc.exe create NewServiceName binpath=pathOfExe

You need to use a CS command as specified in following link because this is a .net Core application.

https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/sc-create

ouflak
  • 2,458
  • 10
  • 44
  • 49
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 05 '22 at 11:53