简体   繁体   中英

VS2010 Multi-Targeting Not Working Correctly

I'm having an extremely strange problem with VS2010's multi-targeting. In a nutshell, only targeting .NET 3.5 Client Profile seems to be working correctly. I really need to be able to target .NET 2.0. Anyone have a thought or two?

Creating a brand new Windows Forms project:

创建一个全新的Win Forms项目

Has the incorrect versions targeted:

定位了不正确的版本

Targeting .NET 3.5 Client Profile - NOT plain old .NET 3.5 - does use the correct version: v2.0.50727. That is the only way I get 2.0 references, but I need to target 2.0.

Mystery solved. Had been using some registry settings to force PowerShell to consume .NET 4 assemblies. Maybe not the best approach in retrospect. Said registry settings follow:

hklm\\software\\microsoft.netframework /v OnlyUseLatestCLR /t REG_DWORD /d 1 hklm\\software\\wow6432node\\microsoft.netframework /v OnlyUseLatestCLR /t REG_DWORD /d 1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM