getting errors building latest Adventurworks with msdev 2012

Jan 10, 2013 at 1:39 PM

I’m getting the following errors building Adventurworks with msdev 2012

1>------ Build started: Project: AdventureWorksModel, Configuration: Debug Any CPU ------

2>------ Build started: Project: RunMVC, Configuration: Debug Any CPU ------

2> All packages listed in packages.config are already installed.

2> RunMVC -> Q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\RunMVC\bin\RunMVC.dll

1> All packages listed in packages.config are already installed.

1>Q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\AdventureWorksModel\Models\AccountModels.cs(81,9,81,31): error CS1070: The type name 'MembershipCreateStatus' could not be found. This type has been forwarded to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.

1>Q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\AdventureWorksModel\Models\AccountModels.cs(86,26,86,44): error CS1070: The type name 'MembershipProvider' could not be found. This type has been forwarded to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.

1>Q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\AdventureWorksModel\Models\AccountModels.cs(92,41,92,59): error CS1070: The type name 'MembershipProvider' could not be found. This type has been forwarded to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.

1>Q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\AdventureWorksModel\Models\AccountModels.cs(109,16,109,38): error CS1070: The type name 'MembershipCreateStatus' could not be found. This type has been forwarded to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.

1>Q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\AdventureWorksModel\Models\AccountModels.cs(159,48,159,70): error CS1070: The type name 'MembershipCreateStatus' could not be found. This type has been forwarded to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Consider adding a reference to that assembly.

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

Anyone have any ideas what I’m doing wrong?

Mark

Coordinator
Jan 10, 2013 at 1:54 PM

Mark

You posted the same message before Christmas and I responded.  This is definitely a versioning issue  -  e.g. an incompatibility between versions of MVC.  It might be simplest for you to keep the the AW Model project and throw away the MVC project  -  then add a new MVC4 project from scratch, add the NakedObjects.MVC NuGet package, add the connection string, and copy the RunWeb class across into the new project.

Richard

Jan 10, 2013 at 6:35 PM

Ok I figured out that issue the problem shows up even if you are just trying to build the model . Fix is to documented here

    http://stackoverflow.com/questions/5315127/how-to-use-membershipcreatestatus-in-a-class

But now I'm hitting:

1>------ Build started: Project: AdventureWorksModel, Configuration: Debug Any CPU ------
1>  All packages listed in packages.config are already installed.
1>q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\packages\NakedObjects.Sample.AW.RunMVC.4.0.239.0\lib\net40\NakedObjects.Mvc.dll : warning CS1684: Reference to type 'NakedObjects.Core.NakedObjectsSystem.IUserProfilePersistorInstaller' claims it is defined in 'q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\packages\NakedObjects.Framework.5.0.0\lib\net40\NakedObjects.Core.dll', but it could not be found
1>q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\packages\NakedObjects.Sample.AW.RunMVC.4.0.239.0\lib\net40\NakedObjects.Mvc.dll : warning CS1684: Reference to type 'NakedObjects.Core.Context.IUserProfileService' claims it is defined in 'q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\packages\NakedObjects.Framework.5.0.0\lib\net40\NakedObjects.Core.dll', but it could not be found
1>q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\packages\NakedObjects.Sample.AW.RunMVC.4.0.239.0\lib\net40\NakedObjects.Mvc.dll : warning CS1684: Reference to type 'NakedObjects.Core.NakedObjectsSystem.IUserProfilePersistorInstaller' claims it is defined in 'q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\packages\NakedObjects.Framework.5.0.0\lib\net40\NakedObjects.Core.dll', but it could not be found
1>Q:\mwoodpatrick\NakedObjects\Projects\AdventureWorksModel\AdventureWorksModel\Models\AccountModels.cs(86,45,86,54): error CS0012: The type 'System.Configuration.Provider.ProviderBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What am I missing?

Coordinator
Jan 10, 2013 at 6:51 PM

Again you've somehow got versioning issues.  Use the NuGet package manager to update all the NakedObjects packages to the latest available version  -  that will hopefully deal with the message about IUserProfile.....

But you also still appear to be getting an error relating to your AccountModels  -  which is an MVC issue, not Naked Objects. N.B.  In each new posting please indicate clearly whether you've tried what we have suggested for the previous one.

Also:  have you successfully built any Naked Objects application on VS2012 i.e. are you only getting problems with the Sample Application  -  or with any application built from scratch?