|
|
One of the advantages of a forum is learning from each other. You have deleted your original question.
Why?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
how to run the xml file (exe) as standalone application.how to run outside the bin folder.my application get crashed when it runs outside the project. i have developed windows application using xml file.
|
|
|
|
|
Member 12431701 wrote: i have developed windows application using xml file. XML is not a programming language, so it is most unlikely that you have developed a Windows application from it. Please edit your question, show the actual code that is failing and explain what happens.
|
|
|
|
|
An XML file isn't an exe - it isn't executable.
As to why you app doesn't work outside the debugging environment - we can't tell you without knowing a heck of a lot more about it. What does it do? How does it do it? When does it crash? How do you make it crash? What happens when it does crash? Are there any messages?
What have you tried to find out why it crashes?
Remember, we can't see your screen, access your HDD, or read your mind - and we have no access to your code or data at all.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: read your mind
You write that often and every time I think to myself, "now that's probably a good thing"
|
|
|
|
|
So do I ... so do I ...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
to avoid confusion: a good thing you can't read one's mind
|
|
|
|
|
Member 12431701 wrote: my application get crashed when it runs outside the project. It requires all the files in the output-directory to be present. Did you just copy the executable?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
An xml file is not an exe, it can't be run, it can't be an application.
You have to explain what you have really done.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Does anyone know how to install the Roslyn compiler for Visual Studio 2012 on Windows 10 ?
Download Microsoft “Roslyn” CTP from Official Microsoft Download Center[^]
I receive an error on installation and google is not really helpful. I tried several things like compatibility mode and checking the .Net installation. All seems fine (SDK installed) except that Windows 10 is not indicated as OS on the download page.
Here is the error:
[276C:211C][2016-04-18T14:25:28]: Burn v3.6.2719.0, path: C:\Users\VincentM\Downloads\RoslynSetup.exe, cmdline: '-burn.unelevated BurnPipe.{32143D4F-4C78-45CB-988A-A6B93A37845C} {2CF91043-F7AA-4AC1-B07E-82DE3CD5DCE8} 4204'
[276C:211C][2016-04-18T14:25:29]: Setting string variable 'WixBundleLog' to value 'C:\Users\VincentM\AppData\Local\Temp\Microsoft Roslyn CTP_20160418142529.log'
[276C:211C][2016-04-18T14:25:29]: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\VincentM\Downloads\RoslynSetup.exe'
[276C:211C][2016-04-18T14:25:29]: Setting string variable 'WixBundleName' to value 'Microsoft "Roslyn" CTP - September 2012'
[276C:211C][2016-04-18T14:25:29]: Detect 1 packages
[276C:211C][2016-04-18T14:25:29]: Setting numeric variable 'VisualStudio11SdkInstalled' to value 1
[276C:211C][2016-04-18T14:25:29]: Setting numeric variable 'VisualStudio11ProCoreInstalled' to value 1
[276C:211C][2016-04-18T14:25:29]: Detected package: Roslyn.msi, state: Absent, cached: None
[276C:211C][2016-04-18T14:25:29]: Condition 'VisualStudio11ProCoreInstalled' evaluates to true.
[276C:211C][2016-04-18T14:25:29]: Condition '(VisualStudio11ProCoreInstalled AND VisualStudio11SdkInstalled) OR (NOT VisualStudio11ProCoreInstalled AND NOT VisualStudio11SdkInstalled)' evaluates to true.
[276C:211C][2016-04-18T14:25:29]: Detect complete, result: 0x0
[276C:211C][2016-04-18T14:25:30]: Plan 1 packages, action: Install
[276C:211C][2016-04-18T14:25:30]: Setting string variable 'WixBundleRollbackLog_Roslyn.msi' to value 'C:\Users\VincentM\AppData\Local\Temp\Microsoft Roslyn CTP_20160418142529_0_Roslyn.msi_rollback.log'
[276C:211C][2016-04-18T14:25:30]: Setting string variable 'WixBundleLog_Roslyn.msi' to value 'C:\Users\VincentM\AppData\Local\Temp\Microsoft Roslyn CTP_20160418142529_0_Roslyn.msi.log'
[276C:211C][2016-04-18T14:25:30]: Planned package: Roslyn.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[276C:211C][2016-04-18T14:25:30]: Plan complete, result: 0x0
[276C:211C][2016-04-18T14:25:30]: Apply begin
[106C:274C][2016-04-18T14:25:30]: Creating a system restore point.
[106C:274C][2016-04-18T14:25:30]: Created a system restore point.
[106C:274C][2016-04-18T14:25:31]: Caching bundle from: 'C:\Users\VincentM\AppData\Local\Temp{c6fd3e8f-5a1b-4b3a-82fe-f080a0ee2fe3}.be\RoslynSetup.exe' to: 'C:\ProgramData\Package Cache{c6fd3e8f-5a1b-4b3a-82fe-f080a0ee2fe3}\RoslynSetup.exe'
[106C:274C][2016-04-18T14:25:31]: Registering bundle dependency provider: {c6fd3e8f-5a1b-4b3a-82fe-f080a0ee2fe3}, version: 1.2.20906.1
[106C:11F0][2016-04-18T14:25:31]: Verified acquired payload: Roslyn.msi at path: C:\ProgramData\Package Cache.unverified\Roslyn.msi, moving to: C:\ProgramData\Package Cache{9C2B4CBE-16F1-40DD-BCFB-80CB112D092D}v1.2.20906.1\Roslyn.msi.
[106C:11F0][2016-04-18T14:25:31]: Verified acquired payload: cab380791BEDCBEA1CB60710969DD36BD8A at path: C:\ProgramData\Package Cache.unverified\cab380791BEDCBEA1CB60710969DD36BD8A, moving to: C:\ProgramData\Package Cache{9C2B4CBE-16F1-40DD-BCFB-80CB112D092D}v1.2.20906.1\Roslyn.cab.
[106C:274C][2016-04-18T14:25:31]: Applying execute package: Roslyn.msi, action: Install, path: C:\ProgramData\Package Cache{9C2B4CBE-16F1-40DD-BCFB-80CB112D092D}v1.2.20906.1\Roslyn.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" ARPSYSTEMCOMPONENT="1"'
[106C:274C][2016-04-18T14:25:40]: Error 0x80070643: Failed to install MSI package.
[106C:274C][2016-04-18T14:25:40]: Error 0x80070643: Failed to execute MSI package.
[276C:211C][2016-04-18T14:25:40]: Error 0x80070643: Failed to configure per-machine MSI package.
[276C:211C][2016-04-18T14:25:40]: Error 0x80070643: Failed to execute MSI package.
[106C:274C][2016-04-18T14:25:40]: Skipped rollback of package: Roslyn.msi, action: Uninstall, already: Absent
[106C:274C][2016-04-18T14:25:40]: Removing cached package: Roslyn.msi, from path: C:\ProgramData\Package Cache{9C2B4CBE-16F1-40DD-BCFB-80CB112D092D}v1.2.20906.1\
[106C:274C][2016-04-18T14:25:40]: Removing bundle dependency provider: {c6fd3e8f-5a1b-4b3a-82fe-f080a0ee2fe3}
[106C:274C][2016-04-18T14:25:40]: Removing cached bundle: {c6fd3e8f-5a1b-4b3a-82fe-f080a0ee2fe3}, from path: C:\ProgramData\Package Cache{c6fd3e8f-5a1b-4b3a-82fe-f080a0ee2fe3}\
[276C:211C][2016-04-18T14:25:41]: Apply complete, result: 0x80070643, restart: None, ba requested restart: No
thanks!
(PS: I mainly use it for the interactive C# compiler, any good alternatives on that are also welcome)
|
|
|
|
|
Error 0x80070643 points to a .NET Framework update installation error[^].
I suspect that the Roslyn installer is trying to install an update to .NET 4.5; since Windows 10 comes with .NET 4.6 "baked-in", the update can't be applied.
Unfortunately, that means your only option will be to upgrade to VS2015. Depending on what you're doing, and the size of your company, you might be able to use Community edition[^], which is effectively a free version of VS2015 Pro.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
how to declare the controller to add the lines in the database at the same time
<form class="formulaire" action="/Create/Id" method="post">
<div id="person">
<input type="Text" id="" name="name_person" value=""/>
<input type="email" id="" name="email" value=""/>
<input type="phone" id="" name="phone" value=""/>
</div>
<div id="person">
<input type="Text" id="" name="name_person" value=""/>
<input type="email" id="" name="email" value=""/>
<input type="phone" id="" name="phone" value=""/>
</div>
<div id="person">
<input type="Text" id="" name="name_person" value=""/>
<input type="email" id="" name="email" value=""/>
<input type="phone" id="" name="phone" value=""/>
</div>
<div id="person">
<input type="Text" id="" name="name_person" value=""/>
<input type="email" id="" name="email" value=""/>
<input type="phone" id="" name="phone" value=""/>
</div>
<div id="person">
<input type="Text" id="" name="name_person" value=""/>
<input type="email" id="" name="email" value=""/>
<input type="phone" id="" name="phone" value=""/>
</div>
<input type="submit" name="enregistrer" value="Enregistrer" />
</form>
|
|
|
|
|
You have just given us a dump of an HTML fragment. You are completely missing any C# context here at all, and seem to expect us to make assumptions about your codebase. I assume this is an ASP MVC page, for instance. If so, you really need to ask a fuller question in the ASP.NET forum here - remember to include as much detail as possible.
This space for rent
|
|
|
|
|
Hi All
Would appreciate some help on the following code which results in the form disappearing, rather than persisiting. Probably something really silly (code newbie, please be gentle).
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
namespace TCPReader
{
public class frmConfiguration : System.Windows.Forms.Form
{
private void frmConfiguration_Load(object sender, System.EventArgs e)
{
}
private System.Windows.Forms.Button btnok;
private System.Windows.Forms.Button button2;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
public USBReader.readerqueue m_queue;
public USBReader.Socketclient m_sclient;
public System.Threading.Thread thread1;
public System.Threading.Thread threadClient;
private System.Windows.Forms.TextBox txtipaddres;
private System.Windows.Forms.TextBox txtportno;
private void btnok_Click(object sender, System.EventArgs e)
{
try
{
bool flag = txtipaddres.Text != "" && txtportno.Text != "";
if (!flag)
{
System.Windows.Forms.MessageBox.Show("Enter IP Address and Port No to Connet\n to the Node", "Node Control", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Asterisk);
Show();
}
else
{
System.IO.TextWriter textWriter = System.IO.File.CreateText(System.Windows.Forms.Application.StartupPath + "\\IPAddress.txt");
textWriter.WriteLine(txtportno.Text + ";" + txtipaddres.Text);
textWriter.Close();
DialogResult = System.Windows.Forms.DialogResult.OK;
Close();
}
}
catch (System.Exception e1)
{
}
}
private void button2_Click(object sender, System.EventArgs e)
{
DialogResult = System.Windows.Forms.DialogResult.Cancel;
Close();
}
private void Configuration_Load(object sender, System.EventArgs e)
{
bool flag = !System.IO.File.Exists(System.Windows.Forms.Application.StartupPath + "\\IPAddress.txt");
if (!flag)
{
System.IO.TextReader textReader = System.IO.File.OpenText(System.Windows.Forms.Application.StartupPath + "\\IPAddress.txt");
string s = textReader.ReadLine();
textReader.Close();
char[] chArr = new char[] { ';' };
string[] sArr = s.Split(chArr);
txtportno.Text = sArr[0];
txtipaddres.Text = sArr[1];
}
else
{
txtipaddres.Text = "";
txtportno.Text = "";
}
}
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnok = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtipaddres = new System.Windows.Forms.TextBox();
this.txtportno = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Palatino Linotype", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.SystemColors.HotTrack;
this.label1.Location = new System.Drawing.Point(24, 36);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(73, 18);
this.label1.TabIndex = 2;
this.label1.Text = "IP Address";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Palatino Linotype", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.SystemColors.HotTrack;
this.label2.Location = new System.Drawing.Point(42, 72);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(55, 18);
this.label2.TabIndex = 3;
this.label2.Text = "Port No";
//
// btnok
//
this.btnok.BackColor = System.Drawing.Color.AliceBlue;
this.btnok.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnok.Font = new System.Drawing.Font("Palatino Linotype", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnok.ForeColor = System.Drawing.SystemColors.HotTrack;
this.btnok.Location = new System.Drawing.Point(103, 114);
this.btnok.Name = "btnok";
this.btnok.Size = new System.Drawing.Size(69, 23);
this.btnok.TabIndex = 3;
this.btnok.Text = "O&k";
this.btnok.UseVisualStyleBackColor = false;
this.btnok.Click += new System.EventHandler(this.btnok_Click);
//
// button2
//
this.button2.BackColor = System.Drawing.Color.AliceBlue;
this.button2.Cursor = System.Windows.Forms.Cursors.Default;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button2.Font = new System.Drawing.Font("Palatino Linotype", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.ForeColor = System.Drawing.SystemColors.HotTrack;
this.button2.Location = new System.Drawing.Point(189, 114);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(69, 23);
this.button2.TabIndex = 4;
this.button2.Text = "&Cancel";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtipaddres);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtportno);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.btnok);
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Font = new System.Drawing.Font("Palatino Linotype", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.ForeColor = System.Drawing.SystemColors.HotTrack;
this.groupBox1.Location = new System.Drawing.Point(23, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(288, 158);
this.groupBox1.TabIndex = 8;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Configuration";
this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);
//
// txtipaddres
//
this.txtipaddres.BackColor = System.Drawing.SystemColors.Window;
this.txtipaddres.Location = new System.Drawing.Point(103, 36);
this.txtipaddres.Name = "txtipaddres";
this.txtipaddres.Size = new System.Drawing.Size(155, 25);
this.txtipaddres.TabIndex = 1;
this.txtipaddres.TextChanged += new System.EventHandler(this.txtipaddres_TextChanged);
//
// txtportno
//
this.txtportno.BackColor = System.Drawing.SystemColors.Window;
this.txtportno.Location = new System.Drawing.Point(103, 72);
this.txtportno.Name = "txtportno";
this.txtportno.Size = new System.Drawing.Size(155, 25);
this.txtportno.TabIndex = 2;
//
// frmConfiguration
//
this.AcceptButton = this.btnok;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Snow;
this.ClientSize = new System.Drawing.Size(335, 197);
this.ControlBox = false;
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "frmConfiguration";
this.Load += new System.EventHandler(this.Configuration_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
protected override void Dispose(bool disposing)
{
bool flag = !disposing || (components == null);
if (!flag)
components.Dispose();
base.Dispose(disposing);
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void txtipaddres_TextChanged(object sender, EventArgs e)
{
}
} // class frmConfiguration
}</pre>
Regards
Active
|
|
|
|
|
You don't tell us when it disappears, but if it's when you press a button then it's because you told it to:
private void btnok_Click(object sender, System.EventArgs e)
{
try
{
bool flag = txtipaddres.Text != "" && txtportno.Text != "";
if (!flag)
{
System.Windows.Forms.MessageBox.Show("Enter IP Address and Port No to Connet\n to the Node", "Node Control", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Asterisk);
Show();
}
else
{
System.IO.TextWriter textWriter = System.IO.File.CreateText(System.Windows.Forms.Application.StartupPath + "\\IPAddress.txt");
textWriter.WriteLine(txtportno.Text + ";" + txtipaddres.Text);
textWriter.Close();
DialogResult = System.Windows.Forms.DialogResult.OK;
Close();
}
}
catch (System.Exception e1)
{
}
}
private void button2_Click(object sender, System.EventArgs e)
{
DialogResult = System.Windows.Forms.DialogResult.Cancel;
Close();
} That's what Form.Close does: closes the current form.
BTW: Don't swallow your exceptions: they mean you don't find out why it failed (or that it failed in this case). Report 'em, log 'em, whatever. But empty catch blocks don't help anyone - least of all you.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Thanks OriginalGriff
Apologies, should have made my description clearer, the form never actually appears (or if it does then it quickly disappears), it is the only form currently and I am not entering / selecting anything (I don't get the chance).
Any thoughts appreciated.
Regards
Active
|
|
|
|
|
So what code are you displaying it with?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I had expected that the following should make the form appear -
private void frmConfiguration_Load(object sender, System.EventArgs e)
{
}
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnok = new System.Windows.Forms.Button();
etc ...
Regards
Active
|
|
|
|
|
No - what code makes the form display?
Are you creating it in Main (in process.cs)?
Or do you display it from an existing form?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Thanks, I was missing the .Run in main, thought it was something silly.
The form now appears but it is blank (no text, fields etc displaying), probably something else missing.
Regards
Active
|
|
|
|
|
I don't see any form constructor in your code? So what is calling InitializeComponent - if you don't call that in a constructor, then there will be nothing to show!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
As you say the form constructor was missing (previously created by another form), silly me, again. Now working.
I appreciate your help OriginalGriff, thanks again.
Regards
Active
|
|
|
|
|
You're welcome!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
BTW: Are you creating all this by hand? If so, why?
You do realise that VS can create a "tidier" version of all that for you automatically?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|