UWP UnauthorizedAccessException After Upgrade to 2021.3.15f from 2020.3.38f

Hello,

Im Having a issue after i upgraded to 2021.3.15f from 2020.3.38f.

The application crash on starts and im getting this in the log :

Uploading Crash Report UnauthorizedAccessException: Access to the path ‘c:\data’ is denied.

This is happened when I use:

Directory.CreateDirectory(sceneFilesPath);

To create a folder.

My code was working in the previous version and i had no issue.

The only thing i did was upgrade to the new unity version.

Also check the capabilities i have them all.

And the path is correct when i debug it.

Does anyone have any idea?

Cheers

Update : i have seen that unity is now using net standard 2.1 instead of net standard 2.0 Could this change affect the build !