简体   繁体   中英

visual Studio 2010 - Adding support for .net 3.5 SP1

I have Visual Studio 2010 on Windows 7. My project is using the .net framework 3.5, but how do I go about referencing SP1 methods? The installer tells me to use Window's add / remove system programs, but that says .NET 3.5.1 is installed. I'm trying to follow the example at 'http://blogs.msdn.com/b/alexj/archive/2009/11/07/tip-41-how-to-execute-t-sql-directly-against-the-database.aspx' on executing a raw SQL command with entity framework, but I can not reference ".StoreConnection", as it's an SP1 addition.

Note that when I go to my project properties, I only have the option for .net 3.5 compact and .net 3.5. "SP1" is not listed anywhere.

Thanks in advance


I figured out my issue. I was trying to directly reference the common DBConnection as was shown to me for what Entity.Connection is. I needed to reference the EntityClient.EntityConnection specifically.

Thanks all

You just reference the .NET 3.5 libraries. If your project targets the 3.5 framework then your references will be set to them. They get patched when you install SP1. Look at the versions of the .NET 3.5 libraries in your references. They should be that of the 3.5 SP1 libraries.

If you have 3.5 SP1 installed, then you're ok. The version numbers didn't change, as shown by this Serverfault question .

To use anything from 3.5 (or 3.5SP1) you need to reference the appropriate assembly in your project. To do this, click on References, and add the appropriate reference from the dialog under .NET.

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