-
WPF Beginner Class
Dear All,
I have just started to learn WPF, and the very first exercise, a simple one with a button and textbox, generates the following error:
Option Strict On disallows implicit conversions from 'System.Windows.Application' to 'WpfApplication1.Application'
And this is before I have actually added any controls!
What do I do now?
Regards,
John
-
Re: WPF Beginner Class
Hello,
Can you talk through exactly what you have done to get to where you are right now?
From my Visual Studio 2010 application, I have just selected File | New Project..., then Other Languages, Visual Basic | Windows | WPF Application.
Once loaded, I hit F5, and I got a blank WPF Form open up.
What have you done?
Gary
-
Re: WPF Beginner Class
Gep13,
I am using Windows XP and VB2008 Express. When I open a new project, I click on the WPF Application icon; click OK to accept the default name; it then tells me it is loading, and loads Window1, and then I get the error message. Before I actually do anything.
Regards,
John
-
Re: WPF Beginner Class
Wow, that is very strange!
Is it possible that you can zip up the folder and all the files that Visual Studio created for you, and attach them here?
Have you made sure that you have all the latest updates, both for Windows and for Visual Studio?
Gary
-
1 Attachment(s)
Re: WPF Beginner Class
Gep13,
I am not allowed to update my computer as it is a company computer and the company IT department decide when and what to update.
But I include the files generated.
Regards,
John
-
Re: WPF Beginner Class
Hello,
Can you describe the exact steps that you took to generate what you have?
I am getting the same error as you have described, but I can't see what would have caused it. I will do some digging.
Gary
-
Re: WPF Beginner Class
Gary,
as is mentioned above, all that i do is open a new project then click on the WPF Application icon and then click OK to accept the default name. that is all.
regards,
john
-
Re: WPF Beginner Class
Hello,
Short of installing 2008 Express Edition on my machine, I don't know what else to suggest.
This worked fine when I tried it from New Project on my Visual Studio.
Have you been able to replicate this?
Gary
-
Re: WPF Beginner Class
Gary,
i have repeated this at least 5 times, ech time with the same result. also, of course, any project created in Expression Blend 4 will not open in vb 2008 express.
i will try it at home on my personal machine when i get the time.
thank you for your response.
regards,
john
-
Re: WPF Beginner Class
Hello,
Hold on there...
At no point, until post #9, did you mentioned Expression Blend.
Was this project that you uploaded created in Visual Studio 2008 Express edition, or Expression Blend 4?
Gary
-
Re: WPF Beginner Class
Gary,
the project was created in Visual Studio 2008 Express. i was simply saying that when i also created a project with Expression Blend 4, it would not open in Studio 2008 Express.
regards,
john
-
Re: WPF Beginner Class
Ok, you mentioned that you don't have the ability to update your PC, but can you check version you have Service Pack 1 for Visual Studio 2008 installed?
I am not saying that this will necessarily fix the problem that you are having, but it is definitely a good place to start checking.
Gary
-
Re: WPF Beginner Class
Gary,
what i will have to do is check the version on my personal computer. that version is the full Microsoft Visual Studio 2008; professional i believe which i bought about 18 months ago.
i will try the same exercise on my personal computer and will report the results. however, as i will be going on leave shortly and will not be back until the end of august, i may not be able to do it before then.
regards,
john
-
Re: WPF Beginner Class
Hello,
In Visual Studio, go to Help | About and take a screen shot of what you see, and paste it here.
Gary