Error: The type or namespace name 'DynamicRelation' could not be found (are you missing a using directive or an assembly reference?)

Posts   
 
    
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 26-Jun-2008 23:19:47   

I dont' understand. I transfer 3 projects from 2.5 to 2.6. 2 are fine and 1 give me the error:

Error 7 The type or namespace name 'DynamicRelation' could not be found (are you missing a using directive or an assembly reference?)

The only difference is that I'm using DQE.OracleMS in this project only.

Do you have any idea on what I'm doing wrong ?

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 27-Jun-2008 10:21:30   

DynamicRelation is new in 2.6, are you sure you had it back then in 2.5? Or did you have another class of your own with the same name?

Anyway, you can right-click on it in code, and select Resolve, which should add the appropriate using statement.

Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 27-Jun-2008 15:17:49   

Thanks for your answer Walaa,

The .cs class was not in the project. It was probably in the folder but I didn't think of trying to include it. I tried to remove and re-set references without success. I then remove all the project from my solution and re-generate the code. It was then working.

Note: Next time, if it re-happen, I will look at the missing file in the folder. It will surely be there and it will be less trouble. Good Idea, thanks !

Everything is ok now. Thanks.

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 27-Jun-2008 15:42:34   

Also when migrating your code, you may set the CleanUpVsNetProjects project property to true.

docs wrote:

CleanUpVsNetProjects When set to true, the VS.NET project file task performer will first remove all file references for files from an existing VS.NET project file, before adding the files generated. For VS.NET 2005 projects, it will remove all files generated by LLBLGen Pro, as these are marked with a Generator tag.

Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 27-Jun-2008 16:38:47   

I took note and see that option in project properties.

Thanks for this additional and nice info.