1

Excuse me if this is obvious, this is my first time dealing with C#.

I checke dout revision 554 and set CPU to x86 for all targets.

Building, ScreenManager complained about a duplicate Kinovea.ScreenManager.Properties namespace.

I saw two versions of the Drawings.Designer.cs file, so I removed Drawings.Designer1.cs from the project. That appeared to fix that issue.

However now ScreenManager fails on TrackerBlock2.cs, saying the namespace CV doesn't exist in Emgu.

I then removed and re-added Emgu.CV.dll as a reference to ScreenManager and was told it (or one of its dependencies) required a later version of .NET than the one I have specified (2.0).

Visual Studio 2010.

Any suggestions?

2 (edited by joan 2011-09-20 19:32:30)

Hi,
For info I've been working in the "FileTypes" branch for the last weeks (warning, it's very experimental and broken in several places). Let me check if I can reproduce your issues (don't have VS2010 though).
I do remember that EmguCV is advertised to be for .NET 3.5, but I had found a way to make it work for 2.0 anyway. Did you reference the dll in \Refs folder or did you install it separately ?

edit:
Synched trunk to a new folder, opened in VC#2008 Express, switched to x86, rebuilt: OK.
Set "Root" as startup project, F5 : OK.
There's only one Drawings.Designer.cs in the sources (also see here), maybe it's something that resulted from an automatic conversion to .NET 4.0 / Visual Studio 10 ? Not sure.

edit 2:
Ok, I tried with VC#2010 Express and… well.
The automatic conversion does a number of nasty things that breaks the project.

1 - it alters all the .csproj files and redefines the toolchain (compiler, linker, resgen, etc) to be of the 4.0 version instead of 2.0/3.5. (Because .NET 4.0 is a new framework, whereas 3.5 and 2.0 where based on the same underlying infrastructure).

2 - it took the liberty to regenerate all the resources files using the new toolchain.
For most it's not an issue. (Except that now we can't use the project in older version).
For some reason it created "Drawings1.Designer.cs" and added it to the project (instead of replacing the old one). I think it's a bug of the converter.

For the issue with Emgu.CV that can't be loaded… I'm not sure but I think it has to do with references to assemblies in the GAC like System or System.Data. They will automatically use the version corresponding to a certain target framework. So when the target FW was changed to 4.0 in point 1, it actually changed the actual referenced assemblies.

So, I guess that for now, we will say that one has to use an IDE based on framework 2.0 or 3.5 (VC#2005, VC#2008, SharpDevelop 2 or 3) or SharpDevelop 4.x.

3

Thanks so much for looking into it. Yes, it appears to be System.Core, System.ServiceModel and a few others that look like they require 3.5.

>> Did you reference the dll in \Refs folder or did you install it separately ?

Emgu.CV automatically became a reference for ScreenManager during the conversion, however I did notice something strange (but remember I have zero experience with C# and VS). When I went to the ObjectBrowser, every dll referenced by ScreenManager was in the ObjectBrowser, except for Emgu.CV. Somehow I finally managed to see it in ObjectBrowser (adding and removing it many times smile but maybe something else I did.)

Upon removing it as a reference, then trying to re-add it, it gave me the warning that it was built for a later version of .NET and asked me if I'd like to add it anyway.

I'll try SharpDevelop 4.x.  Thanks

4

SharpDevelop 4.1 built r554 without issue so I'll stick with that for the meantime. As I get a bit more understanding with this new world I'll see if I can get it going with VS2010.