VS2013 .NET 4.0 project referencing Blackpearl DLL would get error publish via WebDeploy because Blackpearl DLLs are compiled for .NET 2.0.
C:Program Files (x86)Microsoft SDKsWindowsv8.1AinNETFX 4.5.1 Tools
The workaround is to create and add sgen.exe.config to suppress the error.
<?xml version ="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
</startup>
</configuration>