You really can't get much out of XActLib without first installing Nuget in order to use for the installation heavy lifting.
What is Nuget? NuGet is a free, open source developer focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development.
The advantages it brings are:
XActLib – being a loosely couple library of Assemblies – uses Nuget exclusively to transparently install assemblies recursively. An example might be using Nuget to install and Reference XAct.Data.Db.EF, which in turn will automatically ensure the download and installtion of the required EntityFramework, as well as XAct.Data.Db, XAct.Data and XAct.Core. All in less than 30 seconds, thereabouts. That's why we use Nuget: less friction.
Download Nuget from nuget.org. It will take you to the Visual Studio Tools site. Note – you won't see anything change until you restart Visual Studio.
Using Nuget to install Extensions is extremely easy: * In Visual Studio, * Right click a project, and select Manage Nuget Packages… * Select Nuget official package source * THen type the name of an assembly to add to your project.
Then again, adding assemblies to a Solution is usually done by a Team Lead – whereas most of the time, developers need to concentrate on joining a team, and getting up to speed quickly. This means checking out code – that does not References to DLL's that were not source controlled, and are meant to be 'rehydrated' into your project.
Since Nuget 1.6, the rehydration step is backed into a Project's file by Nuget (the Team Lead has to 'prepare' the solution, but that step is trivial), by adding
#!xml <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
to the bottom of the project .csproj* file, that points to a folder in your solution directory that contains:
<sxh csharp>
#!xml
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
<NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<PackagesConfig>$(ProjectDir)packages.config</PackagesConfig>
…etc…
</sxh>
Which it can then invoke to check and download assemblies. You get the point (ie, I don't want to go into the nitty gritty here…JFGI.
### Refreshing Assemblies ###
Much as I like NuGet, there are still some problems with it, as of version 1.7.
Currently…you can't. This may change in the future. Keep an eye on this issue 1779
The current consensus is:
* Will work for first checkout from Source Control
* After that…until the above is done:
Remove the References
Common issues to watch out for:
* Strange things…Not all the nuget revision numbers seem to be updating when I use 'update-package' at the Package Manager Console…
update package -project XAct.Examples.SomeApp.Hosts.UnitTests ... update package -project XAct.Examples.SomeApp.Hosts.Application ... update package -project XAct.Examples.SomeApp.Hosts.Infrastructure.IoC ... update package -project XAct.Examples.SomeApp.Hosts.Infrastructure.IoC.K2 ... update package -project XAct.Examples.SomeApp.Hosts.Infrastructure.IoC.UT ... update package -project XAct.Examples.SomeApp.Hosts.Infrastructure.Services ...