0

I found that I do not have System.net.http.dll in GAC folder in windows. Not sure how I lost it. So I tried installing it using gacutil.exe in ASP.net folder following the instructions.

But I get errors due to spaces in the links.

I tried running gacutil from its directory as well as in GAC folder. Both got similar errors.

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2>gacutil -i C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Net.Http.dll
'gacutil' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2>C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\gacutil -i System.Net.Http.dll
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2>C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\gacutil -i System.Net.Http.dll
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Any help is appreciated.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
PCG
  • 2,049
  • 5
  • 24
  • 42
  • You should use double quotes " like `C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2>"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\gacutil" -i System.Net.Http.dll`. But it is always better to reinstall the complete framework because you may not know what else is missing. – Thangadurai May 17 '19 at 03:33
  • I reinstalled VS 2019 back. but I still get "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools>gacutil.exe /i "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Net.Http.dll" Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0 Copyright (c) Microsoft Corporation. All rights reserved. Failure adding assembly to the cache: An attempt was made to load a program with an incorrect format." C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools>" – PCG May 17 '19 at 05:38
  • https://blog.lextudio.com/the-rough-history-of-referenced-assemblies-7d752d92c18c Referenced assemblies are not qualified. – Lex Li Jul 14 '19 at 22:21

0 Answers0