Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

How to get Project Tracker running in VS2013

$
0
0

This is a copy of an entry from our in house wiki that describes everything I did to get Project Tracker up and running VS2013.  This took me probably 12 hours to achieve, hopefully this post will save others that pain!

V4.5.30 Samples in VS2013

Install the whole 4.5.30 package (CSLA and samples) using the installer here:  http://www.cslanet.com/Download.html.  That installer creates a folder on the C drive C:\Program Files (x86)\Marimer LLC\CSLA .NET\4.5.30\

You'll find PtojectTracker at:  C:\Program Files (x86)\Marimer LLC\CSLA .NET\4.5.30\Csla\Samples\NET\cs\ProjectTracker

Grant Permissions

This cost me hours... you won't be able to log in to any of the PT projects until you go to sample directory and grant the Users group full permissions.  This is because SQL Server doesn't have write permissions onto the Program Files directory where the samples are installed.  (To see this issue, install SQL Management Studio Express and connect to (LocalDB)\v11.0.  You will see the databases are greyed out indicating they are readonly).

Getting Winforms and WPF UI projects working

Now open up the Project Tracker solution in VS2013, VS will convert it to a 2013 project.  If you then temporarily unload the Mvc3UI project you should find everything builds first time.  If you set the start up project as WfUI (the winforms project) you should then be able to run it and perform CRUD operations.

Login as admin/admin or manager/manager (Note that pm/pm no longer works).   Also note that only the manager login can edit projects etc.

Getting MVC UI working

For MVC there is an issue here as the solution was built in VS2012 against MVC 3 which VS2013 doesn't support (MVC 4 or later only), so we have to fix up the references in PT's Mvc3UI project in this order (the order seems to make a difference):

  • System.Web.MVC (needs fixing as pointing at MVC3, it is in the Extensions sub section in the References form)
  • CSLA (there is a dependencies folder in the samples directory that has all the dlls)
  • Csla.Web
  • Csla.Web.Mvc4
  • We also seem to need to add a reference to System.Web.WebPages to get PTIdenty.cs to compile

The next thing I did may not be necessary, but I reinstalled the MVC 4 framework from NUGET, as this forces all the MVC references in an older project to be updated to the ones for the version you just installed.  I did this via package manager (https://www.nuget.org/packages/Microsoft.AspNet.Mvc/4.0.30506 was the version I used).  this was provoked by reading this:  http://stackoverflow.com/questions/7668252/migrating-my-mvc-3-application-to-mvc-4

After that I was still getting errors about web.config and then finally I realised that web.config files have the dll versions hard coded in, so I needed to change them to match the versions of the dlls that are now referenced in the project.  In my case this was:

C:\Program Files (x86)\Marimer LLC\CSLA .NET\4.5.30\Csla\Samples\NET\cs\ProjectTracker\Mvc3UI\Web.config

 

<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Changed from 1 to 2

<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Changed from 3 to 4

<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Changed from 1 to 2

C:\Program Files (x86)\Marimer LLC\CSLA .NET\4.5.30\Csla\Samples\NET\cs\ProjectTracker\Mvc3UI\Web.config

Change all the MVC file refs from 3.0.0.0 to 4.0.0.0

Once all of that is done then the mvc project should run and you will get the ProjectTracker homepage.  If you click to the Projects list you will get an error if you have 'Break on CLR exceptions' ticked in the debug options, but if you untick that everything will run smoothly.

You shouldn't need to attach databases manually or change connection strings or make any other config changes.

Viewing all articles
Browse latest Browse all 764

Trending Articles