开发者

Visual Studio References: Specific Version setting question

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 dep开发者_如何学Cend 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?


"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.

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