[英]Can I use .NET 4.0 API calls on .NET 2.0?
If I make .NET 4.0 API calls and the customer only has .NET 2.0 installed, will my EXE work? 如果我进行.NET 4.0 API调用,而客户仅安装了.NET 2.0,我的EXE是否可以工作? I assume no -- absolutely not.
我认为不会-绝对不会。 But I want to reconfirm and point this out to my client yes/no.
但我想再次确认并向我的客户指出是/否。
Background... I'm from the Linux/PHP world. 背景...我来自Linux / PHP世界。 My client uses a Windows C# app on the frontend, and Linux/PHP on the backend.
我的客户端在前端使用Windows C#应用程序,在后端使用Linux / PHP。 He's asked me to investigate this issue.
他要我调查这个问题。
尝试运行使用.NET 4.0编写和编译的任何内容时,.NET 2.0运行时都会出错,但事实并非如此。
Application code targeted against the .NET 4.0 framework will not run in an environment that only has the .NET 2.0 framework installed. 针对.NET 4.0框架的应用程序代码将无法在仅安装.NET 2.0框架的环境中运行。
See "Version Compatibility" section here: http://msdn.microsoft.com/en-us/library/8477k21c.aspx 请参阅此处的“版本兼容性”部分: http : //msdn.microsoft.com/zh-cn/library/8477k21c.aspx
What you can do is have your .NET 2 code access the .NET 4 libraries via a web service. 您可以做的是让.NET 2代码通过Web服务访问.NET 4库。 If you were to expose the .NET 4 API via a web service, it would be agnostic of the .NET version and the technology between them all together.
如果要通过Web服务公开.NET 4 API,则将无法确定.NET版本以及它们之间的技术。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.