Is prism using legacy code? - wpf

We are using prism for developing WPF applications. The newest(4.1) version supports only windows 7 and windows server 2008 as per the following link
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28950
This begs a question. As far as I know specific operating system support is only required for assemblies with legacy code. If the assembly is completely written in .NET it just need the .NET frame work support as this itself is a "virtual machine".
If this is true is prism contains legacy code?

The Prism 4.1 Deveoper's Guide provided here says the following:
This guidance was designed to run on the Microsoft Windows 7, Windows Vista, or Windows Server 2008 operating system. This version has been smoke tested on Windows XP Professional and Windows Server 2003, but it has not been exhaustively tested. WPF applications built using this guidance require the .NET Framework 4.0 and Silverlight applications require Silverlight 5.
All this means is that they haven't tested it on XP, but you needed XP SP 3 and above for the last release (the minimum for .NET 4.0), so my guess is it will likely work for new projects.
No need to panic.

Related

Windows Phone or Windows Phone Silverlight

I have just installed Windows 8.1 and then installed Visual Studio 2013 Community Edition.
I tried to create a Windows Phone app and found out that there are two ways of creating it (in fact 3 if you count Universal Apps if I am not wrong)
Windows Phone
Windows Phone Silverlight
Can someone please tell me what exactly is the difference between these two? I read a couple of articles but still don't understand and this whole thing is very confusing.
When I tried to create a Windows Phone Silverlight project then it asked me whether I want to target 8.0 or 8.1.
When I tried to create Windows Phone project then it asked me to get a Developer license and didn't ask about version 8.0 or 8.1.
What shall I chose if my aim is to create an application for mobile devices (tablet/phones) that will run on maximum devices running Windows Phone 8 version?
Windows Phone 8 Silverlight is the older UI on Windows Phone 8. WinRT XAML is used for Windows Store Apps(these are Universal Apps). Windows Phone 8.1 Silverlight is a bit different as explained here.
Windows Phone Silverlight, although older, is better in some ways. If your aim is to develop an app that is targeted only for phones and that doesn't have any use getting ported to Win8/RT, go with Silverlight. Background Audio is a mess in WinRT. Speech Recognition with Cortana is worse.
The controls of WinRT XAML are buggy. For example, there is a clear performance degradation of MapControl in WinRT XAML, whereas, in Silverlight, this is smoother.
On the other hand, Windows Store Apps have .NET Native, which converts C# to native C++ code, resulting in performance gains.
For a beginner, I would advise starting with Windows Phone 8 Silverlight apps.
Windows Phone Silverlight is the "old" platform that WP8.0 apps are built on. It asked you to target 8.0 or 8.1 because WP8.1 has a hybrid mode that lets you build WP8.1 apps but still have access to the Sliverlight API if you had a whole lot of legacy code you didn't want to port over just yet.
Windows Phone is the (mostly) universal platform for WP8.1 that is based on Windows Runtime.

Application that works on pc and mobile

I have to create an application with metro design on vs2010 and windows 7.
The application should work both on pc and device without internet.
Initially i though of wpf but i do not know if it works on Mobile.
Please let me know how i can develop once such standalone application for
both device and PC also
Unfortunately, there is not a single platform that targets both PC and Phone...although, the presumption is that Windows Phone and Windows Store applications are moving toward a unified foundation.
Windows Store applications unfortunately don't run on Windows 7. Only Windows 8 and above, but the advantage is they work with the desktop version as well as the tablet version of windows.
If you want to target windows 7 and say windows phone as well, your best bet is to use portable class libraries to create a common "core" for the application. And use WPF for the desktop which has a lot in common with XAML for Windows Phone.
If you want to target windows phone 8, you have to use Visual Studio 2012 or above.
Pretty old question, but in case anyone is still blindfolded, there is UWP.
Furthermore, if you want to have XAML and C# deployed as native apps in a variety of platforms (UWP, Droid, iOS, WinPhone), be sure to check out Xamarin, which now belongs to Microsoft, and follows the awesomeness of open-source MIT just as the entire .NET does now.

WPF one executable file from project

