.ecfg file name

770
3
06-04-2014 07:43 AM
KarenRobine
Occasional Contributor II
I'm generating some .ecfg files using post build events in my projects. I'm using .NET 4.5 and Visual Studio 2012. My file names are in the following format:
{<guid_id>}_<nameOfClass>.ecfg
But I noticed that most of the other ones are just <nameOfClass>.ecfg

I didn't see anything in ESRIRegasm.exe to name mine <nameOfClass>.ecfg.
How do I do this?
0 Kudos
3 Replies
JohnHauck
Occasional Contributor II
The files that are generated as: <nameOfClass>.ecfg lack "AssemblyInfo" details.

For example go into one of your projects that generates the {<guid_id>}_<nameOfClass>.ecfg. In the Solution Explorer (for a C# project) under properties you will see AssemblyInfo.cs. Right-click this and click Properties...set the build action to None. For VB (I am not a VB guy) but the easiest way I saw was to right-click the project in the Solution Explorer > Unload...right-click again > Edit...search for AssemblyInfo. You should see <Compile Include="<Project>\AssemblyInfo.vb" />...remove this line and reload the project. On the next build you should see the .ecfg generate without the GUID.

The main reason we use this pattern is to help avoid name collisions...avoiding the case where more than one developer creates a acme.ecfg.
0 Kudos
KarenRobine
Occasional Contributor II
Thanks John. I had a feeling that was the reason why. Makes perfect sense.
0 Kudos
NeilClemmons
Regular Contributor III
For a VB project, you can find the ApplicationInfo.vb file under My Project in the Solution Explorer.  Make sure you click the Show All Files button at the top of the listview or you won't be able to expand the My Project node.  You can edit the file without unloading the project.
0 Kudos