Jump to content

Update Project WPF Version to WPF 4.6

Go to solution Solved by Franck,

Your framework version is tied to the Target Framework option in the Project properties / Application. All features will be available up to the selected version. Changing this option will (and should) update properly your toolbox to match the available controls for that specific version. Unless your references in your GAC point to an earlier version. If it's not updated you need to close Visual Studio all together and reopen the project using the .sln file. This ensure the default settings are loaded per solution/project settings and not default framework setup on your profile.

I'm working on a WPF app, and from what i noticed, i'm missing a lot of the WPF features and controls...

 

I looked at the top of all my .xaml files, and all of them reference this :

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

I'm guessing that is the WPF version from all the way back from 2006 .... which is WPF 3.0 (https://www.codeproject.com/Articles/1035800/WPF-Versions-History-and-Major-Enhancements)

 

I tried tinkering with this, seeing all of the other available options, but none of them are from a different year, all are from 2006 ...

which is a bit weird, since it says that the WPF 4.6 is available in .Net 4.6 and Visual Studio 2015 ...

The current project uses .Net 4.7.2 and i'm using Visual Studio 2019 Preview 4 ...

 

I was searching around to find an answer to this, but i couldn't find any info, other than people asking how to make an updater for their apps ?

 

My question is :

How can i update the WPF version that my project uses ? (it seems to be using *3.5 SP1, but the newest one is 4.6 even tough im using .Net 4.7.2 and VS 2019)

 

*Edit : 3.5 SP1, not 3.0, since it looks like i have stuff like the "Native splash screen" but i also dont have the "Calendar, DataGrid and Date Picker" controls, and i found that there are some schemas.microsoft.com/winfx/2008 references, although not used in the .xaml

**Edit #2 : .... looks like it is 4.0, i do have Calendar and DataGrid and that stuff ... i was just blind ... xD Still, how can i update it to 4.6 ?
 

Link to comment
https://linustechtips.com/topic/1046060-update-project-wpf-version-to-wpf-46/
Share on other sites

Link to post
Share on other sites

Your framework version is tied to the Target Framework option in the Project properties / Application. All features will be available up to the selected version. Changing this option will (and should) update properly your toolbox to match the available controls for that specific version. Unless your references in your GAC point to an earlier version. If it's not updated you need to close Visual Studio all together and reopen the project using the .sln file. This ensure the default settings are loaded per solution/project settings and not default framework setup on your profile.

Link to post
Share on other sites

1 minute ago, Franck said:

Your framework version is tied to the Target Framework option in the Project properties / Application. All features will be available up to the selected version. Changing this option will (and should) update properly your toolbox to match the available controls for that specific version. Unless your references in your GAC point to an earlier version. If it's not updated you need to close Visual Studio all together and reopen the project using the .sln file. This ensure the default settings are loaded per solution/project settings and not default framework setup on your profile.

It is set to .Net Framework 4.7.2 in the Properties, and that is my problem/question

I should have WPF 4.6 but i dont, all of the stuff available in that version isnt available here

+ i just checked, PresentationCore, PresentationFramework, WindowsBase and System.Xaml are all version 4.0.0.0 ....

Link to post
Share on other sites

Just now, Aleksa Djordjic said:

BTW, what is GAC Point xD ?

Global Assembly Cache. To keep it simple this is where the .Net libraries are stored. See it as the static global placeholder. If you have a DLL and you place it next to your application it uses that DLL but if you were to put that DLL in the GAC you need it only in 1 place and all Application can see it even if it's not by it side. A bit like cheating and dropping the DLL in the System32 folder but in reality that trick works for another reason.

Link to post
Share on other sites

10 minutes ago, Aleksa Djordjic said:

It is set to .Net Framework 4.7.2 in the Properties, and that is my problem/question

I should have WPF 4.6 but i dont, all of the stuff available in that version isnt available here

+ i just checked, PresentationCore, PresentationFramework, WindowsBase and System.Xaml are all version 4.0.0.0 ....

Those 4 libraries listed are indeed 4.0.0.0. That is the last updated version of those libraries.

Ohhh i get it, i guess you are mixing up file version and framework version. New controls have not been added since 4.0 which added calendar and datetime picker

Link to post
Share on other sites

3 minutes ago, Aleksa Djordjic said:

I dont get this anymore ... what are the WPF 4.6 Library versions then xD

And how do i get it

4.6 fixed touch movement and those are framework fix and not WPF and added support for transparent childs. These change only affected the .net framework no changes were needed in the WPF libraries. Same for 4.5, 4.5.1 and 4.5.2.

Link to post
Share on other sites

1 minute ago, Franck said:

4.6 fixed touch movement and those are framework fix and not WPF and added support for transparent childs. These change only affected the .net framework not changes were needed in the WPF libraries. Same for 4.5, 4.5.1 and 4.5.2.

What about the 4.5, 4.5.1, 4.5.2 ..... i dont have them [I dont have stuff from them, like the Ribbon control for example], how could i have 4.6 then ?

Link to post
Share on other sites

20 minutes ago, Aleksa Djordjic said:

What about the 4.5, 4.5.1, 4.5.2 ..... i dont have them [I dont have stuff from them, like the Ribbon control for example], how could i have 4.6 then ?

4.5 added the ribbon control. By default it's not in the toolbox that one. You need to add it in the toolbox and you need to target at least framework 4.5.

4.5.1 and 4.5.2 as far as i remember they were only hotfixes and nothing new.

Link to post
Share on other sites

1 minute ago, Franck said:

4.5 added the ribbon control. By default it's not in the toolbox that one. You need to add it in the toolbox and you need to target at least framework 4.5.

4.5.1 and 4.5.2 as far as i remember they were only hotfixes and nothing new.

Ok, tnx ?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×