简体   繁体   中英

Microsoft.SqlServer.Management Smo Error

I have a asp.net project which is runing on .Net Framework 2.0 with Visual Studio 2008. Everything is working smoothly. Now I want to change Visual Studio 2008 to Visual Studio 2010. When I build the project in Visual Studio 2010 and .Net Framework 2.0 I get the error like:

The type or namespace name 'Smo' does not exist in the namespace 'Microsoft.SqlServer.Management' (are you missing an assembly reference?)

How can I solve this problem?

My Microsoft.SqlServer.Smo.dll versions is 10.0.0.0 and Runtime version is v2.0.50727.

In short: I would go ahead, and make sure that the migrated project is targeting the right framework version. In your case it is .NET 2.0. That might be something that your project is missing in project configuration/properties.

By default any migrated project in VS environment targets the default framework of new IDE. In your specific case, i belief it is targeting NET 4.0. Just change it.

Edit: This issue is related to direct dependency of Smo to .NET 3.5. Here you are more detailed post in Microsoft forum - Microsoft.SqlServer.Smo could not be resolved .

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