Note that there are some explanatory texts on larger screens.

plurals
  1. PODoes ASP.Net MVC4 Cache References?
    primarykey
    data
    text
    <p>I ran into an issue today that is making me pull my hair out. </p> <p>I've created a WCF service which is fairly simple as it only exposes two operations and no data contracts. This WCF service sits on top of a business logic layer. Inside this business logic layer is a dll which exposes some contracts (just plain interfaces). </p> <p>I've also created two test clients for the service. One is a console client and the other is a MVC4 application. Both reference the same endpoints and they both reference, through a project reference, the contract dll.</p> <p>Now, all is fine until I change the contract by adding or removing a method, or even changing the signature of an existing method. At that point my MVC4 app blows and throws all over the place. Keep in mind that I'm not changing the WCF contract, just some internal contracts.</p> <p>The reason is that inside of the business logic layer I am initializing my AutoMapper profiles via a static constructor. Inside this static constructor I basically get all the assemblies of the current domain and iterate through them looking for objects that implement IProfile. It's when I start trying to get types out of one of the dlls that reference the contracts dll that I get a fatal exception: System.TypeLoadException.</p> <p>Now, the console client behaves just fine. Again, referencing the same dll's through a project reference. I can change that contracts dll all day long and it's just happy as a lark, but MVC4 blows chunks. If I go back and make the interface exactly like it was before MVC4 is happy.</p> <p>I noticed that the path to the assembly that was failing to load is in the Temporary ASP.Net files location. I blasted that entire directory and still no luck.</p> <p>I can supply code, but it might be better if I gave you a dependency graph. There's already about 5k lines of code in the BLL.</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload