Solved! Go to Solution.
You can use the same syntax, but you need to add the reference ESRI.ArcGIS.ADF.Connection.Local
This reference is not found in the Add ArcGIS References list, but in the full Add Reference list
[ATTACH=CONFIG]23905[/ATTACH]
After adding the reference, you'll have to go into its properties and manually change the Specific Version to False
Warning 'ESRI.ArcGIS.ADF.ComReleaser' is obsolete: 'The assembly containing this class is obsolete. Reference the ESRI.ArcGIS.ADF.Connection.Local assembly instead.'.
A reference was created to embedded interop assembly 'ESRI.ArcGIS.Carto' because of an indirect reference to that assembly from assembly 'ESRI.ArcGIS.ADF'. Consider changing the 'Embed Interop Types' property on either assembly.
A reference was created to embedded interop assembly 'ESRI.ArcGIS.Carto' because of an indirect reference to that assembly from assembly 'ESRI.ArcGIS.ADF.Local'. Consider changing the 'Embed Interop Types' property on either assembly.
Change the reference to ESRI.ArcGIS.ADF.Connection.Local
There was a recent discussion on here about why the COM releaser isn't a good idea. I've been having good results using Marshal.ReleaseComObject(<your object>) instead.
some more info here:
http://forums.arcgis.com/threads/4298-What-s-Up-with-ComReleaser-Is-it-really-working
http://forums.arcgis.com/threads/75186-Memory-leak-with-FeatureClass-object
Type 'ESRI.ArcGIS.ADF.ComReleaser' is not defined.
Did you also remove the reference ESRI.ArcGIS.ADF.ComReleaser?