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

  • SEARCH
  • Home
  • 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 8748887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:36:04+00:00 2026-06-13T12:36:04+00:00

I upgraded some legacy console application from .NET 2.0 to .NET 4.0. I am

  • 0

I upgraded some legacy console application from .NET 2.0 to .NET 4.0. I am getting a runtime error on the first line of Main() that “type is not a recognized attribute”. It is originating from the .exe.config file in the following section:

        <listeners>
            <add name="RHIOListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\Htp\RHIOListener.log"/>
            <remove type="System.Diagnostics.DefaultTraceListener"/>
        </listeners>

The problem is with the “remove type” line. It looks like the attribute should be “name” instead. I’m not sure what to do. There doesn’t seem to be an explicitly created, “named” DefaultTraceListener. Is this line even necessary?

  • 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. Editorial Team
    Editorial Team
    2026-06-13T12:36:05+00:00Added an answer on June 13, 2026 at 12:36 pm

    You can’t remove by type, you have to do it by name.

    Error message is because, according to .config schema, the only attribute allowed for remove node is name. Try one of the following:

    <listeners>
        <add name="RHIOListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\Htp\RHIOListener.log"/>
        <remove name="Default"/>
    </listeners>
    

    Or:

    <listeners>
        <clear/>
        <add name="RHIOListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\Htp\RHIOListener.log"/>
    </listeners>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just upgraded my application from Rails 2.3 to 3 and I'm getting some
We just upgraded some maven dependencies, that triggered an update of Jackson from 1.7.x
After having upgraded to XCode 4 im getting some linker warnings that Im a
I am doing some work on a legacy project, one that has been upgraded
Some strange error appeared after I upgraded my Ubuntu from (10.11, 11.04 i dont
I recently upgraded one of my project from MVC2 to MVC3 and adjusted some
I have recently upgraded from websphere 5.1.2 to websphere 6.1 server. I had some
Upgraded an app from 2.3 to 3.0 and now getting these. What's the best
I've been dealing with a legacy asp.net 2.0 web site that was originally setup
I upgraded some jar files from class file version 49.0 to 50.0 with ProGuard.

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.