tags:

views:

380

answers:

2

VSeWSS Deployement cast loader exception: Do anyone have any ide of solution to this problem.

Error 1 VSeWSS Service Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Log file written to: C:\Documents and Settings\Default User\Application Data\Microsoft\VSeWSS 1.3\VSeWSS1.3 service.log

2010.01.13 10:31:27 Error System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

+1  A: 

Have a look at this blog post. It should solve your problem.

Flo
+1  A: 

I only work with GAC deploys, this is my experience with it:

LoadException means a sequence of:

  1. CopyToLocal is set in an assembly reference, this assembly will be included in the WSP package.
  2. VSeWSS tried to deploy, it retracted the solution (thus removed the reference assemblies from the GAC) but something went bad, but it never saved anywhere that the solution was retracted but an error occured.
  3. You attempt a new deploy, the reflection code in VSeWSS attempts to load the CopyToLocal assemblies in the GAC, they dont exist. LoaderException is thrown.
  4. if you open the GAC, you sometimes SEE the assembly there! IT'S A TRAP :) if you F5 the GAC the assembly will be properly gone.

In case this is what happens, the solution is:

  1. Manually Add the CopyToLocal assemblies to the GAC
  2. restart IIS (or recycle the VSeWSS pool)
  3. profit

a 'Clean Solution' might also help between steps 2 and 3.

F.Aquino