New Posts New Posts RSS Feed: Error Building Simple silverlight app with 1 entity
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Error Building Simple silverlight app with 1 entity

 Post Reply Post Reply
Author
KitKat View Drop Down
Newbie
Newbie
Avatar

Joined: 01-Nov-2012
Location: Florida
Posts: 23
Post Options Post Options   Quote KitKat Quote  Post ReplyReply Direct Link To This Post Topic: Error Building Simple silverlight app with 1 entity
    Posted: 01-Nov-2012 at 2:24pm
I am getting this error building the web side of a silverlight project.  All packages are installed via nuGet.  Please help.

BuildVersionIncrement: Pre-build process : Completed
1>------ Build started: Project: SilverlightApplication8.Web, Configuration: Debug Any CPU ------
1>Build started 11/1/2012 5:13:23 PM.
1>PostSharp21InspectReferences:
1>  Detected reference to 'PostSharp'.
1>GenerateTargetFrameworkMonikerAttribute:
1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
1>CoreCompile:
1>Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
1>CopyFilesToOutputDirectory:
1>  SilverlightApplication8.Web -> C:\TestProjects\SilverlightApplication8\SilverlightApplication8.Web\bin\SilverlightApplication8.Web.dll
1>DevForceEntityModelMetadataDeploy:
1>  In EntityModelMetadataDeploy.  Parms:  Assembly='C:\TestProjects\SilverlightApplication8\SilverlightApplication8.Web\bin\SilverlightApplication8.Web.dll', TargetFolder='C:\TestProjects\SilverlightApplication8\SilverlightApplication8.Web'
1>  IdeaBlade.VisualStudio.Build.Tasks, Version=7.0.1.0, Culture=neutral, PublicKeyToken=287b5094865421c0
1>  Trying model metadata discovery for C:\TestProjects\SilverlightApplication8\SilverlightApplication8.Web\bin\SilverlightApplication8.Web.dll
1>  Creating metadata from DbContext 'TestDbContext'
1>  Searching for connectionString named 'TestDbDevForce': found
1>C:\TestProjects\SilverlightApplication8\packages\IdeaBlade.DevForce.Aop.7.0.1-beta1\tools\IdeaBlade.DevForce.Common.targets(110,5): error : An error occurred during metadata generation and a metadata file could not be created.  Error: The best overloaded method match for 'IdeaBlade.EntityModel.Edm.EntityMetadataBuilder.BuildEntityModelMetadata(System.Data.Metadata.Edm.MetadataWorkspace)' has some invalid arguments
1>  EntityModelMetadataDeploy: No metadata files generated.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.84
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
BuildVersionIncrement: Post-build process : Completed

BUILD PARTIALLY FAILED (status by CodeSMART)
                ¯¯¯¯¯¯
    Build failed for the following project(s):
        SilverlightApplication8.Web

Build Summary
-------------
00:02.960 - Failed  - Debug Any CPU - SilverlightApplication8.Web\SilverlightApplication8.Web.csproj

Total build time: 00:00.000

========== Build: 0 succeeded or up-to-date, 1 failed, 1 skipped ==========


I have one entity defined and a DbContext as the full model I plan to use will require the FluentAPI.

Please Help!


Back to Top
KitKat View Drop Down
Newbie
Newbie
Avatar

Joined: 01-Nov-2012
Location: Florida
Posts: 23
Post Options Post Options   Quote KitKat Quote  Post ReplyReply Direct Link To This Post Posted: 01-Nov-2012 at 2:56pm
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using IdeaBlade.Aop;

namespace SilverlightApplication8.Web
{
    [ProvideEntityAspect]
    public class Person
    {
        public int PersonId { get; set; }

        [Required, StringLength(100)]
        public string FirstName { get; set; }

        [Required, StringLength(100)]
        public string LastName { get; set; }

        [NotMapped]
        public string FullName
        {
            get { return String.Format("{0} {1}", FirstName, LastName); }
        }

    }
}

using System.Data.Entity;
using IdeaBlade.EntityModel;

namespace SilverlightApplication8.Web
{
    [DataSourceKeyName("TestDbDevForce")]
    public class TestDbContext : DbContext
    {
        public DbSet<Person> Persons { get; set; }
        
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            //Call your partial methods here.
            //Method does not have to be declared in child file if not used.
            modelBuilder.Ignore<EntityAspect>();
        }

        public TestDbContext(string connection = null) : base(connection){}

    }
}

Back to Top
KitKat View Drop Down
Newbie
Newbie
Avatar

Joined: 01-Nov-2012
Location: Florida
Posts: 23
Post Options Post Options   Quote KitKat Quote  Post ReplyReply Direct Link To This Post Posted: 01-Nov-2012 at 2:58pm
Here are the project files
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 01-Nov-2012 at 4:42pm
Hi KitKat,
 
It looks like we've got a problem with the EntityFramework 6.0.0-alpha1 package.  We don't currently restrict the EF version, but it looks like we'll have to since we're not working with 6.0.0. 
 
For now, you'll have to remove the EntityFramework.dll reference and remove the package from packages.config, then install the stable version of EntityFramework.
 
Thanks for reporting this.
 
One more thing - this problem is fixed in version 7.0.2, which will be available tomorrow.


Edited by kimj - 01-Nov-2012 at 5:01pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down