WSP Builder Custom CAS Policy

Mar 9, 2010 at 11:29 AM

Hi All ,

I am generating WSP using the WSP Builder Tool .  I have  one of my code assemblies placed under 80/bin which results in addition of Code Access Security Section to the Manifiest.xml file. However the Auto Generated CAS provides medium trust and I Need to Provide Unrestricted = true for  the wsp generated permission set ,for my code to work . Currently I am adding the unrestricted attribute manually to 12/Config/customconfig.config file   ,            post wsp deployment.

 Is it Possible to have the  CAS Updated in manifest.xml in automated way .

I have tried using –CustomCAS property ,but was able to only add new IPermission tags ,but unable to overwrite the autogenrated permission set tag (indicated in red)



 <PermissionSet version="1"    Description="WSPBuilder generated permissionSet""> <IPermission version="1" Level="Medium" />

…. Some more XML  ….



  <Assembly Version="" PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100F3D1D2292FAC96DE468C9324D2C9756C4308177DA8628C5A139400BAB56A9A9D959611D6930C6353A2004C72667D857FA1A630B9D6A98B8E2013C62245917E2759F4BD9243FE8A342EE5501D87683ECA6C29C295891F8D1872481689F94E1ED1BA1916100E7F57299CE18B54C9A3D868FB362616E5D2F730CE604AD9FB6C848A" />