This project is read-only.

Error following Developer Guide

Aug 15, 2009 at 8:12 PM

In the developer guide part 2 where we create the view, we are told to select the view contract that was created earlier.  When I do this I receive an error stating "The template file '\' could not be found."  Any suggestions on how to resolve this?

Thanks and looking forward to learning more about this project.

-David Martin

Aug 17, 2009 at 5:47 AM


The source of your problem lies in one of three areas

1. The registry entry used by the automation library to determine where the T4 templates is missing

2. The template does not store which version of the template to use

3. The file and or templates directory does not exist

So here is what you need to do look for hte following registry key

on 32bit OS


On 64bit os


Look for the value TemplatePath


Confirm that the directory and the template file exists.

If it does not then you will need to repair the install and to pull down the tt templats and recreate the directory, or to recreate the registry entry.


If those do exist then please let me know



Stephen Giffin



Jan 19, 2010 at 1:19 AM

Hi David,

I also followed the Developer Guide and got stack at the same point.  I did the following:

  1. I checked the registry key and I have the TemplatePath key with value "C:\Program Files (x86)\MVC4WPF\Templates\V1.0". 
  2. Even though I have the above reg key with value, I repaired the MVC4WPF installation closing my VS and tried again..

Any thoughts on how to fix this?



Jan 19, 2010 at 12:45 PM


Check the Templates v1.0 directory and make sure the tt files are in the folder. Denekew, If you could also send me the error message you are recieveing that would help alot. When we update to the 1.0 version alot of this will be moved to an inline process which should make this much easier.


Stephen Giffin

Jan 19, 2010 at 6:51 PM

Hi Stephen,

I checked the Templates V1.0 directory and can see 11 files, including the  Here is what I observed:

  1. With the project I started, I am not able to see the IHelloWorldViewWindowContract, in the view contract dropdown, when trying to add the HelloWorldViewWindow.xaml.
  2. I tried the whole step in a different project and when I try adding the HelloWorldViewWindow.xaml after choosing the IHellpWorldViewWindowContract (which I was able to see in the view contract dropdown this time) I get "Object reference not set to an instance of an object." excetion from Visual Studio. I restarted VS and repeated this again - and got the same exception.





Jan 20, 2010 at 2:04 AM

Ok so welcome to the beta :) here is what you need to do. In the current version of automation it will only the contracts that have been compiled. In the 1.0 version we will have this fixed to work with recently created interfaces that have not been compiled yet. Make sure to go ahead and do a compile. Once you have compiled it will be avaiable for you. In 1.0 we will be updating this to see both sides on the fly.


Stephen Giffin