Cannot build CSharp sample

I just installed OpenCascade6.7.0 and tried to build the C# sample.

I am using Visual Studio 2010 Pro. I entered: msvc.bat vc10 win32 debug

VS2010 came up correctly and (AFAIK) correctly upgraded the project files.

But when I tried to rebuild just the OCCTProxy project VS complained that the .NET framework specs did not match with the Winforms and WPF project (not sure why it cared about that when only compiling OCCTProxy). In fact the Winforms and WPF project specified .net 2 and OCCTProxy specified .net 4 (not sure why that matters on a C++ project).

Probably because I have not done any serious C++ development with VS2010 (just C#), I do not see how to change the .net version of OCCTProxy. I see how to change it for the other two but I get serious warnings.

Does anybody have any suggestions on how to proceed?

Thanks in advance,

Andrey BETENEV's picture


I confirm the problem: when VS projects (originally VC9) are converted to VC10, version of .NET framework in CSharp projects is kept as it was (3.5), while in C++ projects it gets elevated to 4.0 (default for VC10). This causes incompatibility between the projects.

The solution is to change option "Target framework" in properties of C# projects (tab "Application") to ".NET Framework 4" manually.

I have registered an issue 24707 in OCCT bug tracker for this problem.