views:

802

answers:

2

D:\Web\CityV2\App_Code\ActiveRecord.tt(0,0) : error CS0006: Compiling transformation: Metadata file 'MySql.Data' could not be found

Let me start by saying I'm using VWD 2008 Express.

These are the steps I've taken so far:

  • Created an entirely new project
  • Added references for Subsonic.Core.dll and MySql.Data.dll
  • Copied Active Record templates to project
  • Changed all <#@ include file="SQLServer.ttinclude" #> to <#@ include file="MySQL.ttinclude" #>
  • Copied the MySQL.ttinclude and Settings.ttinclude from the TemplateProviders folder
  • Updated Settings.ttinclude with my connectionstring and database information
  • Updated the Settings.ttinclude and created the external tool mapping as per ranomore's instructions
  • Attempted to build the code from the templates and received the error

I then realized that I didn't have MySql Connector "installed" on my dev box (even though I added a reference to the bin). So I proceeded to MySQL.com and downloaded the latest 6.0.4 connector msi and installed it (GAC). The error no longer appears, but neither does anything else: no new classes, no new errors, nothing [and yes, I refreshed the project after running the command ;-)].

Two things:

  1. Am I missing a step somewhere?
  2. Is there a way build the templates without needing MySQL installed to the GAC?
A: 

Unfortunately SubSonic 3 doesn't support VWD 2008 Express (or more specifically VWD doesn't support t4). There is a sort of workaround that ranomore came up with but it will require some work by you. See the following question for more details:

http://stackoverflow.com/questions/786734/subsonic-asp-net-mvc-sample-in-visual-web-developer-express

EDIT: I should have read your question properly you obviously already have the link above. Maybe worth your while downloading the trial of VS professional and seeing if you have more luck with that to see if it's worth outlaying the cash to buy it. On a side note if you're looking to get an msdn subscription for free you should have a look into registering for the bizspark program

Adam
A: 

Thank you for your response Adam. The link you provided is exactly the one I reference in my post. I precisely followed the steps and still no luck.

I'd be willing to fork out the couple hundred bucks for the VS Standard upgrade if vs2010 and .net4 weren't right around the corner. But even then, I'm not positive that switching to VS Standard fixes the problem I'm having since the first problem (error) seems to be a referencing issue for the mysql.data.dll and the second problem (no output) is not giving any messages to point me in the right direction.

Sam
Doh, sorry that'll, hopefully, teach me to stop skim reading. As I say in the linked question I think there's just a world of hurt trying to work round the lack of t4 support in express. I think ranomore did amazingly to get as far as he did but I can't see there being an easy long term solution unless VS 2010 adds support for t4, something I'm hoping Rob is championing inside MS. I would suggest downloading the trial version of VS professional and seeing how things progress from there.
Adam