Hi all,
I’ve been asked to build a .NET console application using the ArcGIS Pro SDK to edit features in a Utility Network. Since UN uses branch versioning, I shouldn’t edit DEFAULT directly—I need to connect to and edit a named branch version.
Environment
- ArcGIS Pro: 3.1.4
- .NET: 6.0
- Database: SQL Server
- Connection: Enterprise Geodatabase direct connect
What I tried (Enterprise Geodatabase connection)
I create a Geodatabase using DatabaseConnectionProperties and specify a version name in the connection properties. I tried different version name formats such as:
- versionName
- user@domain.versionName (and similar fully-qualified formats)
But when I do that, the constructor throws:
- Exception: “The specified version does not exist.”
The version definitely exists (it’s created in Pro before I run the test).
What I observed
If I create the Geodatabase without specifying a version and then call:
- Geodatabase.GetVersions()
…it returns only one version: DEFAULT. No child versions show up under DEFAULT either.
I also checked whether the geodatabase supports versioning and what versioning type it is. It reports:
- Supports versioning: Yes
- Versioning type: Traditional
Attempted alternative (service-based)
Since branch versions are tied to services, I tried using a service geodatabase approach, but in my console project Visual Studio shows:
- Compile error: ‘ServiceGeodatabase’ is inaccessible due to its protection level
So I can’t even instantiate/use ServiceGeodatabase from my code.