|
I've never done it personally, but I've seen #if DEBUG statements in main used to compile a service as a console app in debug mode; then it can be run and debugged just like any other program.
|
|
|
|
|
Hi Guys,
I have created a small project (application). Now I want to deploy it. I dont think that I require setup for it because, the project is very small. But the problem is that, there are certain icons and small images which I have added in my form. Those are saved in the resource file, with the .resx extension.
Now when I build my application and go to - Visual Studio 2005 - Projects - MyProjectNameFolder - Bin - Release - Application.exe and copy the file .exe file and run it on another machine. It simply shows some kind of error message! Will I've to copy the entire solution? But that wont be user friendly. So how do I create a standalone application?
Please tell me the steps!
Your help will be appreciated....
Rajdeep.NET
|
|
|
|
|
Is another machine installed .net framework?
You better create a Windows Installer project with the exe file added.
It's easy to create setup, why you dont think that you require setup for it because, the project is very small?
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|
|
Hi Kelvin,
Actually I was intending to create a standalone application. There are only 4 to 5 forms in my project connected to each other via creating objects of each other, and so I dont require a setup for it. I just want that the user download it and simply double-clicking the .exe file run the application, without needing any Setup.
Thanx,
Rajdeep.NET!
|
|
|
|
|
You can't do this.
In order to run the application you need the framework.
Also simply copying the exe only works if you don't use any other references(dll's), if you do you need to copy those aswell.
But as I said without the framework it's never going to work.
Simplest way is to create a simply setup (that's only 4 screens where the user has to click next, everyone is used to that), this setup is going to check if the framework is present and install it if needed.
|
|
|
|
|
Rajdeep.NET wrote: It simply shows some kind of error message!
And we are supposed to magically figure out what your error is? Tell us the error and we may be able to help.
As a hint, you may have to copy everything in your Release folder to your target machine.
|
|
|
|
|
Just tell me how to create a standonly application?
|
|
|
|
|
Copy all the files from the release folder under obj to a disk (you can use a USB these days), take some bluetak and apply a lump to the side of the disk you want to "stand alone" on and place it next to the computer. Whalla standonly application.
Don't be so bloody rude next time - Tom gave you a valid answer and the reasoning why you need to create an installer.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi again Rajdeep,
You've already been told possible cause of your problem. The target machine [shout]*MUST*[/shout] have the required framework installed. If it has, then just copying the exe (and any referenced dlls if there are any) may work. I often do this for in house apps at work as I know they all have all frameworks installed.
You can either create a SetUp project if using VisualStudio, or a Click Once deployment if using VisualStudio or C# Express. These will check if the prerequisites are met and download/install them if required.
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)
|
|
|
|
|
Hi,
I just want to read the table data in a HTML file and Write as it is into a text file as it viewed in HTML view, I mean I don't want retrieve the soucrce code, but I want the text as well as empty spaces between each table cell in the text file also.
How can I do this in c#?
If I read the table data which is present in the HTML page in the following way:
he following figure shows how the table defined in this example renders. Rendered table.
after reading this table from html page, how to write in a text file such that the table's content should be renderd in same manner in the text file also.
modified on Friday, April 3, 2009 7:49 AM
|
|
|
|
|
Hi.
I'm beginner in C#. I make an application to catalogue CD/DVD contents. I'm using Visual Studio 2008. I know how to view CD/DVD folders tree but I don't know how to do this automatic. For example: I put CD/DVD to one of my cd drive( I got 2 cd drive) and It is automatic load folder tree in TreeView component. If I eject CD/DVD the folder tree should disappear. Thx for any help
P.S Sorry for my english
|
|
|
|
|
|
Hi All
How can I access to the attribute of a field by an object to whom this field references to.
I have defined:
<br />
class A<br />
{<br />
[MyAttrib(Name="TestA";)]<br />
private Bb testing1 = new Bb();<br />
<br />
[MyAttrib(Name="TestB";)]<br />
private Bb testing2 = new Bb();<br />
}<br />
Now I want to access to 'MyAttrib' within class Bb in the following way:
<br />
class Bb<br />
{<br />
{private fields}<br />
<br />
public string GetName()<br />
{<br />
return (GetMyAttrib.Name)
}<br />
}<br />
Is there any way to do this by reflection.
Or how can the attributes assigned to the object-instances of Bb instead of assigning them to the fields?
Thank you
Tom
|
|
|
|
|
Try this where oClass is the object (ClassA).
Type t = oClass.GetType();<br />
sName = t.Name;<br />
<br />
<br />
PropertyInfo[] oPInfos = t.GetProperties();
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi there,
I have added a WebBrowser control in a Windows form and now I want that it should take me to www.microsoft.com.
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
//Whats the code for connecting to Microsoft.com?
}
I know that its a small piece of code. Please help me....
Your help will be appreciated..
Thanx for taking interest in my question,
Rajdeep.NET!
|
|
|
|
|
Try this:
webBrowser1.Url = new Uri("http://www.microsoft.com");
|
|
|
|
|
I tried the above code, but nothing is displayed....Help!
Is there any mistake with this code:
webBrowser1.Url=new Uri("http://www.microsoft.com");
|
|
|
|
|
i'm sure ,you are making mistake in some place.
Because i tried that and its working fine..
But if you don't want to change URL dynamically,then try to set URL property of web_browser1 to
http://www.microsoft.com..
|
|
|
|
|
The DocumentCompleted event occurs after a webpage loading is completed by the WebBrowser control. So no matter if you use Webbrowser1.Url of WebBrowser1.Navigate() it will not work in this event.
Instead use
webBrowser1.Url = new System.Uri("http://www.google.com", System.UriKind.Absolute); in your pageload or in init.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
uphh!! why 1 ??
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Hi,
thanx for your help Spunky.... I was successful in building the project. Thanx once again!
|
|
|
|
|
Will I place the code in Button1_Click event handler or WebBrower1_documentCompleted event handler?
|
|
|
|
|
The DocumentCompleted event signals that a page has loaded (or thereabouts - the actual timing seems a little odd). It occurs after you have connected to Microsoft.com. In order to actually connect, you need to call webBrowser1.Navigate(@"http://www.microsoft.com")
|
|
|
|
|
Hi,
Please tell me where should I insert following codes:
webBrowser1.Navigate(@"http://www.microsoft.com");
OR
webBrowser1.Url = new System.Uri("http://www.google.com", System.UriKind.Absolute);
will I have to enter the following code in the Button1_Click Event handler or WebBrowser1_DocumentCompleted event handler?
Please Help....
Rajdeep.NET
|
|
|
|
|
Read the replies you have been given. You are putting the code in the wrong event. Read the name of the event. Does it make sense to navigate to a page in the document_completed event?
Think about what you are doing and READ THE REPLIES YOU HAVE ALREADY BEEN GIVEN
|
|
|
|