如何确保我使用的是.Net v4.0 [英] How to Ensure I am using .Net v4.0

查看:121
本文介绍了如何确保我使用的是.Net v4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的情况:

  • .net v4.0 ASP应用程序(使用4.0的目标框架构建)
  • 大多数客户的服务器上都安装了.net v4.0
  • 我有.我的计算机上安装了Net v4.5
  • 我需要使用v4.0框架进行本地测试

问题是, 如何确保在本地计算机上针对.Net v4.0框架进行测试? 如果我进入IIS并在应用程序池中选择.Net版本,则只会看到V4, 和V2.我不希望针对V4.5进行测试,因为我们的客户将没有此运行时.

The question is,how can I make sure that I am testing against .Net v4.0 framework on my local machine? If I go in to IIS and select the .Net version in the App Pool, I only see V4, and V2. I do not wish to test against V4.5 because our customers will not have this runtime.

我可以假设如果我针对VS 2013中的v4.0编译应用程序,那么IIS将自动检测DLL是为v4.0编译并以4.0模式运行的吗?同样,我可以假设如果我在.Net v4.5中编译DLL,则IIS将自动 切换到4.5模式?我必须更改IIS中的任何设置以强制IIS在v4.0模式下运行吗?

Can I assume that if I compile the app against the v4.0 in VS 2013, that IIS will automatically detect that the DLLs are compiled for v4.0 and run in 4.0 mode? Likewise, can I assume that if I compile the DLLs in .Net v4.5 that the IIS will automatically switch to 4.5 mode? Is there any setting I have to change in IIS to force IIS to run in v4.0 mode?

注意:我意识到我的问题与IIS有关,但这不是ASP的特定问题.如果我运行的是exe,可能会问同样的问题.例如,如果我编译了一个v4.0 exe并在安装了v4.5的计算机上运行它,该应用程序是否 在.Net 4.0下运行?还是.Net 4.5?

Note: I realise that my question relates to IIS, but this is not an ASP specific question. The same question could be asked if I were running an exe. For example, if I compiled a v4.0 exe and run it on a machine with v4.5 installed, would the application be running under .Net 4.0? Or, .Net 4.5?

推荐答案

>>  

I think you can create a project based on 4.0


这篇关于如何确保我使用的是.Net v4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