针对.NET Framework 4的安装框架4.5时

编程入门 行业动态 更新时间:2024-10-12 03:18:32
本文介绍了针对.NET Framework 4的安装框架4.5时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我安装我的电脑上VS2010和VS2012,不得不在.NET Framework 4.0,然后我升级到.NET Framework 4.5。不过,我还是开发需要在.NET框架4.0的应用程序的工作。该项目说,它是针对.NET Framework 4的(客户端配置文件)的组件,甚至点在引用的程序集的.NET Framework 4.0文件夹中。问题是当我提出这个申请一个机器,只有4.0将不会启动,并拿出错误眼前的问题是从的WindowState = {结合的WindowState} ,你不能在4.0做,但你可以在4.5。我需要这个扔在我的开发之外,为什么不呢?我的假设是,尽管我尽了最大努力的是,它是否存在,他们使用了4.5的DLL。我怎样才能使它真正使用4.0没有卸载4.5?

I have VS2010 and VS2012 installed on my computer and had the .NET Framework 4.0 which I then upgraded to .NET Framework 4.5. However, I am still developing apps that need to work on .NET Framework 4.0. The project says that it is targeting .NET Framework 4 (Client Profile) the assemblies even point to .NET Framework 4.0 folder under Referenced Assemblies. The problem comes when I move this application to a machine that only has 4.0 it won't start and come up with errors the immediate problem being an exception resulting from WindowState={Binding WindowState} which you can't do in 4.0 but you can in 4.5. I need this to throw the exception on my development box, why doesn't it? My assumption is that despite my best efforts is that it uses the 4.5 dlls if they exist. How can I make it really use 4.0 without uninstall 4.5?

更新

要瑞普此安装.NET Framework 4.5,并创建一个WPF项目面向.NET Framework 4.0中。绑定的WindowState一个属性在一个虚拟机或代码背后使这个属性有一个公共的get和私人集。 .NET框架4.5处理这个问题就好了,即使模式=双向必须忽略组.NET Framework 4的不和抛出异常:一个双向或者OneWayToSource结合不能类型的只读属性国家工作.. 。在使用.NET框架箱4.5作品就像一个魅力试一试的机器上只的.NET Framework 4.0和它吹起来......于是就如何真正目标4.0安装4.5时,任何想法?

To repro this install .NET Framework 4.5 and create a WPF project targeting .NET Framework 4.0. Bind the WindowState to a property in a VM or code behind make this property have a public get and private set. .NET Framework 4.5 handles this just fine even when Mode=TwoWay must ignore the set .NET Framework 4 doesn't and throws an exception: "A TwoWay or OneWayToSource binding cannot work on the read-only property 'State' of type...". On the box with .NET Framework 4.5 works like a charm try it on a machine with only .NET Framework 4.0 and it blows up... So any ideas on how to really target 4.0 when 4.5 is installed?

到MS错误报告在这里:的 connect.microsoft/VisualStudio/feedback/details/774694/targeting-net-framework-4-0-when-4-5-doesnt-seem -to-工作

Bug report to MS here: connect.microsoft/VisualStudio/feedback/details/774694/targeting-net-framework-4-0-when-4-5-doesnt-seem-to-work

推荐答案

这似乎是在.NET框架4.5的一个错误,它应该抛出异常。但随着.NET框架4.5安装是没有办法对NET框架4.0它总是使用4.5应用程序运行。

This appears to be a bug in .NET Framework 4.5 and it should throw the exception but with .NET Framework 4.5 installed there is no way to have your application run on .NET framework 4.0 it will always use 4.5.

请参阅本报告的bug的详细信息: 的 connect.microsoft/VisualStudio/feedback/details/773682/wpf-property-with-private-setter-is-updated-by-a-twoway-binding

See this reported bug for more info: connect.microsoft/VisualStudio/feedback/details/773682/wpf-property-with-private-setter-is-updated-by-a-twoway-binding

更多推荐

针对.NET Framework 4的安装框架4.5时

本文发布于:2023-11-12 21:32:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582580.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:框架   NET   Framework

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!