Variable "undeclared or was never assigned" in Winforms code

When reloading a simple Silver .NET Winforms App after closing it earlier, I get the following error:

even if the line below is present in Main.Designer.swift:

private func InitializeComponent() {
    ...
	self.button1 = System.Windows.Forms.Button()
    ...
    }

The first build/compile will work properly, but upon exiting Visual Studio 2015 and reloading the project again, you get the error message in the photo above.

The exact same situation/error message can be recreated in Hydrogene Winforms if I remove the corresponding line, but in Silver, even with that line present, the error message appears upon re-loading a solution saved earlier.

Any idea what’s going on?

does this show for any project, for you? of not, can you send us the one that shows this? thanx!

It shows up in the simplest of projects… e.g. a blank Windows Form with only one button on it.

My environment is Visual Studio 2015 v 14.0.25431.01 Update 3.

(The VS that comes with Elements is unusably slow/unreliable with WPF… so I installed VS 2015 Community from the Microsoft provided .ISO instead)

Reproduced, thanx.

Thanks, logged as bugs://80580

Is there a way to view the status of this bug?

you can see the status here. Once something happens on it our RemObjects bugs bot will reply. If you set the tracking bit at the bottom to “watching” you’ll get notified via email too.

1 Like

This happens in MS C# and VB too.
Most common solution: Clean Solution, followed by rebuild.

bugs://80580 got closed with status fixed.

“Clean Solution followed by Rebuild” doesn’t work, at least not for Silver… (or using Visual Studio 2015 Community edition? The VS that comes with Elements compiler is unusably slow and unreliable for me)

I haven’t encountered the issue in C# at all.

And even if “Clean Solution” did work, that is just a temporary workaround and it is not a proper fix for the issue.

Having such an error for the most basic of tasks will confuse the heck out of people and turn them off from using Elements. I can’t even properly finish the simplest of tutorials because of this.

Have you seen the “Fixed” status?
That means there will be a version with the fix on Friday.
Maybe they can give you an internal build now with the fix (just ask).

1 Like

John,

are you saying the VS 2015 Shell as installed by Elements is slow/unreliable (unreliable how, precisely?), but when you install 2015 Community, speed is fine? If so, that is something we should look at (but in general, using Community will be as good a fix as any of course).

The actual WinForms issue is fixed; if you’d like, I can send you an updated build, ahead of Friday’s new build — what’s your account name on remobjects.com?

thanx,
marc

1 Like

Ooops thanks for pointing that out. :+1:

When I try to create a WPF app using the VS 2015 shell as installed by Elements, the designer interface becomes extremely sluggish to the point of unusability.


I’ve also noticed just now that under VS2015 Community Edition (update 3)… when using the Silver-Island template, that typing code in the IDE becomes noticeably slower (seems to be related to source completion lookup).

The same issue is NOT present when using the Winforms solution/project template and iirc, other .NET based Silver templates too.

Thanks, logged as bugs://80611

Hi,

I still can’t see the build here:

https://secure.remobjects.com/portal/downloads/elements.aspx

Can you send to my account, username “jbperez808”

Thanks!

Done, added to https://www.remobjects.com/portal/downloads/personal.

1 Like

Thanks!

Does this install over the older version cleanly or is an uninstall of the currently installed version recommended?

Is there a Visual Studio 2015 version available for 10.0.0.2309?

yes, the version i uploaded for you will install into vs2015 and 2017

1 Like