Errors Compiling Source Code (Complete)

Developer
May 28, 2010 at 5:48 AM

I've downloaded the latest source code and am trying to compile/run it on my local machine. I'm using the instructions at:

http://wiki.bvcms.com/Compiling-and-running-BVCMS.ashx

I have Visual Web Developer 2010 Express installed and SQL Server 2008 R2 Express. I also have the requisite ASP.NET MVC 2 and Microsoft Report Viewer 2008.

When I open the CmsWeb solution I am prompted to perform a conversion and do so. When it asks me if I want to upgrade the solution to .NET 4.0, I say no. It processes the solution over the next several minutes and largely is successful but reports that it cannot open the PostBundle.csproj file because "The project type is not supported by this installation."

In Solution Explorer two projects are marked as unavailable - "Solution Items" and "PostBundle."

If I attempt to Build/Debug the project major portions compile fine, but I receive these errors:

Error    24    Metadata file 'C:\Users\davemackey\Downloads\bvcms\CmsData\bin\Debug\CmsData.dll' could not be found    CmsPresenter
Error    25    Metadata file 'C:\Users\davemackey\Downloads\bvcms\CmsData\bin\Debug\CmsData.dll' could not be found    CMSWeb
Error    26    Metadata file 'C:\Users\davemackey\Downloads\bvcms\CmsPresenter\bin\Debug\CMSPresenter.dll' could not be found    CMSWeb
Error    12    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.    C:\Users\davemackey\Downloads\bvcms\CmsData\MembershipService.cs    36    16    CmsData
Error    16    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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    214    22    CmsData
Error    13    The type name 'MembershipPasswordFormat' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    134    17    CmsData
Error    14    The type name 'MembershipPasswordFormat' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    135    25    CmsData
Error    8    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.    C:\Users\davemackey\Downloads\bvcms\CmsData\MembershipService.cs    11    17    CmsData
Error    9    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.    C:\Users\davemackey\Downloads\bvcms\CmsData\MembershipService.cs    18    34    CmsData
Error    11    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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    25    49    CmsData
Error    15    The type name 'MembershipUser' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    207    25    CmsData
Error    18    The type name 'MembershipUser' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    377    25    CmsData
Error    19    The type name 'MembershipUser' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    402    25    CmsData
Error    20    The type name 'MembershipUser' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    424    17    CmsData
Error    21    The type name 'MembershipUser' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    503    41    CmsData
Error    17    The type name 'MembershipUserCollection' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    328    25    CmsData
Error    22    The type name 'MembershipUserCollection' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    643    25    CmsData
Error    23    The type name 'MembershipUserCollection' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSMembershipProvider.cs    666    25    CmsData
Error    10    The type name 'RoleProvider' 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.    C:\Users\davemackey\Downloads\bvcms\CmsData\CMSRoleProvider.cs    20    36    CmsData

Any assistance is appreciated. Thanks,

Dave.

Developer
May 28, 2010 at 5:56 AM

Okay...I fixed some of the issues:

  • Under CMSData I found that in references Systems.Web.Mvc was having issues, so I removed the reference and re-added it.
  • I added a reference to CMSData for System.Web.ApplicationServices.

That rid me of some problems but seems to have added other ones. The new error report looks like follows:

