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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:51:42+00:00 2026-05-12T19:51:42+00:00

This is driving me nuts. I think it is because of some connection string

  • 0

This is driving me nuts. I think it is because of some connection string mismatching across the app (using MVC) but Visual Studio constantly takes my .designer.cs file and recreates it adding a ‘1’ at the end (or 2 if it already did this before argh!). My question is two-fold: Is there a way to stop VS from doing this? But more importantly: How can I manually set it back to the original .designer.cs or is that not possible? I try to delete the new one it created (because I keep getting duplicate definition build errors) and it won’t automatically associate back with the original one in the DBML file structure in solution explorer.

Does anyone have a solution for this madness?

  • 1 1 Answer
  • 1 View
  • 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-12T19:51:43+00:00Added an answer on May 12, 2026 at 7:51 pm

    Not an ideal solution, but a workaround would be the following. In Visual Studio, go into the properties of the .dbml file and clear out the Custom Tool property. This will prevent it from running the auto-generator against the DBML and creating the designer files. Of course further changes to the DBML won’t be reflected in the designer file.

    As for why it’s generating multiple designer files, that’s an oddity. To manually associate a file under another, you need to modify the project file. Look for a line like

    <Compile Include="file.designer.cs" />
    

    and change it to

    <Compile Include="file.designer.cs">
        <DependentUpon>file.dbml</DependentUpon>
    </Compile>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is driving me nuts. I am using some 3rd-party code in a Windows
I'm using .Net 2.0 and this is driving me crazy but there's probably some
Ok, this is driving me nuts. I've done just about everything I can to
NHibernate is driving me 'Nuts'!!! I have the following mapping. Which returns this error
Total newbie question but this is driving me mad! I'm trying this: myInt =
This is driving me crazy. I have this one php file on a test
This is driving me crazy. I'm not going to take it anymore. I'm going
This has been driving me crazy for a few days. Why doesn't the following
This issue is driving me mad. I have several tables defined, and CRUD stored
This is a bit of a long shot, but if anyone can figure it

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.