Why is sharepoint 2010 targeting .Net version 2.0?
Whenever 开发者_StackOverflow中文版I have an error on my page it prints out the .Net and ASP versions being used. It says:
Version Information: Microsoft .NET Framework Version:2.0.50727.5446; ASP.NET Version:2.0.50727.5420
Why is it targeting 2.0 and how can I change it to use 3.5?
Remember that for the purposes of asp.net, 3.5 is just a set of extensions for the 2.0 runtime. So 3.5-based sites still show 2.0 here, because they are running in a 2.0 app pool. If you have 3.5 code you need, it should work just fine here.
You can't change what SharePoint's DLLs are targeting. That being said, there is no point. Any code that you add to the GAC can be in 3.5. If you write an app to pull/push data to a SharePoint site, you can use 3.5. You gain nothing by trying to switch the .Net version that SharePoint is targeting.
精彩评论