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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:41:00+00:00 2026-06-02T00:41:00+00:00

I am using EF Code First with migrations for a project and I have

  • 0

I am using EF Code First with migrations for a project and I have stumbled upon a strange behavior:

Executing the “Enable-Migrations”-command in the Package Manager Console generates a “Migrations” folder and “Configurations.cs” file. When I check the encoding of the “Configurations.cs” in Notepad++ it shows that it is ANSI encoded.

When I create an arbitrary file in Visual Studio 2010 it’s always encoded in UTF-8. Why does NuGet generate the file in another encoding?

Thanks in advance,
Chris

  • 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-02T00:41:01+00:00Added an answer on June 2, 2026 at 12:41 am

    I finally got around to properly investigating this…

    The files (Configuration.cs and the individual migration files) are actually being saved as UTF-8 without a file signiture. This format is indistinguishable from ANSI unless non-ANSI characters appear somewhere in the file. Tools like Notepad++ will only show it as UTF-8 if there are non-ANSI characters in the file. This is because a UTF-8 file with only ANSI characters is 100% compatible with the ANSI format.

    If you have non-ANSI characters in your context type name, table names, etc. things will work as you expect, and Notepad++ will report the file format as UTF-8.

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

Sidebar

Related Questions

I'm using EntityFramework code first with migrations. From the package manager console, I'm running
in my current project I'm using code first approach. I have a type called
I have an AXIS2/JAX-WS web service using a code first implementation (yes I know,
I'm using Entity Framework Code First v 4.3.0 I have a two entities with
I am using Code First Migrations Beta 1. I would like to see the
Im using EntityFramework and EntityFramework.Migrations to implement solution using Code-First and Automatic Migrations. Wherever
When I first built the website, I was using EF4 Code First (without migrations).
I'm using Entity Framework 4.3 with code first and manual migrations. I'm trying to
I just got on board with EF 5 and am using their code-first migrations
I've been using Code-First Migrations Beta up until now and when migrating my database

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.