Download and Install XAMLtoMVC

The recommended way to install XAMLtoMVC is by using NuGet. Apart from this you can dowload the project source or just binaries but in that case you have to make configuration settings from scratch.


You can install this package using NuGet VisualStudio extension into your MVC projects. There is a step by step on NuGet Documentation how to do it. In a short just rightclick on your project node in the Solution Explorer and choose the "Add Library Package Reference..." menu item. Select the online tab on the left side of the appearing dialog and search for the package id.
NuGet package id is XAMLtoMVC.
After you found it just click install.
NuGet does almost everything for you and you can instantly start using it. What NuGet exactly does whitin your project is written down in the "What you get into your project" section below.
There is just one thing NuGet can't do for you. You can get intellisense in your config file for XAMLtoMVC sections. Knowing that there are many attributes it is a good idea to do the steps to get the Intellisense.

Intellisense for your config

After you installed XAMLtoMVC you have a NetAcademiaImageHandlersConfig.xsd file in your project's root. Place the NetAcademiaImageHandlersConfig.xsd to the ...\Xml\Schemas folder in the Visual Studio installation folder.
In the same folder find the catalog.xml file and open it. Find the last entry in the SchemaCatalog block and duplicate that line. Overwrite the duplicated line's schema attribute to reference the previously copied NetAcademiaImageHandlersConfig.xsd.
It should looks somehow like this:
<Association extension="config" schema="%InstallRoot%/xml/schemas/NetAcademiaImageHandlersConfig.xsd" condition="starts-with($TargetFrameworkMoniker, '.NETFramework,Version=v4.') or $TargetFrameworkMoniker = ''" />
Save it back. (if security is in your way then save it anywhere and copy it back to overwrite the original).
Done! You got IntelliSense for these cool new features in your web.config.

What you get into your project

If you install XAMLtoMVC with NuGet then there will be a reference to the NetAcademia.Web.Mvc.Imaging.dll, some web.config modifications and two folders in your project.
The web.config modifications are:
- New config section registrations at the begining of your config file.
- Sample config file sections after the system.web section.
- In the system.web section three output cache profile settings.
The new folders are:
- /Content/XAMLtoMVC
- /Views/XAMLtoMVC
The first folder contains some assets for the samples.
The second folder contains a sample Index view. you can watch this view with the url /xamltomvc in your web application.
Both of the folders can be deleted since they contain only samples.

Last edited Feb 28, 2011 at 1:10 AM by Tocsi, version 10


No comments yet.