Countly / countly-sdk-unity

Countly Product Analytics Unity SDK
https://count.ly/mobile-analytics
MIT License
42 stars 30 forks source link

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

Open SavedByZero opened 1 year ago

SavedByZero commented 1 year ago

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.

ArtursKadikis commented 1 year ago

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

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.

SavedByZero commented 1 year ago

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

ArtursKadikis commented 1 year ago

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

ajeets1978 commented 4 months ago

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