Locking a mutex in Nantes

How do I implement Mutex locking in Nant? The reason I need this feature is because I am registering COM components to make my work work. Then at the end of the assembly, I will re-register the COM components.

Without locking the mutex, another version of COM registers itself and encounters some problems.

So, it would be better if we applied Mutex locking in Nant script. Thus, if the build is running, another project will wait for completion.

0


source to share


1 answer


The only way I know is to create your own task that will allow you to lock the global mutex and then another task to unlock it. These new tasks can be built separately and added to NAnt by copying the DLL to the NAnt \ bin folder or by extending NAnt directly from your build files



Information to get started is at <script /> Task

0


source







All Articles