title: Separate POCO Object classes and DBContext from Entity Framework 6 Model
body: <p>I started to use Entity Framework 6.0.1 version. I want to separate the generated DbContext and POCO template classes to different class library from the model. I spent a few hours solve the problem without any success.</p>
  
  <p>If I create a new class library, add EF 6 EntityObject Generator and fill the following template variable:</p>
  
  <p><code>SourceCsdlPath = @"..\..\DataAccess\Model.edmx"</code>,</p>
  
  <p>Get the following error in the error list after building:</p>
  
  <blockquote>
    <p>Error 2   Running transformation: System.IO.FileNotFoundException:
    Unable to locate file File name:
    'C:\Source\EFsource\POCO....\DataAccess\SZOSZRDBModel.edmx'</p>
    
    <p>Server stack trace:     at
    Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(String
    path)    at
    System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
    md, Object[] args, Object server, Object[]&amp; outArgs)    at
    System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
    msg)</p>
    
    <p>Exception rethrown at [0]:     at
    System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
    reqMsg, IMessage retMsg)    at
    System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp;
    msgData, Int32 type)    at
    Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost.ResolvePath(String
    path)    at
    Microsoft.VisualStudio.TextTemplating31479401930D2C4820ACF71C66B5389A24A5053726798D9718DB676B3FFA30A3454B3CB1EDE2E1C267D5278B1528860C072E81A0E4647BC23993669604048FCD.GeneratedTextTransformation.ApplyUserSettings(UserSettings
    userSettings)    at
    Microsoft.VisualStudio.TextTemplating31479401930D2C4820ACF71C66B5389A24A5053726798D9718DB676B3FFA30A3454B3CB1EDE2E1C267D5278B1528860C072E81A0E4647BC23993669604048FCD.GeneratedTextTransformation.TransformText()</p>
  </blockquote>
  
  <p>The Error message is clear, but i do not know, how to set Model path without full absolute path.</p>
  
  <p>I am not sure, using newest version of entity framework is the best idea...</p>