Symptoms
When trying to deploy a process using K2 Studio or K2 for Visual Studio from a workstation / client PC to the K2 server, it fails with following message:
The following errors occurred while compiling the process (with framework version 3.5):
...path...
error MSB4019: The imported project "C:WindowsMicrosoft.NETFramework64v3.5Workflow.Targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Diagnoses
We did do the following:
Checked MSDTC settings, Copied Workflow.Targets and Workflow.VisualBasic.Targets from workstation PC to C:WindowsMicrosoft.NETFramework64v3.5, ensured VS 2010 and 2008 web deployment projects was installed.
We even tried to change the .NET framework version in the Visual Studio project to .NET 4.0 and 4.5, no joy.
Resolution
It turns out the workstation and server computers need to have the same .NET version(s) installed. We noticed there is a discrepancy between the two in the form of both had .NET 4.5 SDK installed but the workstation had 4.5.1 and the server had 4.5.2 installed (mutually exclusive).
The final resolution to this issue was to make sure that all workstations and server had the same .NET frameworks installed:
Microsoft .NET Framework 4.5 Multi-Targeting Pack
Microsoft .NET Framework 4.5 SDK
Microsoft .NET Framework 4.5.1 Multi-Targeting Pack
Microsoft .NET Framework 4.5.1 SDK
Microsoft .NET Framework 4.5.2
Please note this is just a community article, there will be an official KB article created for this issue that will document the issue much better.