locked
System.UnauthorizedAccessException after VS update to 15.8.5 RRS feed

  • Question

  • User295584 posted

    Hi Folks,

    After having known problems of compatibility between the newest version of xcode and old versions of VS i updated VS to the latest version (15.8.5), but now i am running with quite unexpected problems.

    When i try to build (debug or release) my App (in Android device [samsung galaxy tab A6, Android 7.0] and emulator [Android 6.0]) it tries to write to a path in "'/storage/emulated/0/system/X" and it fails with exception System.UnauthorizedAccessException.

    This is quite enigmatic since i have not change my code at all and it used to run without problems before the update...

    Has anyone run into similar problems? Does anyone know how to solve this?

    Thanks


    UPDATE:

    I created an APK by selecting "Archive..." in the Android project and when i try to install the App in the device i realized that at the moment where my old versions used to say:

    "Do you want to install this application? It will get access to:...

    now it states blatantly:

    "Do you want to install this application? It does not require any special access"

    Does this make sense to anyone? O.O

    Thursday, September 27, 2018 3:26 PM

Answers

  • User295584 posted

    @deczaloth said: Hi @JohnHardman,

    I tried rebooting but that did not help. Nevertheless, while waiting for the new start i got another idea that ended up solving the problem although i do not understand why...

    After the update somehow the Android's Manifest file changed and in the Target Android Version it was now selected "Android 8.1..." where i used to have "Use Compile using SDK version" (view image).

    Now, even though that solved my problem, i am quite scared that there is a deeper problem laying behind all this...

    Does anyone know if i am good setting "Use Compile using SDK version" instead of a specific android version?

    Thanks again :smiley:

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, September 28, 2018 6:13 AM

All replies

  • User89714 posted

    @deczaloth - I certainly had System.UnauthorizedAccessException after upgrading, although I cannot recall what the path was. I think rebooting my dev PC cleared it.

    Thursday, September 27, 2018 4:21 PM
  • User295584 posted

    Hi @JohnHardman,

    I tried rebooting but that did not help. Nevertheless, while waiting for the new start i got another idea that ended up solving the problem although i do not understand why...

    After the update somehow the Android's Manifest file changed and in the Target Android Version it was now selected "Android 8.1..." where i used to have "Use Compile using SDK version" (view image).

    Now, even though that solved my problem, i am quite scared that there is a deeper problem laying behind all this...

    Does anyone know if i am good setting "Use Compile using SDK version" instead of a specific android version?

    Thanks again :smiley:

    Thursday, September 27, 2018 4:42 PM
  • User295584 posted

    @deczaloth said: Hi @JohnHardman,

    I tried rebooting but that did not help. Nevertheless, while waiting for the new start i got another idea that ended up solving the problem although i do not understand why...

    After the update somehow the Android's Manifest file changed and in the Target Android Version it was now selected "Android 8.1..." where i used to have "Use Compile using SDK version" (view image).

    Now, even though that solved my problem, i am quite scared that there is a deeper problem laying behind all this...

    Does anyone know if i am good setting "Use Compile using SDK version" instead of a specific android version?

    Thanks again :smiley:

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, September 28, 2018 6:13 AM