0

Closed

SQL Engine: Programmability: CLR:AssemblyCleanup:CS There are Warnings in the Code Analysis resuts.

description

Environment:

1. Win2k3 ENT ENU
2. Yukon DEV ENU 09.06.2031.00, Sample MSI 62013
3. Whidbey 8.0.50727.42

Steps:

1.Open the CS solution file "...\CS\" in Whidbey
2.Execute code analysis from the menu: Build -> Run Code Analysis on
  1. Check the analysis results.

Expections:

The analysis results should be "0 Error, 0 Warning, 0 Messages"

Actual Results:

There are Warnings. Details are as follows:
Warning 1 CA2000 : Microsoft.Reliability : Modify AssemblyCleanup.CleanupUnusedAssemblies(Boolean):Void to dispose local 'conn' of type 'SqlConnection' for all code paths. C:\Program Files\Microsoft SQL Server\90\Samples\Engine\Programmability\CLR\AssemblyCleanup\CS\AssemblyCleanup\AssemblyCleanup.cs 280 AssemblyCleanup
Closed Jul 17, 2009 at 5:14 AM by leilu

comments

wrote Apr 28, 2009 at 7:23 AM

Added the Ln 279 "conn.Dispose();" in the file "AssemblyCleanup\CS\AssemblyCleanup\AssemblyCleanup.cs".

wrote Jul 17, 2009 at 5:14 AM

Verified on Sample Build 90714