Failure adding assembly to the cache: Access denied.

I was working on a project using Visual Studio.
I had a post build event that updates my assembly in the Global Assembly cache.
I noticed that when i complie my project i get Access denied to the GAC ans sometimes it runs ok.
After doing some research i came across this solution at
global cache security
which suggested using the command  from cmd:

CACLS %WINDIR%\assembly /e /t /p [DOMAIN|MACHINENAME]\useraccount:R
 and that did work for me ..

But  you can see some other suggestions here at  this post
Although the post suggested disabling index services which some people said it worked for them..

hm....
«May»
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567