views:

28

answers:

1

I'm trying to migrate my solution (an ASP.NET web app with about a dozen dependent assemblies) to VS 2010 and am hitting some new build errors.

Error   909 Running transformation: System.IO.DirectoryNotFoundException:
Could not find a part of the path 'c:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\SomeProject\Templates\MyTemplate.xml'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

The problem is pretty clear - it's trying to load the XML for my generated code, but instead of looking in $(SolutionDir)\SomeProject\Templates\MyTemplate.xml, it's looking in .\SomeProject\Templates\MyTemplate.xml (where . is the Visual Studio executable working directory, I presume).

There seems to be entirely too much magic behind the scenes and I can't locate any kind of preferences or config settings that define this. Seems like most of the generator config is in the registry.

Has anybody encountered something similar before?

Update: I'm running Visual Studio 2010 Professional 10.0.30319 RTMRel. As part of the migration I also allowed it to update my projects from .NET 3.5 to .NET 4.

A: 

Hello,

I'd suggest looking into CodeSmith Generator, it has many advantages over T4 and you won't have to wait a very long time for a bug fix.

Thanks -Blake Niemyjski

Blake Niemyjski