473,513 Members | 2,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to remove the key from a strong name assembly?

After assigning a key to a DLL to make it a strong name assembly, it cannot be compiled to the same location again.
The VS.NET always shows
"Could not copy temporary files to the output directory.
The file 'xxx.dll' cannot be copied to the run directory. The process cannot access the file because it is being used by another process.
and the DLL file is locked and cannot be deleted or overwritten
This is probably the effect of assigning the key but it is not what I want because my DLL will need frequent update

Anybody can help me.............thx a lot!!!
Nov 18 '05 #1
3 4771
to remove the file:
unregister the file first from the GAC, then you can delete it.

to remove the strong name:
search for all reference of ".snk" in your project and remove them

hope that helps.
Dan.

"Annie" <an*******@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
After assigning a key to a DLL to make it a strong name assembly, it cannot
be compiled to the same location again.
The VS.NET always shows
"Could not copy temporary files to the output directory.
The file 'xxx.dll' cannot be copied to the run directory. The process cannot
access the file because it is being used by another process."
and the DLL file is locked and cannot be deleted or overwritten.
This is probably the effect of assigning the key but it is not what I want
because my DLL will need frequent update.

Anybody can help me.............thx a lot!!!
Nov 18 '05 #2
Thank you for your suggestions
For 1, I didn't put the dll in GAC because it is used by one project only. So I can't follow this step
For 2, I've remove the sgKey.snk file but didn't help

Here was my steps in assigning the key
1. compile xxx.dll using VS.NET
2. use sn.exe to generate a key (sn -k sgKey.snk
3. use sn.exe to assign the key to the DLL file (sn -R xxx.dll sgKey.snk
4. use regasm.exe to register it (regasm xxx.dll /codebase

I've already unregister using regasm but still cannot delete the dll file. Any hints

Nov 18 '05 #3
The problem is solved after I boot the server
Thank you.
Nov 18 '05 #4

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

Similar topics

10
2664
by: Tony Jones | last post by:
Can anyone think of a reason why a 3rd party vendor writing .NET components would NOT strong name their assemblies? What harm does adding a strong-name to assembly present - I would think none...
1
307
by: John E. | last post by:
How can I compile two projects with a circular reference while giving them a strong name? There is a project that we have that has two components that reference each other e.g. A<->B thus...
2
2886
by: Mário Sobral | last post by:
Hi, I created an assembly (let's call it assembly (B)) that returns a localized resource for a given key (similar to System.Globalization.ResourceManager). I checks if the caller assembly (let's...
20
3160
by: Razzie | last post by:
Hey all, I'm really going through a small hell right now - I've completely lost it :) I made a project, using two interop libraries from exchange (created them as in this msdn article:...
8
1853
by: Tamir Khason | last post by:
Following the code: Assembly myAssembly = Assembly.LoadFrom(FileName); foreach (Type myType in myAssembly.GetTypes()) {Do_whatever()}
3
1300
by: Leonardo D'Ippolito | last post by:
Hello sirs, I am trying to understand how strong names work. Suppose I have lib.dll (a .net library), and also MyApplication.exe (a .NET WinApp) . MyApplication uses lib.dll . Suppose someone...
1
2349
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
6
9389
by: Jo | last post by:
Hi all, I have a strong name assembly (a dll written in C#) which has Register for COM interop set to true. I want to remove the strong name attribute from the assembly, how to do that? ...
6
5644
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps...
0
7157
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...
1
7098
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...
0
7521
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
5682
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,...
0
4745
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...
0
3232
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...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1591
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 ...
0
455
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...

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.