Error    12    'System.Web.Security.MembershipUser' does not contain a definition for 'ChangePassword' and no extension method 'ChangePassword' accepting a first argument of type 'System.Web.Security.MembershipUser' could be found (are you missing a using directive or an assembly reference?)    C:\Users\davemackey\Downloads\bvcms\CmsPresenter\UserController.cs    57    20    CmsPresenter
Error    13    'System.Web.Security.MembershipUser' does not contain a definition for 'ResetPassword' and no extension method 'ResetPassword' accepting a first argument of type 'System.Web.Security.MembershipUser' could be found (are you missing a using directive or an assembly reference?)    C:\Users\davemackey\Downloads\bvcms\CmsPresenter\UserController.cs    57    38    CmsPresenter
Error    11    'System.Web.Security.MembershipUser' does not contain a definition for 'UnlockUser' and no extension method 'UnlockUser' accepting a first argument of type 'System.Web.Security.MembershipUser' could be found (are you missing a using directive or an assembly reference?)    C:\Users\davemackey\Downloads\bvcms\CmsPresenter\UserController.cs    56    20    CmsPresenter
Error    9    'System.Web.Security.MembershipUser' does not contain a definition for 'UserName' and no extension method 'UserName' accepting a first argument of type 'System.Web.Security.MembershipUser' could be found (are you missing a using directive or an assembly reference?)    C:\Users\davemackey\Downloads\bvcms\CmsPresenter\RoleController.cs    35    62    CmsPresenter
Error    14    Metadata file 'C:\Users\davemackey\Downloads\bvcms\CmsPresenter\bin\Debug\CMSPresenter.dll' could not be found    CMSWeb
Error    10    The type 'System.Web.Security.MembershipProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.    C:\Users\davemackey\Downloads\bvcms\CmsPresenter\UserController.cs    54    17    CmsPresenter
Error    8    The type 'System.Web.Security.MembershipUser' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.    C:\Users\davemackey\Downloads\bvcms\CmsPresenter\RoleController.cs    35    17    CmsPresenter

Developer
May 28, 2010 at 5:57 AM

I added System.Web.ApplicationServices to the CmsPresenter project and this removed some more errors, but added several hundred more...

Developer
May 28, 2010 at 6:05 AM

Okay, maybe I'm just a n00b, but I think I figured it out...

  • I selected each project individually in solution explorer and then chose Debug-->Build (name of project). This appears to have compiled the source so that it can be referenced by other projects (CmsWeb depends on most projects, TakeUploadPicture depends on UtilityExtensions).
  • I removed and readded UtilityExtensions to references for TakeUploadPicture.
  • At this juncture all the other references appear okay except those for CmsWeb...so I tried removing/re-adding them but this didn't make a change (still yellow exclamation sign next to each one). I also received a message that the target framework for the project (e.g. CmsData) was higher than the current project framework (but I didn't upgrade any of the projects' frameworks!).

Suggestions?

Dave.

Developer
May 28, 2010 at 6:07 AM

So....I changed the Target Framework for CMSWeb to .NET 4.0 and that corrected the referential errors...I'll leave this thread up in case anyone needs to follow my logic. =)
Dave

Coordinator
May 28, 2010 at 1:23 PM
Edited May 30, 2010 at 2:31 AM

Hi Dave,

Couple of differences. I am running Visual Studio 2008 Professional which (I think) includes some libraries like the VSTO (Visual Studio Tools for Office) that the Express version does not. VSTO is only needed for PostBundle, an add-in for Microsoft Excel 2007.

I have never tried compiling with VS Web Developer 2010 Express and I am still using 2008 although I have got it running on 2010 Professional once. I'll try your configuration myself and report back. It may be a few days.

Also I am compiling against the 3.5 version of the Framework.

I don't think TakeUploadPicture, which is a client side WinForms project, should need UtilityExtensions which has lots of server side functionality. I'll look.

I suspect that bottom line, the issue is going to be the Web Developer Express (free) version of the VS tool you are using. And perhaps something happened during the automatic upgrade to 2010 from 2008.

Again, I'll take a look when I get a chance.

Developer
May 28, 2010 at 1:31 PM

David,

   Its actually up and running using my notes from above. I've also been able to deploy it to my shared hosting environment. I'm off to work (the day-job) at the moment, but I've already begun updating some of the wiki documentation and look forward to hopefully assisting that way more in the future...

Dave.

Coordinator
May 28, 2010 at 1:40 PM

That's great Dave! Thanks

Developer
Jun 2, 2010 at 5:01 AM

I've begun a basic tutorial on getting VWD 2010 and .NET 4.0 running with BVCMS here: http://bvcms.codeplex.com/Thread/View.aspx?ThreadId=214659