NuGet package for Sharp Architecture

 One request we received when NuGet first came out (as NuPack) was for Sharp Architecture to release a package. We all agreed that this would be a good way to deliver updates in the future as it meant the end user did not have to download either the source or a template just to extract the assemblies.

Well the wait is over, today we released a NuGet package for Sharp Architecture 1.9.6. The package has the following dependencies:

 

Don't worry about all of those dependencies, when you install the package, you can choose to use the -IgnoreDependencies command-line argument to only reference SharpArchitecture. 

You can find the project by using the package manager console:

And install it using the following command:

Once everything is installed, you will notice that a new folder has been created at the solution root of your Sharp Architecture folder structure.

This folder will contain the following packages in it:

I do have a couple of other packages installed, MvcScaffolding for one, so you will see some packages that are not referenced by Sharp Architecture. Please let us know if you have any problems with the package. It is very much a work in progress.

7 Comments

  • How do you reference the dlls?

    Am I supposed to copy the dll's to the lib folder or do i update the references in all projects to point to the dll's in the packages folder ?

    What do you do ?

  • My Previous comment stems from the fact that I tried to install the package into an empty solution. The installation was succesfull.

    Next I tried to deploy v.1.9.6.0 of SharpArchitecture using templiry. This went well. I now understand that the Nuget package updates the references for me, so they now points at the binaries in the packages folder. How ever I now get an error during the installation of the package.

    Can I Ignore it ??

    Here follows the output in the Package Manager Console
    ------------------------------------------------------------------------------

    Best Regards Christian


    Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

    PM> get-package sharp-architecture -remote

    Id Version Description
    -- ------- -----------
    sharp-architecture 1.9.6 Binaries Only - No Te...


    PM> Install-Package sharp-architecture
    'Castle.Core (≥ 2.5.2)' not installed. Attempting to retrieve dependency from source...
    Done
    'Castle.Windsor (≥ 2.5.2)' not installed. Attempting to retrieve dependency from source...
    Done
    'CommonServiceLocator.WindsorAdapter (≥ 1.0)' not installed. Attempting to retrieve dependency from source...
    Done
    'CommonServiceLocator (≥ 1.0)' not installed. Attempting to retrieve dependency from source...
    Done
    'FluentNhibernate (≥ 1.2.0.694)' not installed. Attempting to retrieve dependency from source...
    Done
    'NHibernate.Castle (≥ 3.1.0.4000)' not installed. Attempting to retrieve dependency from source...
    Done
    'NHibernate (= 3.1.0.4000)' not installed. Attempting to retrieve dependency from source...
    Done
    'Iesi.Collections (≥ 3.1.0.4000)' not installed. Attempting to retrieve dependency from source...
    Done
    'Log4Net (≥ 1.2.10)' not installed. Attempting to retrieve dependency from source...
    Done
    'nunit' not installed. Attempting to retrieve dependency from source...
    Done
    'rhinomocks (≥ 3.6)' not installed. Attempting to retrieve dependency from source...
    Done
    'MvcContrib.Mvc3-ci (≥ 3.0.51.0)' not installed. Attempting to retrieve dependency from source...
    Done
    'MicrosoftWebMvc (≥ 2.0)' not installed. Attempting to retrieve dependency from source...
    Done
    'Mvc2Futures (≥ 2.0.50217.0)' not installed. Attempting to retrieve dependency from source...
    Done
    'MvcContrib.Mvc3.FluentHtml-ci (≥ 3.0.51.0)' not installed. Attempting to retrieve dependency from source...
    Done
    'MvcContrib.Mvc3.TestHelper-ci (≥ 3.0.51.0)' not installed. Attempting to retrieve dependency from source...
    Done
    'Newtonsoft.Json (≥ 3.5.0.0)' not installed. Attempting to retrieve dependency from source...
    Done
    Successfully installed 'Castle.Core 2.5.2'
    Successfully installed 'Castle.Windsor 2.5.2'
    Successfully installed 'CommonServiceLocator 1.0'
    Successfully installed 'CommonServiceLocator.WindsorAdapter 1.0'
    Successfully installed 'Iesi.Collections 3.1.0.4000'
    Successfully installed 'NHibernate 3.1.0.4000'
    Successfully installed 'NHibernate.Castle 3.1.0.4000'
    Successfully installed 'FluentNHibernate 1.2.0.712'
    Successfully installed 'log4net 1.2.10'
    Successfully installed 'NUnit 2.5.7.10213'
    Successfully installed 'RhinoMocks 3.6'
    Successfully installed 'Mvc2Futures 2.0.50217.0'
    Successfully installed 'MicrosoftWebMvc 2.0'
    Successfully installed 'MvcContrib.Mvc3-ci 3.0.51.0'
    Successfully installed 'MvcContrib.Mvc3.FluentHtml-ci 3.0.51.0'
    Successfully installed 'MvcContrib.Mvc3.TestHelper-ci 3.0.51.0'
    Successfully installed 'Newtonsoft.Json 3.5.8'
    Successfully installed 'sharp-architecture 1.9.6'
    Successfully added 'Castle.Core 2.5.2' to CrudScaffolding
    Successfully added 'Castle.Windsor 2.5.2' to CrudScaffolding
    Successfully added 'CommonServiceLocator 1.0' to CrudScaffolding
    Successfully added 'CommonServiceLocator.WindsorAdapter 1.0' to CrudScaffolding
    Successfully added 'Iesi.Collections 3.1.0.4000' to CrudScaffolding
    Successfully added 'NHibernate 3.1.0.4000' to CrudScaffolding
    Successfully added 'NHibernate.Castle 3.1.0.4000' to CrudScaffolding
    Successfully added 'FluentNHibernate 1.2.0.712' to CrudScaffolding
    Successfully added 'log4net 1.2.10' to CrudScaffolding
    Successfully added 'NUnit 2.5.7.10213' to CrudScaffolding
    Successfully added 'RhinoMocks 3.6' to CrudScaffolding
    Successfully added 'Mvc2Futures 2.0.50217.0' to CrudScaffolding
    Successfully added 'MicrosoftWebMvc 2.0' to CrudScaffolding
    Successfully added 'MvcContrib.Mvc3-ci 3.0.51.0' to CrudScaffolding
    Successfully added 'MvcContrib.Mvc3.FluentHtml-ci 3.0.51.0' to CrudScaffolding
    Successfully added 'MvcContrib.Mvc3.TestHelper-ci 3.0.51.0' to CrudScaffolding
    Successfully added 'Newtonsoft.Json 3.5.8' to CrudScaffolding
    Install-Package : Unable to find assembly references that are compatible with t
    he target framework '.NETFramework,Version=v3.5'
    At line:1 char:16
    + Install-Package <<<

  • First off - this blog is for information, not support. Please use the google group for support.

    Second off - this is meant to update your assemblies in an EXISTING S# project, not for you to create a fresh project, then try and templify into it, which is not how Templify is to be used anyway.

    Lastly - You are trying to install the latest S# into a .NET 3.5 project. Sharp 1.9.6 does not support .NET 3.5 because it is meant to be used with MVC 3 which is .NET 4 only.

  • Thanks for the reply Alec. I will go to the google group instead :-)

  • This is slick, thanks

  • I'm having a few issues with this. In particular, because it only installs into the .Web project it is very easy to get into DLL versioning issues. For example, the test/data projects can end up referencing a different version of the sharparchitecture DLLs and therefore expecting different versions of NHibernate/FNH.

  • James - please feel free to report this on the google group. While I agree this could've been better thought out as far as placing the reference into the projects, it will make more sense once S# 2.0 is out. The project structure is changing to reflect using NuGet for assembly managment, so in the future this would work.

    Sorry it has caused you trouble.

Comments have been disabled for this content.