Assembly name with spaces-how to uninstall programmatically

G

GD

Hi,

I need to uninstall an assembly from GAC programmatically. It only works on
the assemblies with no white spaces in the assembly name. I have tried
multiple combination without success. As there are while spaces in the name,
I have to put two double quotes on the two ends of the file name:

string strTestLib = "CF Test Lib For GAC"; //The dll without extension
string strCommand = "\" + strTestLib + \"" + " ,Version=1.0.9.0,
Culture=neutral, PublicKeyToken=70b83542ad6dde68";

or

string strCommand = '"' + strTestLib + '"' + " ,Version=1.0.9.0,
Culture=neutral, PublicKeyToken=70b83542ad6dde68";

Process.Start("cgacutil.exe", " /uf " + strCommand);

Any ideas?

Thanks.

GD
 
G

Guest

Manually create a GAC file or make the registry entries. That's a way
around using cgautil altogetehr.
 
I

Ilya Tumanov [MS]

Or put entire assembly name in quotes:

string strCommand = "\" + strTestLib + " ,Version=1.0.9.0,Culture=neutral,
PublicKeyToken=70b83542ad6dde68\"";

--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
G

GD

Your solution works great. Thanks.

GD

Ilya Tumanov said:
Or put entire assembly name in quotes:

string strCommand = "\" + strTestLib + "
,Version=1.0.9.0,Culture=neutral, PublicKeyToken=70b83542ad6dde68\"";

--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no
rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top