Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 169637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:39:59+00:00 2026-05-11T12:39:59+00:00

I have a project that uses log4net and works fine on the developer machines.

  • 0

I have a project that uses log4net and works fine on the developer machines. When we build, a step in our build scripts calls the AssemblyInfo task to set version numbers and dates, etc. But the AssemblyInfo file also loses the line:

[assembly: XmlConfigurator(Watch = true)]

Is there any way to have the AssemblyInfo task not overwrite that line, or conversely, to have the AssemblyInfo task re-insert that line into the file (along with the appropriate using statement?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:39:59+00:00Added an answer on May 11, 2026 at 12:39 pm

    Well, thinking a little differently, you don’t have to have only one assembly info file.

    This is how we do it for a solution, each project has 3 assembly info files:

    1. AssemblyInfo.cs – Contains Guid, AssemblyTitle, AssemblyDescription, and any assembly specific attributes.

    2. ProductAssemblyInfo.cs – Contains AssemblyProduct, AssemblyVersion and AssemblyFileVersion. This way all assemblies in a product/solution share the same version.

    3. CompanyAssemblyInfo.cs – Contains AssemblyCompany, AssemblyCopyright, and any attributes we want all our assemblies to share.

    Items 2 and 3 are referenced using ‘Add as link’, this way they are shared from the single source code. Now, you may not want to adopt the same approach, but you could certainly use a similar structure and place your XmlConfigurator in a separate assembly info file from your assembly version details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Midas project that uses a TDataSetProvider in one of RemoteDataModules in the
I have inherited a project that uses LLBLGen Pro for the DB layer. The
I have inherited a project that uses the following pattern for passing parameters from
We have an old project that requires occasional maintenance that uses VS2003 and Dot
I have a .net interop project that uses an app.config file. When I am
I have a native VC++ project that uses a dll (which is not in
I have a .NET 3.5 WinForms project that uses several 3rd party controls and
I have an existing asp.net webforms project that uses Microsoft's Enterprise DAAB for the
I am working on a large project that uses the STL and have a
I have a .net project (MySolution.Common) that uses the app.config. I am using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.