Compile errors with subsonic 3.0 activerecord

subsonic

Note, I have used subsonic 2.2 extensively and love it. This is my first experience with 3.0.

I want to add subsonic to my class library rather than the website. First when I do this, and try and run the custom tool to compile the template files, I get errors saying there is not app.config file. In subsonic 2, I was able to do this and point it to my web.config file. So first question is can I use the web.config file when adding subsonic to an external class library?

The second thing that I'm experiencing are 44 identical compile errors.

This is the error from VS 2008:

Error 44 'krazyCommon.model.atDB' does not contain a definition for 'Provider' and no extension method 'Provider' accepting a first argument of type 'krazyCommon.model.atDB' could be found (are you missing a using directive or an assembly reference?) C:\dev\krazybuys\krazyCommon\model\StoredProcedures.cs 175 100 krazyCommon

and this is the code that is causing it. The end of the line this.Provider is where the error is being caused. In VS it has a squiggly line under it.

    public StoredProcedure aspnet_UsersInRoles_RemoveUsersFromRoles(){
        StoredProcedure sp=new StoredProcedure("aspnet_UsersInRoles_RemoveUsersFromRoles",this.Provider);
        return sp;
    }

I'm perplexed as I think I'm doing everything correct. Any help would be appreciated.

Many Thanks.

Best Answer

Update, I did find the cause of the compile error. I changed the namespace in the settings file. However, the namespace did not update in the storedprocedure.tt output. It does change for activerecord and content, but not storedprocedures. I manually changed the namespace and it compiled without error.

Is this a bug in the template or subsonic? Is it possible to change the namespace in settings? And if so, should subsonic pick that up if you right click on activerecord, content and storedprocedures and "Run custom tool" again.

Thanks