I tried to change the USE_LAZY_LOADING registry value with no luck.
For some reason project.ImportDirectory does not work at all (after reboot this morning) in my app. ImportFile though does work. Why is that? Yesterday some automatic configuration got it working, maybe some registry setting like Geert says? Note, it works in my add-in, but not in my console application using API (only yesterday after I must have enabled something through using EA somehow).
Can anyone else use ImportDirectory though an external application? Any advice? Since it's worked, it must be some setting (authentication or something?).
-----------------------------------
Ok, it works now. It seems it only works when you call an update on the output package, for example:
This worked:
outputPackage = GetPackage(rootPackage, “Test”); // custom function
outputPackage.Update();
string guid = project.GUIDtoXML(outputPackage.PackageGUID);
project.ImportDirectory(guid, “C#”, path, “recurse=1”);
This did not work:
outputPackage = GetPackage(rootPackage, “Test”); // custom function
string guid = project.GUIDtoXML(outputPackage.PackageGUID);
project.ImportDirectory(guid, “C#”, path, “recurse=1”);
You were right I think, thanks Simon. Also, changing to "Create Package per Directory" option is done by changing the registry values for EA (IMPORT_TREE_PKG_STRUCT_NS = 0 for per directory, = 1 for per namespace, etc).
------
This problem is fixed in build 856.