countly-sdk-unity icon indicating copy to clipboard operation
countly-sdk-unity copied to clipboard

error CS0103: The name 'HttpUtility' does not exist in the current context

Open SavedByZero opened this issue 1 year ago • 4 comments

Sorry to dump a bunch of stuff on you, but I am getting this compile error with the current library code: Assets\Plugins\CountlySDK\Helpers\StorageAndMigrationHelper.cs(195,54): error CS0103: The name 'HttpUtility' does not exist in the current context

I have this set to .Net Framework in Unity 2021. That's when I started seeing this.

SavedByZero avatar Mar 07 '23 20:03 SavedByZero

Hello, could you be please more specific about the specific setup at which you are running it? Could you please tell me these things:

  • Which Countly SDK version are you using?
  • which editor version you are using?
  • on which platfom (Mac, Windows, Linux) are you running this? And what is the platforms version?
  • For which target platform are you creating this build?
  • Were you trying to run/build it in the editor?
  • What scripting backend had you selected? Mono? IL2CPP?
  • any other points of interest that might describe your build
  • Did this happen when you were running the example integration or when integrating it into your project?
  • If you added the SDK into your project, how did you add it?

If you had not done it, could you please clone this repo and run the example integration?

I tried running our latest SDK version (22.06.0) on the Unity editor latest LTS version 2021.3.15f1 on Windows 10 and I couldn't reproduce the issue. The target platform I used was the "default" - "Windows, Mac, Linux". I tried also all combinations of the scripting backends and API compatability levels.

ArtursKadikis avatar Mar 08 '23 17:03 ArtursKadikis

SDK: 22.06.0 Unity 2021.3.19f1 Android Platform minimum API level 22, picks highest installed Yes, tried in the editor Mono Backend with .NET Framework selected, this was previously labeled as .Net 4.X, but according to Unity, it's the same thing. This happened before I added anything as a compiler error, as soon as I switched from .Net 2.0 to .NET Framework. When I switch to .Net 2.0, the error goes away.
Note: I WAS able to get it to compile by adding a crc.rsp file with System.Web.dll

SavedByZero avatar Mar 08 '23 18:03 SavedByZero

Hello, It was not possible for me to reproduce the described issue with the configuration options that you laid out, or even with different variations on them

ArtursKadikis avatar May 05 '23 16:05 ArtursKadikis

Yes I had the same issue.

You can replicate it if you are using .Net Framework, but it works when I changed it to .Net Framework Standard 2.1

ajeets1978 avatar Apr 29 '24 05:04 ajeets1978