|
Hmmm, if that does what I need I should start learning how to use it. I somehow had the impression that Setup Project was doing the same thing as the Publish Tool. Thanks.
Insert funny quote here.
|
|
|
|
|
Scroll down on this page[^] and you'll find some useful stuff from MS.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
As Colin said, use the one built into Visual Studio. If you're using an express edition which doesn't have this, there's always Inno Setup[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I use the NSIS install system. NSIS Sourceforge Page.[^] It's fairly easy to script a decent setup. And FREE.
Scott P.
"Simplicity carried to the extreme becomes elegance."
-Jon Franklin
|
|
|
|
|
Hi Guys,
I'm redirecting the output of an external process to a function which writes the data to a log file using StreamWriter.Write() method.
Is there a smart way of limiting that file size?
Thanks!
Eyal.
|
|
|
|
|
Try log4net. It can automatically create new log file when an old one exceeds the size you specify.
|
|
|
|
|
I'm assuming that the OP wants a log file that will never get larger than size N, and that older entries are deleted as necessary. Creating a new file seems to me to be a sloppy workaround.
I can't think of any way to do this other than to load the entire file into memory, delete what makes it too large, and then save it again.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I second. Look for RollingFileAppender class and the RollingStyle property.
My suggestion is to create separate logs for each day/week/hour/whatever and to delete the logs older than the x-th version.
modified on Wednesday, January 7, 2009 11:37 AM
|
|
|
|
|
We can get the size of file through FileInfo. Hence, we can decide whether to create a new log if the size is out of limitation. Such as
FileInfo fileInfo = new FileInfo("1.rar");
if(fileInfo.Length > 100*1024)
{
//create a new log file
}
Tan Li
I Love KongFu~
|
|
|
|
|
Dragonfly_Lee wrote: to create a new log if the size is out of limitation
Instead of deleting the old log, start overwriting; you'll loose information if you just wipe the logfile. Alternatively, you could delete the oldest entry every time you add a new one.
Whether this is feasible depends on the maximum size of the logfile.
I are troll
|
|
|
|
|
Eddy Vluggen wrote: Instead of deleting the old log, start overwriting
I did not mean to delete the log file. We can create a new log file, such as:
1.log
2.log
...
So we will not lose any information. However, if the log file size is too huge, we also need to consider the disk space.
I Love KongFu~
|
|
|
|
|
Hi ALL,
retrieving a string from database like this
1. MAKARAMPURAM, MAKARAMPURAM, 2. SALINA PUTTUGA, SALINA PUTTUGA, 3. MAKARAMPURAM, MAKARAMPURAM, 4. MAKARAMPURAM, JANNI PUTTUGA, 5. MAKARAMPURAM, MAKARAMPURAM, 6. KORIKANA PUTTUGA, KORIKANA PUTTUGA, 7. MAKARAMPURAM, MAKARAMPURAM
Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string
Thanks
Nath
|
|
|
|
|
Nath wrote: Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string
If you really mean splitting, have a look at String.Split method. if you just want to show that on several lines and control the line breaks you could add new lines before the ordinal numbers.
|
|
|
|
|
Will the length and pattern of the string remain same? If not, then you cannot assure that the string can be shown in 3-4 lines.
If it remains same, you can get three equal length substrings from the string. (There is a lot of chance that the substring will be illogically formed.)
Or, split the string over numbers(provided pattern remains same) and join the consecutive parts till the total length becomes about 1/4th of the original string.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
|
|
|
|
|
I'm writing application with CsGL library.
So I use this class to render all graphic:
CsGL.OpenGL.OpenGLControl
The problem is that sometimes rendering area is out of this control. What can I do to solve this problem?
|
|
|
|
|
hi all
i have a windows application using c# code....
i wanted to create a messagebox in a button click...
i have added
[DllImport("User32.dll")]
public static extern int MessageBox(int h, string m, string c, int type);
but am getting an error like " The method or operation is not implemented." here in
private void MessageBox(string p)
{
throw new NotImplementedException();
}
thanks in advance
|
|
|
|
|
Why aren't you using the messagebox that comes with the framework.
There is one in the system.windows.forms namespace.
System.Windows.Forms.MessageBox.Show("test");
|
|
|
|
|
thanks 4 your reply....
its working fine...
|
|
|
|
|
You can mark the good answer.
I Love KongFu~
|
|
|
|
|
Salut,
Je viens de reprendre un projet dans lequel je fais appel à une DLL fournie par un client.
Le référencement a été fait. Je programme en C# et j'ai deux PC's avec visual studio 2005. Le premier est en XP pro. Pas de problème avec le référencement et tout fonctionne à merveille. L'autre, un laptop sous Vista Business. Sur ce dernier : le même projet me met des "warnings" pour l'interop. Comment solutionner cela ?
Merci de votre aide
Benoit
|
|
|
|
|
Parlez Anglais, if you desire an answer
I are troll
|
|
|
|
|
First like Eddy said: english only here.
Second from what I can understand (my French isn't perfect), you are getting errors on a vista pc where you don't get them on XP.
What errors.?
What does the program do (at the time of the errors)?
My first thought would be that this is a UAC problem but without more explanation (in English) I can't be sure.
|
|
|
|
|
Il serait intéressant de voir les "warnings" en question, ça pourrait aider. Aussi, une fois compilé, est-ce que le projet fonctionne quand même?
|
|
|
|
|
Thanks for all to reply so fast.
I'll rewrite it in english...
So, I'm C# Programmer and in my project I received from our client a DLL. When I develop on Visual Studio on XP all is working without any problem. If I check the reference, the Name and the Path are filled in and no exclamation point on this.
I copied all the project on my laptop to work home
a) I have an error message on my 'using myDll' in the begin of my class.
b) secondly, on the dll (when I check my references) I see an yellow exlamation mark.
When I use the program in the bin/debug myProgram.exe, I receive a message :" value type cannot be null" only when I use it on vista. On XP, no problem at all.
Thanks for your help
Benoit
|
|
|
|
|
Hi Benoit,
the yellow exclamation mark means that the assembly you are referencing is missing. What kind of assembly is it (sth. in the GAC or a third-party component, you added by browsing)?
Just a suggestion from my side:
For 3rd party components i normally add a folder called "Library" to my project where I put all needed assemblies (add by choosing "add existing element"). Then I add the reference to the assembly by browsing to this library folder. This works well with source control etc.
Regards
Sebastian
|
|
|
|