Click here to Skip to main content
13,050,617 members (92,473 online)
Rate this:
Please Sign up or sign in to vote.
Good Morning,

I have WCF service that references .dll's from our Entity Framework project and I have published the WCF to one of our servers. However whenever we do a migration on the Entity project the WCF starts sending errors whenever called. Its telling us the model backing the context has changed since the database was created. If I copy those .dll's again to the WCF Service and publish again I have no problems. Is there any easier solution?

Thanks in advance.
Posted 26-Mar-13 1:46am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I think you should you GAC in .net..

It will keep updating assemblies at your project, and you could add a policy in machine.config which would redirect to the said assembly..

correct me if i m wrong.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

When you add the reference to the project, right click the dll reference and set CopyLocal=true
Will Everett 26-Mar-13 9:01am
I have that ability in a windows or web application, but there is no setting like that in a WCF Service
aspnet_regiis -i 26-Mar-13 9:45am
Not in Wcf Service. When you add the dll reference to the 'project' that contains the Wcf Service. Set CopyLocal=true for the dll reference added in the project .
Will Everett 26-Mar-13 10:01am
Im not adding the dll reference to to project. The project is in a .net version that does not allow entity framework. That is why is use a WCF service. I have the winform project call the WCF Service and have the service access the entity framework and use the models to update the database.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 26 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100