C# Help

I am using the trial to see if this will work for me, but I am having trouble.I am using visual studio 2010, program is net.4, and using C#.I was able do everything correct till it came to the code. In my Designer I am getting 2 errors:

private void InitializeComponent() { this.automaticUpdater1 = new wyDay.Controls.AutomaticUpdater();and

private wyDay.Controls.AutomaticUpdater automaticUpdater1;

The error code is below:Error 3 The type or namespace name 'wyDay' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Joey\Desktop\Database\Database\Database\Form1.Designer.cs 104 17 Database

If anyone had this problem I thank you for helping me if you have some answers Thanks

Did you add the AutomaticUpdater to your app as per the "AutomaticUpdater tutorial for Windows Forms" or "AutomaticUpdater tutorial for WPF apps" articles?

Check your references to see if the AutomaticUpdater is properly referenced:

[attachment=0]au-reference.png[/attachment]

Thank you for your reply:

Yes I have that on the form. Seems as soon as I put that on the form is when I get the error.I have coded up the rest of it and it seems to have no errors.

The only error that is left is this:

private wyDay.Controls.AutomaticUpdater automaticUpdater1;

The wyDay is red..

The type or namespace name 'wyDay' could not be found (are you missing a using directive or an assembly reference?)

Open the "References" node in the Solution explorer in Visual Studio. Do you see the "AutomaticUpdater" there?

Yes Sir.

it is the first one.

Remove it, then re-add it. If your app is really a .NET 4.0 app, then make sure you're adding the AutomaticUpdater from the Microsoft .NET 4.0 subfolder. (e.g. C:\Program Files (x86)\wyBuild\AutomaticUpdater\Microsoft .NET 4.0\AutomaticUpdater.dll ).

THAT WORK!!!!

I was using the wrong version.

Thank you for your help!!!1

My pleasure. If you have any other questions we'll be happy to help.

After I published my app and I try to test the update fuction I get this error?

The wyUpdate executable was not found: C:\Users\Joey\AppData\Local\Apps\2.0\CDPKQ53P.VJ0\AK88EAN1.5Z8\matr..tion_f7f922a10fa3d5c3_0001.0000_5809c10f5bf67d03\wyUpdate.exe

Have you seen this before?

Thanks for you help

After I published my app ...

How are you publishing your app? Are you using ClickOnce? Or are you using one of the installers we recommend (NSIS, Inno Setup, or WiX)

I have tried Inno and NSIS.

When I code the void LoadSettings() statement, it will not install correctly.After I complile and try to run the app it does not open.When I take out the statement it works fine.This is how I have it coded.

public partial class OpenForm : Form { public OpenForm() { InitializeComponent();

if (!automaticUpdater1.ClosingForInstall) LoadSettings();

} void LoadSettings() {

}

I have tried Inno and NSIS. For some reason when I use the void LoadSettings() statement after I install the app it wil not open.When I remove it things seem to fine. I dont see any errors..

If this helps this is all the code that I am using on this form;

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;

namespace Matrix{ public partial class OpenForm : Form { public OpenForm() { InitializeComponent();

if (!automaticUpdater1.ClosingForInstall) LoadSettings(); } void LoadSettings() { }

private void exitToolStripMenuItem_Click(object sender, EventArgs e) { this.Close();

}

private void ChangeWharehouseButton_Click(object sender, EventArgs e) { WharehouseChange remoteWharehouseChange; remoteWharehouseChange = new WharehouseChange(); remoteWharehouseChange.ShowDialog();

}

private void TechMotorsButton_Click(object sender, EventArgs e) { TechMotors remoteTechMotors; remoteTechMotors = new TechMotors(); remoteTechMotors.ShowDialog();

}

private void automaticUpdater1_ClosingAborted(object sender, EventArgs e) { LoadSettings();

} }}

Is LoadSettings() empty in your real program? Is your app actually compiling?

Yes it does compile and install, but when I go to run it never opens.

Open the Task Manager (right click your taskbar and click "Start Task Manager"). Now try to run your app, do you see your app running in the list?

no sir, it never shows up. Kinda like it is trying to open and then stops.

And it magically works when you remove the following 2 lines?:

if (!automaticUpdater1.ClosingForInstall)LoadSettings();

Can you send me a small example project that reproduces this? Send it to wyatt@wyday.com

yes sir.I could send you the script if you would like to look at it?

I am sure it is something that I missing I am fairly new to programming.

A good place to start is the step-by-step walkthrough. It explains every step in detail (with pictures).

Yes I followed that. Everything works execpt when I complile.I have the FTP working, when I click on the .EXE it gives me correct message, and debug works.The only problem I have is when I try to install the app.

Are you including all the files in your installer and are they being installed?:

  • YourApp.exe
  • AutomaticUpdater.dll
  • wyUpdate.exe
  • Client.wyc

In your installation folder, double click wyUpdate.exe -- is there an error being shown?

That I am not doing.I will try that thanks for your help, I will get back to you.

Yes That worked!!!Thank you for your time and effort!!!I have just purchased a product key.

Thanks a bunch!!!!