Bug 21284 - [Windows] Make license refresh process delete licenses in %LOCALAPPDATA%\VirtualStore\ProgramData\Mono*
Summary: [Windows] Make license refresh process delete licenses in %LOCALAPPDATA%\Virt...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Activation ()
Version: 3.1
Hardware: PC Windows
: High major
Target Milestone: 3.8
Assignee: Adrian Alonso
URL:
: 17212 20679 ()
Depends on:
Blocks:
 
Reported: 2014-07-12 17:23 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2014-11-13 14:22 UTC (History)
11 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2014-07-12 17:23:01 UTC
If a user has an old expired license in `%LOCALAPPDATA%\VirtualStore\ProgramData\Mono*`, then no amount of logging-out, logging-in, re-installing, or deleting `%PROGRAMDATA%\Mono*` will properly refresh the licenses (see duplicate bugs for some examples).

This is a difficult problem for users to track down. Presumably when Xamarin is refreshing licenses or deleting licenses (during account logout), it has read-write access to the `%LOCALAPPDATA%\VirtualStore\ProgramData\Mono*` folders. Assuming that's true, then it can simply delete both of the folders from the VirtualStore. That way, the only licenses visible to the license-checking code will be in `%PROGRAMDATA%\Mono*`.


I'm still not sure what mechanism Windows uses to determine that it should copy the licenses into the VirtualStore in the first place, but this simple solution seems good enough to me, at least for the time being.


Thanks!
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2014-07-12 17:24:41 UTC
*** Bug 17212 has been marked as a duplicate of this bug. ***
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2014-07-12 17:31:39 UTC
*** Bug 20679 has been marked as a duplicate of this bug. ***
Comment 6 Daniel Cazzulino 2014-10-22 09:45:47 UTC
I think we should still go with Brendan's proposed fix, since it doesn't look easy to repro with an actually old expired license (under \Mono?? must be AGES old).
Comment 10 PJ 2014-11-03 12:46:10 UTC
@Saurabh - If you can't naturally reproduce the initial state, you should be able to force the reproduction by manually copying your license files (creating the directories as needed).
Comment 13 Akhilesh kumar 2014-11-13 14:22:20 UTC
I have checked this issue with previous Stable build 3.7.248, and observe that old expired license created at directory %LOCALAPPDATA%\VirtualStore\ProgramData\Mono for Android and %LOCALAPPDATA%\VirtualStore\ProgramData\MonoTouch do not get deleted  after login with a valid account. 

However with XVS 3.8.135, folder haveing old expired license get deleted form directory %LOCALAPPDATA%\VirtualStore\ProgramData\Mono for Android and %LOCALAPPDATA%\VirtualStore\ProgramData\MonoTouch after login a valid account. 

Hence, closing this issue.