Long compilation time for Entity Framework project

The problem is a project that takes more than 45 seconds from the hit point of F5 until the web page is displayed - with a huge amount of time following:

'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/22/ROOT-1-130320809789454211): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Framework\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

and to:

'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/22/ROOT-1-130320809789454211): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Entity.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

I am using VS2013, compiling the target project 4.5 and have seen the same behavior using EF5 thur EF6.0.3. Cleaning and assembly time is almost instant.

I work with Code First and POCOs that were created by the Reverse Engineer tool. Moderately complex (several objects many-to-many), but rather small - less than two dozen objects.

I changed the context configuration of ProxyCreationEnabled and LazyLoadingEnabled without affecting the build time. I deleted a couple of many-to-many relationships - again, no effect.

I have downloaded several sample EF projects for comparison, but I don’t see how System.Data.Entity.dll is used. Perhaps this is due to the fact that the db server is used by the project? Instead of using VS LocalDb, my dev database is a version of SQL 2012 Dev - just because I prefer to watch / check output using SSMS.

I made some initial attempts to switch to LocalDb, but ran into unrelated errors and the same delay in the same place. With pleasure, plunge into this rabbit hole, if she considers it unsuitable.

I have almost no experience when you pounce on the GAC or eliminate errors within the structure, so if you find out something about my system through a deeper examination, please speak slowly, as if to a small child.

Thank you so much

+1
1

web.config , - .

0

Source: https://habr.com/ru/post/1534118/


All Articles