I have a WPF project with one external library. Is it possible to make one executable file "*.exe" from this project to run on windows systems even without .net? and how to insert that library into .exe file?
You will need to have the .net framework installed on the clients pc. What this says is that since .Net has been preinstalled on Windows since XP SP1, you should target your application to the runtime that is available on the system you wish to install it on. And since you are targeting WPF you will need to make sure that you have available .net 3.5 or greater. You may want to look into the Client installation of the framework since it is smaller. And you may want to look at this Stackoverflow question
i.e. from above link
Windows .Net Framework
Win 7 SP1 4
win 7 3.5.1 ( can be updated to .Net Framework 4 through windows updates )
windows vista 3.0 ( can be updated to .Net Framework 4 through windows updates )
windows XP Sp 1 2.0
You must have .net installed to use a wpf application. You can use clickonce to make the install experience more friendly to the user, if he doesn't the right version of the .net framework installed.
As for the external third party library, see my answer here for the same issue.

some troubles with WPF and Windows XP

is .net framework 3 compatible with xp? i install visual studio 9.0 (.net 3.5) on win XP. when i compile a WPF project and try to run it, this error occurs:
cannot initialize application ...... at address 0x<some digits>
(antivirus protection is off)
after first fail of wpf, all other project types (windows application, console &...) after compiling don't run.
where is problem?
WPF and .NET 3.5sp1 are supported on XP. You can create WPF applications with run on Windows XP.
It sounds like you have some other issue on your XP system. If other project types (ie: console) are failing, this is most likely some other, more serious issue.
Edit:
The System Requirements for .NET 3.5sp1, including WPF, are listed here. Basically, you need to have XPsp2 or better if you're using 32bit Windows XP, but both 32bit and 64bit XP are supported fully.

Error targeting .NET framework 3.0

I have an application, which I develop in VS 2008 and I target .NET 3.
Unfortunately when I install on a clean computer with .NET 3, it crashes. And besides the usual TypeInitilisationError, I have no clue why.
Updating the same machine to .NET 3.5SP1 makes it run fine.
Is there something broken in VS2008 that prevents from telling me a more detailed error?
How can I be sure I don't use any of the newest classes of the framework?
It is true that I found myself using DropShadowEffect which belongs to 3SP1. I removed it.
But still...it does not work.
What am I doing wrong?
Have you tried to determine which version of the framework is installed on each computer. If you're using .Net 3.5 SP1 to compile the program it actually includes .Net 3.0 sp2 which has some extra features (MultiSelector class to name one) which are not available in .Net 3.0 sp1 which is the default install with .Net 3.0 download from Microsoft.
You can try here for some software that will help:
NetVersionCheck
EDIT:
Visual Studio won't tell you about any errors for this because everything seems fine with the version of .Net 3.0 that it's using. I ran into this problem using the WPF toolkit as it requires the MultiSelector class which didn't arrive until .Net 3.0 sp2. So, Jonathan, if you can show us the error output from your program on the 'Fresh' .Net 3.0 computer then we could probably tell you what you're using that is in .Net 3.0 sp2 that isn't supported in lower versions.
Also, I usually use VS2005 with programs that I want to run under a lower runtime than .Net 3.5sp1, but this really only applies to .Net 2.0 apps.
If we knew what components from .Net 3.0 that you're using, it would help as well!
Noah
Thanks for the answer.
Because of VS2008, on my dev computer i have the latest 3.5SP1.
But in Visual Studio i selected 3 as a target.
And to check i install on a clean computer with 3.0...
So your proposition do tells me which framework is installed, but does not tell me what in my program uses in the newest framework that is not present in 3.0.
Moreover, something must be broken in VS2008 as it should warm me for that...
I feel like this is a problem with VS 2008, but obviously MS feels differently.
VS 2008 comes with .NET 3.5, some .NET 3.0 service pack, and .NET 2.0 SP1. It can only detect whether you are using things that don't belong to a version that is installed on your machine, not whether you are conforming to some service pack. This means that if you target .NET 2.0, but install your software on a machine that does not have .NET 2.0 SP1, if you use anything specific to SP1 your application will fail when it tries to make the call.
The only way to detect this that I have seen is to inspect the changelist of the service packs or to target .NET 3.5. If .NET 3.5 is installed, so are the service packs that come with it. It's not a good solution, but it's the only one I've found.

Resources