views:

70

answers:

2

I have a Winform App that we uses internally that I publish through ClickOnce with SQL Express 2005. The app also references a couple of Microsoft.SqlServer dll's. I am trying to figure out how the Specific Version settings work. I have SQL 2008 installed on my machine they have 2005.

If I select Specific Version = false will it care that the users have SQL 2005 or does that depend on the dll.

Specifically, If I do not specify Specific Version does that mean it will just look in the GAC for any version of that dll?

+1  A: 

"Specific Version" is only relevant when you compile, it has no effect at runtime. When set to False, the IDE won't complain when the [AssemblyVersion] of the reference assembly has changed. Which is not that great an idea, you ought to be aware of the changes you might have to make in your code because the assembly changed.

The CLR will not look for any version of an assembly in the GAC. Only a exact match is accepted. That's the default policy, you can override it with a <bindingRedirect> in the app's .config file. Version checking isn't done when you deploy the assembly locally.

Afaik, there isn't a provider for SQL Server that's specific to the SQL Server version number. Not quite sure about that.

Hans Passant
+1  A: 

Someone at MSFT who's related to the SQLExpress product told me today that it's so hard to figure out if it's installed already, they have a program that does it that's part of the bootstrapper package in Visual Studio. (I was ragging him about how difficult it is to install SQLServer.)

Writing code in a .NET application to connect to and use a SQLServer database is not version-specific, and Microsoft is committed to maintaining backward compatibility.

RobinDotNet