I have an MVC 6 (vNext/ASP.NET 5) project, with one class library for the DAL(Data Access Layer). Now I am getting an exception because NHibernate can't find the mapping file for an entity I am trying to persist. I have seen strict instructions to mark this XML mapping file as an embedded resource and not to copy to output, but in none of the three property pages I manage to open for this file, is there anywhere to stipulate this.
I am simply going to move to code-based fluent mapping, but this issue isn't unique to my one NHibernate mapping file. The old property page for project items, available by right click in Solution Explorer, is simply gone. I am hoping that if such a thing as an embedded resource still exists, it is somewhere else, like project.json
, that we must specify this.
Alberto's answer is no longer valid (since RC2), the
resource
is now marked as deprecated.Proper way how to do this is now to use
buildOptions/embed
:UPDATE
My previous answer is no longer valid (since RC2), the
resource
is now marked as deprecated. (Thanks @Yossarian)Proper way how to do this is now to use
buildOptions/embed
:You must use the section resource in project.json, like this
List of include/exclude properties
More info: http://docs.asp.net/en/latest/dnx/projects.html#including-excluding-files
You can see a sample below:
Program.cs
project.json
Output