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 986639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:21:07+00:00 2026-05-16T05:21:07+00:00

I am using VS2010, is there a way, to disable full root namespaces, when

  • 0

I am using VS2010, is there a way, to disable full root namespaces, when VS is autogenerating code? From this:

{
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
}

to this:

using System.ComponentModel;
{
CollectionChangeEventHandler schemaChangedHandler = new CollectionChangeEventHandler(this.SchemaChanged);
}
  • 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-05-16T05:21:07+00:00Added an answer on May 16, 2026 at 5:21 am

    I don’t know if there is, however doing so is a VERY BAD idea.

    VERY BAD.

    VERY BAD.

    VERY VERY BAD.

    First, it suggests you are editing generated code. If you are, see above. The solution is to use partial classes, if you aren’t already. Almost all generated code is done using partial classes. If not, open a Connect.

    Second, it is there for a reason–it prevents generated code class names and namespaces from clashing with yours. When generated code isn’t globally scoped and it does clash, you only have two choices: Either rename your code or edit the generated code every time you regenerate it. This is the definition of a Pain in the Ass.

    I know it doesn’t look pretty, but the fact is you should NEVER be looking at it.

    NEVER.

    etc.

    Here’s a connect I opened because the EF4 T4 templates didn’t globally scope their variables, so the generated code clashed with my Debug namespace.

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

Sidebar

Related Questions

Is there a way to use the SQL Model (dbml) builder in VS2010 using
Is there a way to test a Web Service using VS2010 like it's used
I want to see if there is a way to do this... I'm Using
Is there a way to disable the warning prompt that pops up when vs2010
I'm using VS2010, C# to develop a WinForm application, is there a way to
I'm using VS2010 every day, and haven't noticed it before. There is too many
I'm using VS2010 Ultimate. Having code: //file IntSet.h #include stdafx.h #pragma once /*Class representing
Is VS2010, I analyzed my code and got this error: Warning 64 CA1050 :
I'm using Visual Studio 2010 + ReSharper. I there any way to modify auto-indent
Using VS2010, I created a Win32 C++ console application called TfsBuildTestTarget. This is just

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.