473,748 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to copy file. The process cannot access the file because it is being used by

1 New Member
Till Date, I find no solution to the problem below.

Unable to copy file "obj\Debug\Tax2 010.dll" to "bin\Tax2010.dl l". The process cannot access the file 'bin\Tax2010.dl l' because it is being used by another process.

In my case, I have two projects under one Solution named "Tax2010"

1) Calc and Calc.DLL (contains .cs class files)

2) Tax2010 and Tax2010.DLL (contain .aspx pages along with respective .cs files and other .cs class files)

I have configured both the projects in a way that their respective .dll be copied to one common bin directory placed under
Tax2010 directory.

Here is the genral hierarchy of the project.....


Tax2010
Tax2010
Bin
Tax2010.DLL
Calc.DLL
UI
....aspx
....cs
CL
....cs
....cs
Calc
AK
....cs
....cs

The problem happens whenever I make any changes to .cs file and try to build the project.One interesting thing to note, though, is that I am not running the application through IIS. Its using WebDev.WebServe r.Exe. How I am dealing with it right now ?
1) Delete the obj folder and build the peoject. It works fine
or
2) CTRL + ALT + DEL - > Task Manager -> Processes -> WebDev.WebServe r.Exe - > End Process.

Now I am sick and tired of doing this monotonous job. Please somebody come up with some wow solution. Enough is Enough now.
Jun 21 '10 #1
1 4718
Christian Binder
218 Recognized Expert New Member
You say, you copy your dll in a common folder.
So if project A runs (references the B-dll) and project B gets compiled, it cannot replace the B-dll because it's currently being used.

I've got some kind of these problems too. There are two approaches, which I have used. First is building a program which cancells the process (like what you described in your 2nd way though programmaticall y). So you can make a shortcut to it. Another approach is, saving your common dlls in an Network Drive, which is bound to a local directory e.g. \\localhost\C$\ MyFolder\ and use detach/attach-scripts. Because it's possible to detach a folder whicih contains a currently used file.
Jun 21 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
715
by: Paul | last post by:
Hi, VB.NET is saying the file I am creating is in use by another process and won't complete its task of moving the file to the specified destination folder. Here is my code (the main bit anyway).... Private Sub LogChange(ByVal source As Object, ByVal e As System.IO.FileSystemEventArgs) If e.ChangeType = WatcherChangeTypes.Created Then
3
3742
by: JeffM | last post by:
I have a .dat file on a remote server that seems to be locked. I have tried to FTP to it and delete it, rename it, copy over it and I get the error. "Could not copy temporary files to the output directory" Anybody have any idea why this file is locked? What do I have to do to release it? TIA ~jeff
5
2426
by: Mike Dole | last post by:
When I am updating a picturebox with an image (extracted) from an access database I keep getting a "The process cannot access the file "c:\foto1.jpg because it is being used by another process" this only happens the second time I run it, the first time it works out fine.. I've tried things like MyPicBox.dispose MyPicBox = nothing etc,etc
1
1251
by: Jurgen Oerlemans | last post by:
Hello, I perform several actions on a file: * copy "xxx.txt" from directory 1 to "file.txt" directory 2 * process "file.txt" which is in directory 2 * delete the file in directory 1 .... and start over again. Sometimes I get the error: "The process cannot access the file "path\file.txt" because it is being used by another process"
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.