Hi Jacob, 

Thanks for the reply, I'm installing an office 2003 VSTO project and using the 
custom action which in turn needs the CAS policy methods to register the DLL as 
safe to be consumed by Office.

Kind regards,
Christoffel le Roux


-----Original Message-----
From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com] 
Sent: Tuesday, August 28, 2012 4:22 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Managed Custom Action using CAS

I guess the real question would be do you even need this in .Net 4? 
http://blogs.msdn.com/b/shawnfa/archive/2010/02/24/so-is-cas-dead-in-net-4-or-what.aspx
 What is the custom action trying to accomplish with CAS?


-----Original Message-----
From: Christoffel le Roux [mailto:christoffe...@tech.flowcentric.com]
Sent: Tuesday, August 28, 2012 9:12 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Managed Custom Action using CAS

Hi, I have upgraded an old installer to a wix 3.7 custom action project that 
uses the old CAS policy methods. I've upgraded the solution to runtime 4 and 
resulted receiving the exception

This method explicitly uses CAS policy, which has been obsoleted by the .NET 
Framework.

// Get the policy level.
PolicyLevel policyLevel = CustomAction.GetPolicyLevel("SomePolicyLabel");

In order to enable CAS policy for compatibility reasons,

please use the NetFx40_LegacySecurityPolicy configuration switch. Please see 
http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

Following the link I ended up specifying in the CustomAction.config file to use 
the legacy CAS method overloads.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
        <supportedRuntime version="v2.0.50727"/>
    </startup>
  <runtime>
    <NetFx40_LegacySecurityPolicy enabled="true"/>
  </runtime>
</configuration>

I've tried a bunch of things to resolve the issue but with no luck.

Any ideas anyone?

Thanks in advanced.

Kind regards,
Christoffel le Roux
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat 
landscape has changed and how IT managers can respond. Discussions will include 
endpoint security, mobile security and the latest in malware threats. 
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat 
landscape has changed and how IT managers can respond. Discussions will include 
endpoint security, mobile security and the latest in malware threats. 
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to