I created a sample web application (File-> New -> ASP.NET WebApplicaiton -> MVC 4) builds fine, then I added a reference to "SourceCode.Workflow.Client.dll"
and when building I get a warning as below
1>------ Build started: Project: WebApplication1, Configuration: Debug Any CPU ------
1>C:Program Files (x86)MSBuild12.0inMicrosoft.Common.CurrentVersion.targets(1696,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SourceCode.Workflow.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d, processorArchitecture=x86", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
1> WebApplication1 -> C:DevWebApplication1WebApplication1inWebApplication1.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
When I ran the application I got below error
Could not load file or assembly 'SourceCode.Workflow.Client' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I tried changing the build configuration to x64 and I was able to get rid of the warning as below
1>------ Build started: Project: WebApplication1, Configuration: Debug x64 ------
1> WebApplication1 -> C:DevWebApplication1WebApplication1inWebApplication1.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
But when I run, I still get the error
Could not load file or assembly 'SourceCode.Workflow.Client' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I have also tried to set the "useLegacyV2RuntimeActivationPolicy" in web config file as below
<startup useLegacyV2RuntimeActivationPolicy="true"> </startup>
I still got the same error.
Please let me know the correct way to add the assemblies like
SourceCode.Workflow.Client.dll
SourceCode.HostClientAPI.dll
SourceCode.SmartObjects.Client.dll
to a ASP.NET MVC web application.
Any help is appreciated.
Thanks