Assemblies cached in user profile.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am having difficulties understanding the use of the cache in my profile
(C:\Documents and Settings\username\Local Settings\Application
Data\assembly\dl2)
My application seems to be using assemblies from this cache, even though
they have been changed and recompiled. Even when I created a setup project to
install my app, it installs old assemblies, the configuration is release but
it is installing old debug assemblies. If I clear the folder and recompile
all is Ok.(I have to exit VS to clear the cache). But this is a right pain in
the neck.
Can anybody shead light on how I can turn of this caching or clear it
automatically from within VS.

Regards Tim
 
Hi Tim,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that your app is using the assembly that
exists under Application Data folder. If there is any misunderstanding,
please feel free to let me know.

As far as I know, an app will always looks for assemblies in the same
directory, in GAC and in the subfolders specified by the configuration
file. If you don't run the app from VS.NET, will this also happen? Also,
could you let me know if you're working on an ASP.NET app or WinForm app?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Thanks Kevin,

I am having a rethink on how my solution is structured, any issues I will
repost.

Thanks for your help
 
Tim said:
Hi,

I am having difficulties understanding the use of the cache in my
profile (C:\Documents and Settings\username\Local Settings\Application
Data\assembly\dl2)

The clue is in the name dl stands for 'download'. If you look at
%windir%\assembly with windows explorer you'll see a 'folder' called
Download - the download cache. This contains libraries that you have
downloaded from other machines. The %windir%\assembly\Download is the
logical view, the dl2 folder is just the underlying grungy
implementation details.
My application seems to be using assemblies from this cache, even
though they have been changed and recompiled. Even when I created a
setup project to install my app, it installs old assemblies, the
configuration is release but it is installing old debug assemblies.

If I clear the folder and recompile all is Ok.(I have to exit VS to
clear the cache). But this is a right pain in the neck.

are you using gacutil /cdl
Can anybody shead light on how I can turn of this caching or clear it
automatically from within VS.

I am not sure. The key to this problem is that for some reason your
application is downloading libraries from a web site (it may even be IIS
on your machine) but I am not sure why it is doing that. The usual
reason for a process is if you have a setting in the application
configuration file (or even in machine.config) to indicate that the
errant library should be downloaded from a web site. See section 3.4 of
my Fusion workshop.

Richard
 
Back
Top