c# app.config configuration sections problem

etienne_marais

Honorary Master
Joined
Mar 16, 2008
Messages
16,250
Reaction score
19,740
Location
Centurion
Can anybody see what is wrong with this in app.config ?

Code:
<configSections>
    <sectionGroup name="wwImplementations">
      <section name="WaterWatch" type="System.Configuration.AppSettingsSection,System.Configuration.NameValueSectionHandler,System" />
    </sectionGroup>
  </configSections>


  <wwImplementations>
    <WaterWatch>


    </WaterWatch>


  </wwImplementations>

The program which is a console app fails to compile, there are no errors in the errors window, but I have the following 'information' output which I think may cause the compiler to fail ?

errorWindow2.JPG

The program worked yesterday, somehow a line of '77777777777777777777777777777777777 and some garbage' appeared in app.config. I deleted the line and it would not compile from there on. Then I copied/pasted the entire app.config from production (where it works correctly) into the development app.config but it still does not compile.

I will post the entire error output screen and app.config later if nobody can seen anything wrong here, the other 'information' outputs are just recommendations.
 

Attachments

  • errorWindow.png
    errorWindow.png
    14 KB · Views: 16
Last edited:
What you see in the log is two information lines warning you that the xml elements "wwImplementations" and "waterwatch" are empty.

Which according to your app.config - they are - so that makes sense.

These do not affect compilation and your project isn't throwing compilation errors which are needed to cause this failure.

Why do you say compilation is failing? What are you expecting to see that you do not see?
 
Last edited:
What you see is in the log is two information lines warning you that the xml elements "wwImplementations" and "waterwatch" are empty.

Which according to your app.config - they are - so that makes sense.

These do not affect compilation and your project isn't throwing compilation errors which are needed to cause this failure.

Why do you say compilation is failing? What are you expecting to see that you do not see?
The <WaterWatch> section had a long series of "<add..." keys which I removed before posting here. The program says "build failed, do you want to continue with last successful build", but it shows no errors (or warnings), only the information lines of which all are recommendations such as 'can be converted to inline notation' and those two config sections.

I have since started a new console app and migrated all the code and config, all works now so I think something somewhere was corrupted (perhaps the project file itself)
 
The <WaterWatch> section had a long series of "<add..." keys which I removed before posting here. The program says "build failed, do you want to continue with last successful build", but it shows no errors (or warnings), only the information lines of which all are recommendations such as 'can be converted to inline notation' and those two config sections.

I have since started a new console app and migrated all the code and config, all works now so I think something somewhere was corrupted (perhaps the project file itself)
Quite possibly. Also sounds like you may have suffered a code conflict ie: conflict markers were inserted into the file.
 
Top
Sign up to the MyBroadband newsletter
X