In my C# Console Application, Visual Studio 2010 highlights new FeatureClassNameClass() in my below line of code and states "ESRI.ArcGIS.Geodatabase.FeatureClassNameClass has No constructors defined" and then states cannot be embedded. Use aplicable interface instead. How else can I define pOutFeatClassName as type IFeatureClassName?

IFeatureClassName pOutFeatClassName = new FeatureClassNameClass();

If I change the code to below, then Visual Studio does not throw an immediate error but once I run my application Visual Studio immediately bombs at this line and only states "error vshost32.exe". What is going on? Many Thanks for any suggestions..

Hi Kirk- above my Main I have private static IAoInitialize m_pAoInitialize; And in my Main I have IAoInitialize ao = new AoInitialize(); ao.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo); Is there any issue with the way I have setup my licenseInitializer?
–
JoshFeb 3 '11 at 20:58

I'm able to go through other functions that use ArcObjects and I don't get an error there. But if I have not initialized my licenseinitialzer the best way then I need to
–
JoshFeb 3 '11 at 21:00

Hi Kirk- I had forgot to include another line of my code where I do actually do the runtime binding so I believe I am doing that correctly. Besides, there are a number of other functions that use ArcObjects that I have no trouble on. Neil Clemmons on ESRI forums responded with an interesting response in the below link. I still don't understand why FeatureClassName has no constructor based on what he said but I will try to do what he suggests. Your thoughts? forums.arcgis.com/threads/…
–
JoshFeb 7 '11 at 14:07

What happens if you create a new project (new arcgis console app) with references to necessary assemblies, then copy and paste the code I posted?
–
Kirk KuykendallFeb 7 '11 at 16:13