crossvertise / ActionMailerNext

Fork of ActionMailer.Net, A easy to use library to generate emails with razor views
MIT License
42 stars 24 forks source link

Issue with custom object model from third proyect #2

Closed tokp closed 10 years ago

tokp commented 10 years ago

Hello, I'm using ActionMailerNext in my projects. It is my first project using ActionMailerNext.Standalone. I trying to pass to the razor view a model from a class in another project. I always use this syntax:

@using ActionMailerNext @model Wherever.Is.My.Model.Class

blablaba @Model.Property

It is working with ActionMailerNExt.Mvc but isn't working with standalone. I need do something to get work? Thanks in advance

PD: I am running ActionMailerNext.Standalone in a C# class library project.

tokp commented 10 years ago

I found a solution to this issue. I Added a web.config file to my project with this content:

<?xml version="1.0"?>

Second, optional, I edited .csproj file with a text editor and then added this line after setting:

{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}

This line is for enable add razor files in project context menu in VS.

All is working now.

PD: GitHub is hidding my code! I don't know can solve. You can find this solution at steps 3 and 4 in this page: http://conficient.wordpress.com/2013/11/27/asp-net-razor-views-in-class-libraries