|
kolu narayan wrote: CS1577
See if this KB article[^] helps.
led mike
|
|
|
|
|
Thanks for your reply.
This is what happening, i had tried your suggestion as well. but unfortunately things didnt well.
I have a COM dll in C# which i had named 'MyWrapper.dll'. Now in this dll i am referencing other 3rd party dll's which are
'NCI.EasyObjects.dll' and
'Microsoft.Practices.EnterpriseLibrary.Data.dll'. Now when i tried to strong name my MyWrapper.dll it gives the following error.
error CS1577: Assembly generation failed -- Referenced assembly 'NCI.EasyObjects' does not have a strong name
error CS1577: Assembly generation failed -- Referenced assembly 'Microsoft.Practices.EnterpriseLibrary.Data' does not have a strong name
Now like what you said i had tried
C:\MyWrapper\bin\Debug>dir
10/10/2006 02:09 PM 20,480 DbConnection.dll
10/11/2006 09:27 AM 16,384 DTS_Access.dll
10/11/2006 09:27 AM 15,872 DTS_Access.pdb
12/17/2002 06:23 PM 131,072 Interop.DTS.dll
09/15/2006 02:07 PM 57,344 Microsoft.Practices.EnterpriseLibrary.Com
mon.dll
09/15/2006 02:07 PM 118,784 Microsoft.Practices.EnterpriseLibrary.Con
figuration.dll
09/15/2006 02:07 PM 86,016 Microsoft.Practices.EnterpriseLibrary.Dat
a.dll
10/11/2006 09:35 AM 596 MyKeyPair.snk
03/12/2006 03:45 PM 73,728 NCI.EasyObjects.dll
11/29/2005 12:44 AM 145,755 NCI.EasyObjects.xml
C:\MyWrapper\bin\Debug>tlbimp NCI.EasyObjects.dll /delaysign /publi
ckey:MyKeyPair.snk /out:Interop.NCI.EasyObjects.dllMicrosoft (R) .NET Framework Type Library to Assembly Converter 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
TlbImp error: The input file 'C:\MyWrapper\bin\Debug\NCI.EasyObject
s.dll' is not a valid type library
C:\MyWrapper\bin\Debug>tlbimp Microsoft.Practices.EnterpriseLibrary
.Data.dll /delaysign /publickey:MyKeyPair.snk /out:Interop.Microsoft.Practices.
EnterpriseLibrary.Data.dllMicrosoft (R) .NET Framework Type Library to Assembly Converter 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
TlbImp error: The input file 'C:\MyWrapper\bin\Debug\Microsoft.Prac
tices.EnterpriseLibrary.Data.dll' is not a valid type library
Bascilly why am i getting "is not a valid type library" error. Please help. How would i be able to strong name those dll's which are 3rd party.
|
|
|
|
|
Ok I found it, basically i went to the source code for each dll i was refering and then strong named it myself and compiled. Now the pain is any other dll referenced by those dlls also have to be strong named.....
But finally got the result.
thanks...
|
|
|
|
|
Anybody have any good examples of how to do this with a complex structure? This is a breeze using just straight XML, along with a few classes to represent your data in code, but using .NET 2's ConfigurationSection class and the various related attributes appears to be a royal pain in the arse for anything but simple configs. I also heard that IConfigurationSectionHandler is being obsoleted, so I probably shouldn't go down that route, either. Here's a sample of the XML format I want as an example of what I'm trying to accomplish:
<?xml version="1.0" encoding="utf-8" ?>
<EventLogger>
<Loggers>
<DbErrorLogger Name="DbLogger" Type="Integra.Logging.DbErrorLogger">
<ConnectionString>some connection string</ConnectionString>
<CommandTimeout>60</CommandTimeout>
<CommandType>StoredProcedure</CommandType>
<CommandText>uspSomeProc</CommandText>
</DbErrorLogger>
<EmailLogger Name="EmailLogger1" Type="Integra.Logging.EmailLogger">
<Recipients>
<To>nordyj2001@yahoo.com</To>
<!--<CC></CC>-->
<!--<BCC></BCC>-->
</Recipients>
<InfoSubject>Information</InfoSubject>
<WarningSubject>Warning</WarningSubject>
<ErrorSubject>Error</ErrorSubject>
<Server>mail</Server>
<InfoBody/>
<WarningBody/>
<ErrorBody>
<![CDATA[
An error occurred running the service. Following is a description of the error:
Error Message: {!MESSAGE}
File: {!FILE}
Line Number: {!LINENUMBER}
]]>
</ErrorBody>
<Sender>sender@yahoo.com</Sender>
</EmailLogger>
</Loggers>
<LoggerProfiles>
< Profile Name="DBOnly">
<Logger Name="DbLogger"/>
</Profile>
< Profile Name="EmailOnly">
<Logger Name="EmailLogger1" />
</Profile>
< Profile Name="DbAndEmail">
<Logger Name="DbLogger" />
<Logger Name="EmailLogger1" />
</Profile>
</LoggerProfiles>
</EventLogger>
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
What about serialization?
led mike
|
|
|
|
|
HEllo,
I would appreciate if anyone provide me a snippet to delete all non empty subfolders and files under a directory. I tried with Directory.Delete(..), but it allows only non empty directory and I am not sure if that will delete non empty sub folders too.
Thanks and regards
Emran
|
|
|
|
|
bashiwala wrote: delete all non empty subfolders and files under a directory.
HINT: "recursion"
led mike
|
|
|
|
|
Hi,
Thanks for the hint. But even using Recursion requires non empty directory, isn't it ? I want to delete all subfolders and files regardless they are empty or non empty.
Is there any easy way ?
|
|
|
|
|
bashiwala wrote: But even using Recursion requires non empty directory, isn't it ?
Sure it does, but the trick is that you recursively call your method for all current subfolders and delete them afterwards when everything inside was deleted. Here some pseudocode to get you an idea of the recursive function.
void delete(string directory)
{
delete all files in directory
for all subdirectories in directory
{
call delete with current subdirectory
delete the now empty subdirectory
}
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
bashiwala wrote: Is there any easy way ?
Q: What is "easier" than writing 10 or 20 or 200 lines of code?
A: Getting someone else to do it for you.
led mike
|
|
|
|
|
|
What's up? I have two questions for you.
1) Why are you replying to a two and a half year old thread?
2) Why do you think I would be interested in VB code?
|
|
|
|
|
Trying to write a program that allows me to read the Product Key for windows XP.
Does anybody knows where this key is stored in the registry?
any help is greatly appreciated
|
|
|
|
|
|
thank you Guffa but I am not looking for somebody else utility.
I asked if anybody knows where the key is so I can write my own app.
|
|
|
|
|
Hi !
I am using this simple : float.Parse(MyString); where MyString is "3.4" and it works fine .. on machines with language settings set to english (!!) I have tested on a machine with french settings and I get an exception (!geee!)
Unfortunately I can not change the file I parse depending on the local machine .. Is there a way I can change the language set used by the float.parsing ?
Cheers !
Pierre
|
|
|
|
|
Use a format provider with the Parse method. To get a format provider with a period as decimal separator, you can use InvariantCulture:
float.Parse(myString, CultureInfo.InvariantCulture)
---
b { font-weight: normal; }
|
|
|
|
|
Does anyone know how or know of a website that demonstrates how to send sms messages via asp.net code without using an expensive gateway such as simplewire (they cost about 1,400/month)?
I'm not looking to bill through the cell phone (via premium SMS), I'm only looking to send out SMS text messages to users who have opted in to receive our local news & weather messages but I don't know of an affordable way to do so. At most, I would probably have no more than 10,000 SMS messages sent out per month (and even that's optimistic).
Thanks in advance.
-Goalie35
|
|
|
|
|
How can I scale up and down large(10,000*10,000) 1 bit Tiff G4 images. So far I have played with GDI+ transformations and interpolation modes but none helps quick scaling without loosing quality.It takes it more than 1 second to display such image after zoomin/zoomout.
While, Microsoft Document Imaging and IrfanView scales the same images smoothly and in less than half a second.I am willing to explore about image processing techniques, any hints/links about the same??
Thanks,
MaulikCE
|
|
|
|
|
I have to make an application to write and read structures! I have to do it in c#! I know to do this in c/c++ but i have no idea how to do it in c#!
for example, my structure is like this:
(in C)
struct Info
{
int password;
string name;
etc.
}X;
( i used File *f, fopen etc..)
how to write this into a file (*.dat) and the read them...in c#
I found this example:
http://www.codeproject.com/useritems/readwritestructstobinfile.asp
but it seems to be difficult and there are some saying that is a terrible idea!
|
|
|
|
|
Hi,
add this using statement to your code:
<br />
using System.Runtime.Serialization.Formatters.Binary;<br />
use this code to read the file:
<br />
MyClass MyObject = null;<br />
BinaryFormatter binReader = new BinaryFormatter();<br />
System.IO.Stream readStream = File.Open("c:\blah.dat", FileMode.Open);<br />
MyObject = (MyClass)binReader.Deserialize(readStream);<br />
readStream.Close();<br />
and this one to write it:
<br />
MyClass MyObject = new MyClass();<br />
<br />
BinaryFormatter binWriter = new BinaryFormatter();<br />
System.IO.Stream writeStream = File.Open("c:\blah.dat", FileMode.Create);<br />
binWriter.Serialize(writeStream, MyObject);<br />
writeStream.Close();<br />
and this is the class (or struct) you want to write to a file...
<br />
[Serializable]<br />
public class MyClass<br />
{<br />
string SomeString = null;<br />
int SomeInteger = 0;<br />
string AnotherString = null;<br />
}<br />
|
|
|
|
|
Hi everyone,
I have a new and wonderful problem I am using VS2003 and its good working but now I want to create a C# project but It isnt on File->project(when you want to start Visual studio on first page its show that) I can open exist projects(C#) but C# option isnt on project type you can see Visual Basic and Visual C++ and.. but its not show I guess maybe I remove it so I try to add/remove of install cd but again I wonderful on the CD I click on Add/Remove but in front of C# option isnt a mark button(checkbox) ("Select items to install:" all options are good except Visual C#.Net and Visual J#.Net)(I didnt this problem already)
Can you help me
Thanks
|
|
|
|
|
Have you checked out the ListBox.MultiColumn property?
---
b { font-weight: normal; }
|
|
|
|
|
It doesn't matter, i figured out how to do it with a list view, i tried to delete/edit the post a few times, but codeproject keeps crashing my browser >
Whta happens is, i come here, i try to do something (delete for example) the next page starts to load, the current browser window goes extremely slowly, all new windows go exrtremely slowly. The rest of the computer and any other previously open browser windows work fine though.
|
|
|
|
|
If you're having problems, the suggestions forum is the proper place to discus them.
|
|
|
|