2

I've got an entity framework based data layer which is in a separate assembly. In the same solution I've got a business assembly, as ASP.Net MVC application and some unit test assemblies. The EF model is quite large and takes around 20 seconds to build. My problem is it's getting rebuilt every time a build is required. If I change one line in a unit test I have to wait 20+ seconds for the build to complete. Anyone know of any tricks to prevent the EF model triggering rebuilds (I don't want to unload the assembly from the solution)?

1 Answer 1

2

In the properties of the solution, I believe you can specify what assemblies get built for the solution. Right click on the solution and select "Properties". Select the Configuration Properties. In the right pane you can select what items get built. Hope this helps.

Sign up to request clarification or add additional context in comments.

3 Comments

Yes I'd decided to resort to that. It's not a perfect solution as the infrequent times I do change my data layer I have to remember to manually build the data layer assembly. Still it's worth a bit of hassle to save 20s per build!
I am assuming you are using an EDMX file, correct? I did find this: social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/… not sure if this would work for you, though.
No I hadn't seen that link, thx. I suspect it's close to whatever triggers an assembly with an EF model to re-compile. I'm already using the "copy to output directory" for my model metadata for performance reasons. However I do then include the metadata files in the assembly so perhaps that's the trigger. I'll stick with not building the data layer assembly for the time being as not having the metadata in the assembly introduces deployment complications that aren't worth the hassle.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.