Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5060

C Sharp build fails with invalid token text at root level of document

$
0
0

I have a C# Windows Forms project that has a text file name db.config that contains a connection string like:

Data Source=localhost\SQLSRV;Initial Catalog=db;User Id=sa;Password=********;

The properties of the files are:

  • Build action: Content
  • Copy to Output Directory: Copy always
  • Custom Tool: -
  • Custom Tool Namespace: -
  • File Name: db.config
  • Full PathL: c:\path\to\solution\Config\db.config

When I am building the solution I get these two errors:

  1. Invalid token 'Text' at root level of document.
  2. XML document must contain a root level element

Any idea how on how to fix the build ?


Viewing all articles
Browse latest Browse all 5060

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>