473,406 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Releasing Assembly After Retrieving Version

I am working on an auto update feature for my program and basically it gets
the assembly information for the main application and compares that against
the database the problem is that when i try to rename the main files it says
it can't becuase the file is still in use.

So once i have opened an assembly and its information how can i release it
so that i can perform other file operations on it.

Gary Townsend
Spatial Mapping Ltd.
Nov 21 '05 #1
4 1166
"Gary Townsend" <ga**********@hotmail.com> schrieb:
I am working on an auto update feature for my program and basically it gets
the assembly information for the main application and compares that
against
the database the problem is that when i try to rename the main files it
says
it can't becuase the file is still in use.

So once i have opened an assembly and its information how can i release it
so that i can perform other file operations on it.


You must not access the assembly directly in order to prevent it from being
locked. To do so, you may want to use a remote interface as demonstrated in
<URL:http://dotnet.mvps.org/dotnet/articles/sharedfinalizer/SharedFinalizer.zip>

Additional information:

Executing Dynamic Code in .NET
<URL:http://www.west-wind.com/presentations/DynamicCode/DynamicCode.htm>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Thank you, are there any more resources for information on appdomains out
there i am trying to wrap my head around the concept and could use any
additional documentation that might be helpful for me in this situation.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eU**************@TK2MSFTNGP15.phx.gbl...
"Gary Townsend" <ga**********@hotmail.com> schrieb:
I am working on an auto update feature for my program and basically it gets the assembly information for the main application and compares that
against
the database the problem is that when i try to rename the main files it
says
it can't becuase the file is still in use.

So once i have opened an assembly and its information how can i release it so that i can perform other file operations on it.
You must not access the assembly directly in order to prevent it from

being locked. To do so, you may want to use a remote interface as demonstrated in <URL:http://dotnet.mvps.org/dotnet/articl...haredFinalizer.
zip>
Additional information:

Executing Dynamic Code in .NET
<URL:http://www.west-wind.com/presentations/DynamicCode/DynamicCode.htm>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
"Gary Townsend" <ga**********@hotmail.com> schrieb:
Thank you, are there any more resources for information on appdomains out
there i am trying to wrap my head around the concept and could use any
additional documentation that might be helpful for me in this situation.


AppDomains and Dynamic Loading
<URL:http://msdn.microsoft.com/library/library/en-us/dncscol/html/csharp05162002.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
Excellent material many thanks.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Or**************@TK2MSFTNGP15.phx.gbl...
"Gary Townsend" <ga**********@hotmail.com> schrieb:
Thank you, are there any more resources for information on appdomains out there i am trying to wrap my head around the concept and could use any
additional documentation that might be helpful for me in this situation.
AppDomains and Dynamic Loading

<URL:http://msdn.microsoft.com/library/li...tml/csharp0516
2002.asp>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Russell Stevens | last post by:
Should be trivial - I want to detect the program version so that I can take steps to update things to the current version. Pretty simple - just use Application.ProductVersion So I install the...
0
by: Steve Guidi | last post by:
Hello, I'm developing an application that periodically reads embedded assembly resources. The resources are text-based, and are about 3-7KB in size, and the application accesses them by calling...
0
by: Eidolon | last post by:
I was working on one of my assemblies yesterday which we have in our GAC and is used by a number of our web applications/sites on our intranet. Something strange started happening though. I would...
2
by: M.Ob | last post by:
Hello... I am having issues with my asp.net apps not releasing memory. The memory usage for the process w3p.exe continues to grow to it's allowable limit and does not drop until the app pool is...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
1
by: John Wright | last post by:
During my program I load an exe file using reflection. My program loads the file using reflection, checks the assembly version and does an update if the network version is different from the local...
0
by: Rob Meade | last post by:
Hi all, I have some code which we use to retrieve an assembly version of a referenced assembly in our proects, this information is displayed in our footer part of our template. I've just...
1
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9...
1
by: =?Utf-8?B?S29lcnQ=?= | last post by:
Hi, I try to load an assembly, use it and then release it. I am wondering if there is a way to release the assembly? I've read that if you use the current AppDomain this is not possible, so you...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.