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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:37:01+00:00 2026-05-11T07:37:01+00:00

Is anyone aware of a way to make visual studio completely ignore a file

  • 0

Is anyone aware of a way to make visual studio completely ignore a file when compiling? I have a C# solution that has a foo.config file that isn’t really a standard config file – it’s just a text file. During compiling VS grabs a hold of the file and bombs.

I’d like for it to act as though it’s just a text file. I do not have the option of changing the name of the file.

EDIT: Please note that BuildAction does not exclude files from the compiler checking them. It simply decides if the file is compiled into the assembly, whether it’s content (like a jpg or something), or whether it is a resource file. For more info: see the MSDN page.

EDIT2: Apparently, if you have a text file that is named foo.config and you have it open while building, VS2005 will pop up an error thinking that the file should be xml. However, if you close the file, VS2005 will ignore it.

Solution: Visual Studio validation causes errors if you have a non-compliant file open during build time. For an example of how to turn this off (for HTML), see Scott Guthrie’s post. As Allen mentioned, you should also have the Build Action turned to ‘None’. Unfortunately, this will not stop build errors if you have the file open.

  • 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-11T07:37:02+00:00Added an answer on May 11, 2026 at 7:37 am

    right click > properties

    Build Action: set to ‘None’

    Edit: If you’re talking about app.config, you really cant mess with the format of that, you need to put it in a different .config file.

    I just double checked, VS.net doesnt care as long as its not app.config or web.config and the config file build action is set to ‘None’, it will ‘error’ if you have the file open but it will not cause the build to fail or keep it from building the assemblies.

    Close the file and the errors will go away, similar to the errors you get about HTML markup. The displaying of these ‘errors’ is probably a configurable setting in vs.net

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

Sidebar

Ask A Question

Stats

  • Questions 78k
  • Answers 78k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Did you try the constructor? map = new GMap2(document.getElementById('map_canvas'), {… May 11, 2026 at 3:43 pm
  • added an answer Okay, I think I was getting it wrong. As John… May 11, 2026 at 3:43 pm
  • added an answer The ReferenceEquals method you are calling is the static method… May 11, 2026 at 3:43 pm

Related Questions

Is there an easy way to chase down table/stored procedure/function dependencies in SQL Server
Is anyone aware of general UI design guidelines for increasing ad revenue from web
I am writing a system monitor for Linux and want to include some watchdog
A coworker of mine thought of a great way to visualize a lot of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.