I have added the NuGet Google.AdWords 24.10.1 package to a .net core console app. In the SDK documentation they say that .net core is supported. The problem is that the library functions crash on first call with tho following error:

Could not load type 'System.Web.Hosting.HostingEnvironment' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.":"System.Web.Hosting.HostingEnvironment"}

I cant understand if this package is supported or not in the core app?

This line causes a crash: AdWordsUser user = new AdWordsUser();

Tag:google-ads-api, c#, .net-core

Only one comment.

  1. realPro

    So my Adwords code was inside old .net project that was set to .net 4.6... Had to switch to .net 4.7.2 and reinstall all nugget packages.

Add a new comment.