We have request to support very old application, built using K2.NET 2003. K2.NET 2003 is a workflow engine (BPM) product by SourceCode Technology Holding Inc. It was initially released on 2003, before replace by the sucessor K2 Blackpearl in 2007 (see the history here). An 13 years old product, and yes we still have some application using it. While most of our development tools have been upgraded, the latest K2.NET 2003 service pack (SP4) was released on 2006; therefore it still uses .NET Framework 2.
If we install the product into our new environment, we will get following error in the event log. This is simply because by default the assembly will be executed under .NET framework 4 with many different security model.
To fix the issue, we simply need to revert the execution model to .NET Framework 2.0 by modifying the app.config. For example, if you want to make K2Studio.exe working, then you need to modify K2Studio.exe.config. If you can not find any app.config , you can create your own app.config where [app] is the name of the executable.
Inside app.config, you need to add following entries
<configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v2.0.50727" /> <supportedRuntime version="v4.0.30319" /> </startup> </configuration>
And, you make it alive again in the new .NET Framework