|
Home > Archive > BizTalk Server General > September 2005 > BizTalkAssembly Class reference issue
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
BizTalkAssembly Class reference issue
|
|
|
| Hello!
I'm using the method Deploy of the Class BizTalkAssembly to deploy a BizTalk
Assembly. After deploying the assembly I'm trying to Move the assembly file
to a new location and encountring an access violation error:
"The process cannot access the file xxx because it is being used by another
process."
Only when I close my application I can move/delete the assembly file.
Does anyone has any idea how to free the reference to the assembly so I will
be able to delete/move it from within my application after deploying it?
This is the code I'm running:
BizTalkAssembly btAssembly = new BizTalkAssembly();
btAssembly.Load(sAssemblyPath);
btAssembly.Deploy(true, sMyServer, sMyDb, sAssemblyPath, string.Empty,
sMyAppLog);
btAssembly.Dispose();
btAssembly = null;
File.Move (sAssemblyPath, sNewPath); // Error in this line...
Thanks
Elad
| |
| Scott Colestock 2005-09-28, 5:59 pm |
| You could consider loading and running this code in an alternate appdomain -
Scott Colestock
www.traceofthought.net
"Elad" <Elad@discussions.microsoft.com> wrote in message
news:7CE6D2C7-8255-4CAD-9DD8-4334B421198F@microsoft.com...
> Hello!
> I'm using the method Deploy of the Class BizTalkAssembly to deploy a
> BizTalk
> Assembly. After deploying the assembly I'm trying to Move the assembly
> file
> to a new location and encountring an access violation error:
> "The process cannot access the file xxx because it is being used by
> another
> process."
> Only when I close my application I can move/delete the assembly file.
>
> Does anyone has any idea how to free the reference to the assembly so I
> will
> be able to delete/move it from within my application after deploying it?
>
> This is the code I'm running:
> BizTalkAssembly btAssembly = new BizTalkAssembly();
> btAssembly.Load(sAssemblyPath);
> btAssembly.Deploy(true, sMyServer, sMyDb, sAssemblyPath, string.Empty,
> sMyAppLog);
> btAssembly.Dispose();
> btAssembly = null;
>
> File.Move (sAssemblyPath, sNewPath); // Error in this line...
>
> Thanks
> Elad
|
|
|
|
|