Re: Compile to GAC from VS

Tech-Archive recommends: Fix windows errors by optimizing your registry



I ran into that problem several times. If you do not update the version
number of your assembly, the .NET framework uses a cached assembly in your
C:\Document and Settings\<username>\Lokale Settings\Application
Data\assembly folder. It will be stored somewhere beneath a DL2 or DL3
folder. I placed a simple batch into that folder, removing all assemblies in
there.

@echo off
@prompt $g
del *.dll /s /q
pause

Whenever I have the problems you mentioned, I click it and all assemblies
are gone and you're working with your current implementation. You can add
the batch file to a custom build script to automate this process.


--
Michael

http://www.stunnware.com/crm

----------------------------------------------------------

"Alexander Mueller" <millerax@xxxxxxxxxxx> schrieb im Newsbeitrag
news:uPT5qgVOGHA.428@xxxxxxxxxxxxxxxxxxxxxxx
Hi

we have Word-Template project in VSTO that will be used intensively
by the customer so we decided to put it to the GAC, because this also
solves privilege- and location-problems for doc-files that are saved
to an arbitary location.
I am not very familiar with NET-GAC concept, but found out
that creating a Strong Name with sn.exe and then putting the
assembly into the GAC using gacutil is all that seems to be done,
however once the assembly is registered to the GAC, i get trouble starting
a newer compiled versions of the VS-project from the REALESE-folder. The
dot-file then seems to favor the
old GAC-assembly rather then the new RELASE-assembly also it they both
share the same location; so code-changes are not executed under
these circumstances.
In order to fix this problem, i thought one might compile the assembly
to the GAC from Viual Studio directly, but i wonder how this can be
achieved/configured, without using tools like 'gacutil.exe' manually
after building. Hope the problem is reproducable.

Btw VS 2005 + VSTO 2005 + OFF 2003

Thanks for your help,
Alex


.



Relevant Pages

  • RE: AppDomain wont recycle on web.config change since 1.1 to 2.0
    ... All assemblies are in the GAC. ... All assemblies are in the GAC, we do not have a /bin folder. ... application restart and even it did, some assembly will not load correctly ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: .NET versioning
    ... >> If this isn't dll hell then it's awfully close. ... > xcopy deployment, which thus means avoid the GAC if possible. ... > 2) if required, and if you really have to, copy the files to the GAC. ... If you overwrite assemblies in the GAC ...
    (microsoft.public.dotnet.framework)
  • Re: Class files and performance
    ... your code would need access to the IIS deployment folder in either case. ... that's a security issue, you could certainly make the case that leaving ... but your assemblies are, ... I compile all my helper classes and upload the assembly/assemblies to the /bin directory. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: using GAC
    ... When you look at the GAC in explorer, it actually isn't a folder view. ... so that you can compile your code. ... you should drop your assemblies into a local folder, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Appl. Security Problems
    ... Recompile your three assemblies in release mode. ... If any copies ended up the GAC (for example, ... Attempt to run the EXE from the network folder. ...
    (microsoft.public.dotnet.security)