Llarian
Llarian

Reputation: 81

Using EnumBuilder in C#

I am using EnumBuilder like described in https://stackoverflow.com/a/792332/910502 to create an enum based on values of a database and like'd to use this approach on a non-developer machine - I can deploy a dummy assembly, but have no post-build events and can't trigger the console app, because the assembly is already in use by the exe referencing it and therefore the access is denied.

One approach might be to have a third app, that functions as a starter: First start the console app that creates the assembly, then start the application using it.

What is the recommended way for situations like this?

Upvotes: 0

Views: 1638

Answers (1)

Thowk
Thowk

Reputation: 407

You didn't provide much details, but I think that you can achieve your goal by using simple bash/powershell script which will run 'enum-generator' and then 'app' which will expect this dll at specyfic directory.

Regarding dynamic enum generator. Have you considered using T4 Templates? Looks like a little bit cleaner approach.

Upvotes: 0

Related Questions