Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Error2 Build failed due to validation errors in *.dbml

Error2 Build failed due to validation errors in *.dbml

Scheduled Pinned Locked Moved C#
helpcsharpworkspacelinqtutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sc steinhayse
    wrote on last edited by
    #1

    I am getting the following error message in a C# 2008 application and I do not know what to look at to resolve the problem: Error2Build failed due to validation errors in C:\RPT.dbml. Open the file and resolve the issues in the Error List, then try rebuilding the project. There is nothing showing me where the exact error is coming from. There is a reference setup for System.Configuration. The following code is from the RPT.designer.cs

    namespace cli
    {
    using System.Data.Linq;
    using System.Data.Linq.Mapping;
    using System.Data;
    using System.Collections.Generic;
    using System.Reflection;
    using System.Linq;
    using System.Linq.Expressions;
    using System.ComponentModel;
    using System;
    using System.Configuration;

    [System.Data.Linq.Mapping.DatabaseAttribute(Name="DEV")]
    public partial class RPTDataContext : System.Data.Linq.DataContext
    {

    private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();

    public RPTDataContext() :
    base(ConfigurationManager.ConnectionStrings["DEVConnectionString"].ConnectionString.ToString(), mappingSource)
    {
    OnCreated();
    }

    The following code is from RPT.cs file:

    namespace cli
    {
    partial class RPTDataContext
    {
    }
    }

    Here is the code in the app.config file:

    Thus can you tell me and/or show me in code how to fix this problem?

    P 1 Reply Last reply
    0
    • S sc steinhayse

      I am getting the following error message in a C# 2008 application and I do not know what to look at to resolve the problem: Error2Build failed due to validation errors in C:\RPT.dbml. Open the file and resolve the issues in the Error List, then try rebuilding the project. There is nothing showing me where the exact error is coming from. There is a reference setup for System.Configuration. The following code is from the RPT.designer.cs

      namespace cli
      {
      using System.Data.Linq;
      using System.Data.Linq.Mapping;
      using System.Data;
      using System.Collections.Generic;
      using System.Reflection;
      using System.Linq;
      using System.Linq.Expressions;
      using System.ComponentModel;
      using System;
      using System.Configuration;

      [System.Data.Linq.Mapping.DatabaseAttribute(Name="DEV")]
      public partial class RPTDataContext : System.Data.Linq.DataContext
      {

      private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();

      public RPTDataContext() :
      base(ConfigurationManager.ConnectionStrings["DEVConnectionString"].ConnectionString.ToString(), mappingSource)
      {
      OnCreated();
      }

      The following code is from RPT.cs file:

      namespace cli
      {
      partial class RPTDataContext
      {
      }
      }

      Here is the code in the app.config file:

      Thus can you tell me and/or show me in code how to fix this problem?

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      sc steinhayse wrote:

      Thus can you tell me and/or show me in code how to fix this problem?

      What have you tried so far? Have you Googled it? When I did a quick Google, this[^] was the first thread - and it looks quite promising.

      *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

      "Mind bleach! Send me mind bleach!" - Nagy Vilmos

      CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups