Permanently prevent generation of App.Config file

Posts   
 
    
webbsk
User
Posts: 17
Joined: 24-Sep-2009
# Posted on: 23-Feb-2011 20:21:06   

In a previous post, someone has already addressed my question about preventing the generation of the App.Config file:

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=11848&HighLight=1

You can either remove the SD.Task.Generic.AppConfigFileGenerator Task or set it to disabled. However, as soon as I close and open the project again, it has forgotten my settings even though I saved the project.

How can I permanently prevent the App.Config file from being generated every time rather than going in and manually making this change every time (which frankly isn't any better than just manually deleting the file)?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 23-Feb-2011 20:48:19   

No need for this, actually, as the app.config file being generated is not used, it's a file which you can use in your own application. After all, your application's .config file is the one which is used not the one generated in the generated code.

You can make the file readonly on disk, which is also going to prevent it from being overwritten. But you should just leave it as-is, really, as you do your configuration in the application's .config file which is a different file.

Am I overlooking something? If so, please explain so we can help you further simple_smile

Frans Bouma | Lead developer LLBLGen Pro
webbsk
User
Posts: 17
Joined: 24-Sep-2009
# Posted on: 23-Feb-2011 20:52:52   

I don't know why asking a question on a forum makes me immediately realize my mistake, but here it is for others looking for the same answer:

Remove or disable (I recommend just disabling) the task and then up at the top of that window hit the "Save" button, either to the Task list you have open or save to a new one. Please note that this will change the tasks for all projects using this, so you may want to save as new.

I may have missed something, so even though I have answered my own question, I'd love to hear comments about this solution. Thanks.

webbsk
User
Posts: 17
Joined: 24-Sep-2009
# Posted on: 23-Feb-2011 21:00:08   

Wow, we must have been writing at the same time. simple_smile

Well, actually the problem with the file automatically being generated is that it keeps on being picked up by source control. Also, in particular I'd like it to stop being added to the DatabaseSpecific.csproj file. We never use the file because we have a different custom file instead. However, when the solution moves over to the build, it breaks because it tries to compile a missing file. Is there some other way to get this segment removed?


   <None Include="DatabaseSpecific\App.config">
      <GeneratedBy>LLBLGen Pro</GeneratedBy>
    </None>

This has to be removed from the csproj file after every code generation. However, when I disable/remove the task from the task list it isn't added which is what we want. One of our practices is that there's no point in keeping around files that we don't use which is why it was removed from the solution in the first place. So, I'm happy with doing it this way unless there's some other reason not to.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 24-Feb-2011 09:16:59   

I don't know why asking a question on a forum makes me immediately realize my mistake

smile

One of our practices is that there's no point in keeping around files that we don't use which is why it was removed from the solution in the first place. So, I'm happy with doing it this way unless there's some other reason not to.

If so, then you have got it right.