4
votes

I have a .NET 2.0 project and I get the following error when I try to compile some projects that use SMO:

The primary reference "Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0".

To resolve this problem, either remove the reference "Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

Can someone help. I don't want to move the projects to .NET 3.5 because of this.

Thanks

1
You may be out of luck. The error message basically states that .NET 3.5 is required.Robert Harvey
The dll that I use has Runtime Version = v2.0.50727. It is build as a .NET 2.0 assembly. It was compatible and I didn't have any problems, until, I guess, I installed Visual Studio 2010 SP1... I wouldn't post the question if this wasn't the case.ileon

1 Answers

0
votes

As the exceptions says the current reference assembly needs .NET 3.5. You must downgrade Microsoft.SqlServer.Smo which support .NET 2.0.