Each time I use VisualStudio to deploy my project to our IIS server, the EntityFramework Provider specified in the EntityFramework-Project with all my repositories is missing in the deployment and I have to manually copy it to the IIS server to get the database access working.
When does WebDeploy include dependecies of a dependecy of the main project? How to include the EntityProvider in the deployment without reference it in the main project? Or should i reference it in the main project, isn't this bad for when i have to change the provider so i have to remeber to change it in two projects?
Sorry if this was already asked. I failed to find a topic that answers the question.
Thanks for your answer and hard work on ABP.
I added the reference in the main project now, but I am afraid i have another problem with deployment. Is there a way to get the migration of the database working with webdeploy? Currently i only get the databasescheme from my local test db copied to the target db. I would like to run the migrations on the server so the initial data from migration is also filled in the servers db. Is this another problem with VS that i dont get the option "Apply Migration" if its not in the main project?
With kind Regards, Sebastian
EF has a Migrate.exe command line tool to Update-Database from the command line. So, we use this tool to upgrade database on Test/Production server. You can find documents on Microsoft's web site to learn how to use it (just google it :)).
Is this another problem with VS that i dont get the option "Apply Migration" if its not in the main project?
I don't understand that well. You want to say "Update-Database" command? If so, EntityFramework project should be selected as Default project in the Package Console Manager Window.
If i publish the Abp project i don't get the option "Execute Code First Migrations" so i guessed VS cant do this if the DatabaseContext is in a library and not in the main project. In a text about deployment via web publish it says: "This check box is shown for databases that the application accesses by using an Entity Framework Code First context class. " But i am not sure if this is the case in ABP or if there is the possiblity to change it in a way to get the migration to work like this.
I will lookup the command line tool.
Thanks again for your great support