Project reference/dependency missing Devart.Data.Oracle.Linq

Project reference/dependency missing Devart.Data.Oracle.Linq

Postby damnregistration » Thu 25 Mar 2010 19:30

hi,
we have a class library project called "VDIData" that is referencing devart's oracle + linq assemblies. here is the snipped from the .csproj file:

Code: Select all
...

   
      False
      ..\_tools\devart\Devart.Data.dll
      True
   

   
      False
      ..\_tools\devart\Devart.Data.Linq.dll
      True
   

   
      False
      ..\_tools\devart\Devart.Data.Oracle.dll
      True
   

   
      False
      ..\_tools\devart\Devart.Data.Oracle.Linq.dll
      True
   

   
   
   
      3.5
   

   
      3.5
   

   
      3.5
   

   
   
      3.5
   

   
      3.5
   

   
   
 

...


(as you can see these 4 devart dlls are reference by using a relativ path)

when we compile the VDIData project all 4 devart dlls are copied to the bin directory!

we have another class library project called "VDIBusiness" that references the VDIData project. here is the snippet from the VDIBusiness.csproj:

Code: Select all
...

   
      {146CB9FE-0A51-4B1F-B471-E73A186657D5}
      VDIBusinessEntities
   

   
      {A5761A06-1C69-4212-A913-A2DD7808B84E}
      VDIData
   

 

...


when we compile VDIBusiness only the VDIData.dll along with only these 3 devart assemblys:

    Devart.Data.dll
    Devart.Data.Linq.dll
    Devart.Data.Oracle.dll

are copied to the bin directory of VDIBusiness.

the Devart.Data.Oracle.Linq.dll assembly is missing. why is that?

VDIBusiness itself is referenced in one of our web application projects (lets call it "VDIWeb1"). here is the snippet from VDIWeb1.csproj:

Code: Select all
...

   
      {146CB9FE-0A51-4B1F-B471-E73A186657D5}
      VDIBusinessEntities
   

   
      {0DCDCD3A-D373-4B72-9A65-36F39B833226}
      VDIBusiness
   

   
      {6DEB87F2-0D09-4717-A42A-4E5064FA1263}
      VDIMaster
   

 

...


sure: the Devart.Data.Oracle.Linq.dll is missing in the VDIWeb1's bin, too!

every project compiles fine! however when we call default.aspx it says:

Could not load file or assembly 'Devart.Data.Oracle.Linq, Version=1.0.25.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The system cannot find the file specified.

if we copy the Devart.Data.Oracle.Linq.dll manually to the bin of VDIWeb1 it gives this error:

Unable to cast object of type 'Devart.Data.Oracle.OracleConnection' to type 'Devart.Data.Oracle.OracleConnection'.

i assume this will be a subsequent error. therefor please let us first solve the 1st problem: why isn't the Devart.Data.Oracle.Linq.dll copied to VDIBusiness bin?

here is the project/assemly dependency again in short form:

VDIData depends on:
    Devart.Data.dll
    Devart.Data.Linq.dll
    Devart.Data.Oracle.dll
    Devart.Data.Oracle.Linq.dll


VDIBusiness depends on :
VDIData

however Devart.Data.Oracle.Linq.dll is already missing in VDIBusiness' bin after compilation

VDIWeb1 depends on:
VDIBusiness

please help us.
many thanks :roll:

p.s. it should NOT be neccessary to reference all devart dlls in every subsequent project, isn't it!!??
damnregistration
 
Posts: 11
Joined: Thu 25 Mar 2010 18:10

Postby AndreyR » Fri 26 Mar 2010 15:36

The problem seems to be associated with the fact that you have multiple versions of Devart assemblies on your machine.
Try to remove Devart asemblies you need to reference from GAC, this should help.
Yes, it isn't neccessary to add reference in each project.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby damnregistration » Fri 26 Mar 2010 17:25

hi andreyr,

you are right:

i have these DevArt components in the GAC:

    Devart.Data 5.0.70
    Devart.Data.Design 5.0.7.0
    Devart.Data.Linq 1.0.20.0
    Devart.Data.Oracle 5.25.42.0
    Devart.Data.Oracle.Entity 5.25.42.0
    Devart.Data.Oracle.Linq 1.0.20.0
    Devart.Data.Oracle.ReportingServices 5.25.42.1
    Devart.Data.Oracle.Web 5.25.42.0

and these are the dlls in our "3rd_party_components" dir:

    Devart.Data.dll 5.0.21.0
    Devart.Data.Linq.dll 1.0.25.0
    Devart.Data.Linq.Web.dll 1.0.25.0
    Devart.Data.Oracle.Design.dll 5.35.62.0
    Devart.Data.Oracle.dll 5.35.62.0
    Devart.Data.Oracle.Entity.dll 5.35.62.0
    Devart.Data.Oracle.Linq.dll 1.0.25.0
    Devart.Data.Oracle.Vs.dll 5.35.62.0
    Devart.Data.Oracle.Web.dll 5.35.62.0


i really would like NOT to install the whole devart stuff via the msi installer and all the .dlls to the GAC. we are several developers on these projects and it is very nasty for everyone to first run the installer on any devart updates.

we also would have to install every devart update via msi installer on our live servers.

therefor/so far we created a directory "3rd_party_components" in our solution directory that also contains the devart dlls (see above).
the "3rd_party_components" folder is in our subversion repository so we can update all components pretty easily - including the really needed 4 devart .dlls in our projects
our projects should depend on these dlls - not the ones installed in the GAC.

is there a way to install Devart to the system, so only a couple of us developers can access the visual studio devart GUI components and so on - WITHOUT - installing dlls to the GAC? so systems/projects work equally with and without any devart installation!?

at least our projects should run with the devart .dlls from the 3rd party components dir.

please let me know what we can do about it

many thanks so far, tobi

p.s. i will try to deinstall devart from my system now and see if it is working then
damnregistration
 
Posts: 11
Joined: Thu 25 Mar 2010 18:10

Postby damnregistration » Fri 26 Mar 2010 17:46

i closed all VS instances and just deinstalled dotConnect for oracle from my system. (i did NOT deinstall Devart OraDeveloper Tools for Visual Studio 2008)
my GAC doesn't contain any devart assembly anymore now!

i then opened our solution and rebuild our solution. however the Devart.Data.Oracle.Linq.dll is still missing in VDIBusiness bin (sure as well as in our VDIWeb1 bin). the default.aspx still gives the error:

Could not load file or assembly 'Devart.Data.Oracle.Linq, Version=1.0.25.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The system cannot find the file specified.

(i even deleted bin and obj folders and rebuild our solution).

Devart.Data.Oracle.Linq.dll still only exists in VDIData's bin after rebuild.

why isn't the component copied to VDIBusiness bin along with the other 3 devart dlls? (still remains the same problem)

please advise.

thanks, tobi

EDIT:
if we copy the Devart.Data.Oracle.Linq.dll manually to the bin of VDIWeb1 it gives this error:

Unable to cast object of type 'Devart.Data.Oracle.OracleConnection' to type 'Devart.Data.Oracle.OracleConnection'.


removing devart from the gac via the installer however fixed this error above if we copy the Devart.Data.Oracle.Linq.dll manually.

but the problem still remains: why isn't this dll copied to the VDIBusiness bin along with the other devart .dlls?
damnregistration
 
Posts: 11
Joined: Thu 25 Mar 2010 18:10

Postby AndreyR » Mon 29 Mar 2010 12:04

You have a reference to the old 1.0.20 version of the assembly from GAC (this can be seen in the XML of the project).
However, you have a more recent version in the 3rd_party_components directory.
I recommend you to change the version in the project, this should help.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby damnregistration » Tue 30 Mar 2010 15:21

AndreyR wrote:You have a reference to the old 1.0.20 version of the assembly from GAC (this can be seen in the XML of the project).
However, you have a more recent version in the 3rd_party_components directory.
I recommend you to change the version in the project, this should help.


i removed the references from VDIData and readded them. now the VDIData.csproj contains:

Code: Select all
   
      False
      ..\_tools\devart\Devart.Data.dll
   

   
      False
      ..\_tools\devart\Devart.Data.Linq.dll
   

   
      False
      ..\_tools\devart\Devart.Data.Oracle.dll
   

   
      False
      ..\_tools\devart\Devart.Data.Oracle.Linq.dll
   



please note that by readding the references via visual studio that the "private" xml element is gone:

Code: Select all
True


VDIBusiness bin still misses the Devart.Data.Oracle.Linq.dll after recompilation/rebuild.

i also readded the "private" element:
Code: Select all

         False
         ..\_tools\devart\Devart.Data.dll
         True
      

      
         False
         ..\_tools\devart\Devart.Data.Linq.dll
         True
      

      
         False
         ..\_tools\devart\Devart.Data.Oracle.dll
         True
      

      
         False
         ..\_tools\devart\Devart.Data.Oracle.Linq.dll
         True
      



and rebuild. the Devart.Data.Oracle.Linq.dll is still missing in VDIBusiness bin.

please also note that
Code: Select all
False

is set to false (as it was before!)
damnregistration
 
Posts: 11
Joined: Thu 25 Mar 2010 18:10

Postby AndreyR » Wed 31 Mar 2010 08:59

I have tried to reproduce the error and failed - assembly was copied to the folder of the dependent class library when Copy Local was set to true and assemblies were not present in GAC.
As a workaround I recommend you to use the Post Build event (Project -> Properties -> Build Events, "copy ...\Devart.Data.Oracle.Linq" $(TargetDir)) to copy Devart.Oracle.Linq.dll to the Bin folder, this should help in case assemblies are not available in GAC.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby damnregistration » Wed 31 Mar 2010 12:25

i created a new solutions with 3 projects and tried to reproduce your statement (but with another result):

    DevArtTestData - class library project - referencing the 4 Devart dlls
    DevArtTestBusiness - class library project - referencing DevArtTestData project
    DevArtTestWeb - web application project - referencing DevArtTestBusiness project


the default.aspx.cs (in DevArtTestWeb) is calling a static void method in DevArtTestBusiness - that method there itself is calling a static void method in DevArtTestData

if all the methods just "return" not a single DevArt dll is copied to DevArtTestBusiness bin - obviously because there is not any line calling something in the devart assemblies.

even DevArtTestWeb\bin contains no Devart dll then!!!

if i change this method in DevArtTestData to call
Code: Select all
Devart.Data.Oracle.Linq.OracleUtils.SplitName("nameToSplit");

all Devart dlls will be copied to DevArtTestBusiness (and also to DevArtTestWeb, and sure to DevArtTestData's bin!)

however if i would just call
Code: Select all
return Devart.Data.Oracle.OracleFailoverState.Abort.ToString();

only Devart.Data.dll and Devart.Data.Oracle.dll will be copied to DevArtTestData 's bin itself! these 2 dll will also be copied to DevArtTestBusiness and DevArtTestWeb

this is very strange!

back to our real solution:

VDIData contains some models we created with Devart (it contains .lqml files with its .cs, .Designer.cs, .edps and lqml.view files). when i delete its bin and rebuild Devart.Data.Oracle.Linq.dll will be also copied to the output / its bin!

however this dll is still missing in VDIBusiness 's bin and VDIWeb1 's bin.

obviously VDIData has "knowledge" that Devart.Data.Oracle.Linq.dll would be needed later on (maybe even if the is no line in code that is calling something from the same namespace directly) and copies this dll to its output/bin.
however VDIBusiness bin has "knowledge" about only that 3 Devart dlls that are needed and copys these only - but not having "knowledge" about Devart.Data.Oracle.Linq.dll - which will be missing.

this is strange.

can you please attach or send me the solution in which you reproduced it?
would you please investigate why this happens?

thanks
damnregistration
 
Posts: 11
Joined: Thu 25 Mar 2010 18:10

Postby AndreyR » Wed 31 Mar 2010 14:44

Have you tried the Post Build event?
This solution is better because it explicitly indicates what files to place and where.
If this doesn't help, please let me know, I'll send you the test project I was using. However, it's very simple so I don't see any use in it (I used only Devart.Data and Devart.Data.Oracle assemblies in it, because they are associated in the same way that Devart.Data.Linq and Devart.Data.Oracle.Linq ones).
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby damnregistration » Wed 31 Mar 2010 15:13

i know that the post build event would work generally but this isn't acceptable for all of our projects:

we are at the beginning of our solution and are already having a min. of 12 projects were we would have to put a post build copy statement.

for this to work we would need a post build copy statement in EACH project.

there are more projects to follow and the human factor (errors) is too big. i.e. we could forget to create the post build copy statement in new projects

in the meantime i searched our whole solution for the string "Devart":

only the VDIData project contains it in coding - and this also only in:

    generated models only (.lqml + .Designer.cs files (that are coming along with related .edps, .lqml.view, .cs files - with same base name) and
    a very few classes that inherit from Devart.Data.Oracle.OraclePackage


thats all!

the web projects are only using the string in its web.config files or in its licenses.licx files!

(we added the licenses.lics files to the web application project's properties "folder" (beside AssemblyInfo.cs) and set "Copy to output directory" to "copy if newer" and "Build action" to "Embedded Resource")
damnregistration
 
Posts: 11
Joined: Thu 25 Mar 2010 18:10

Postby AndreyR » Thu 01 Apr 2010 08:15

Could you please create a simple project reproducing the situation and send it to me (support * devart * com, subject "LINQ References")?
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby damnregistration » Tue 06 Apr 2010 09:37

jfyi: i sent you the test solution/project last thursday

attached is the test solution to reproduce.

Please note i included 1 package and 1 model from our real VDIData Project as an example in DevartTestData’s “model” and “Orapackage” folder (I just changed the namespace).

The TestDataClass.cs file in DevartTestData contains the test method (currently partly uncommented) I played with in regard to my latest post in the forum. You can “play” with these. -> But please note that such method are NOT part of our real VDIData project – only the “model” and “OraPackage” folder are.

Also please note that I have not set a connectionstring and such alike in the web.config because my focus was first on the Business project (if the .dll wouldn’t be copied there then I also would not have been coped to the web project’s bin!).
damnregistration
 
Posts: 11
Joined: Thu 25 Mar 2010 18:10

Postby AndreyR » Tue 06 Apr 2010 12:10

Thank you for the project, the investigation is in progress. I will let you know about the results.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Re:

Postby jthor » Tue 09 Oct 2012 18:44

AndreyR wrote:Thank you for the project, the investigation is in progress. I will let you know about the results.


Was this issue ever resolved? I'm having the same problem.
jthor
 
Posts: 1
Joined: Tue 09 Oct 2012 18:41

Re: Project reference/dependency missing Devart.Data.Oracle.Linq

Postby MariiaI » Wed 10 Oct 2012 10:32

This issue may be caused by several different reasons, in particular when using different versions of Devart assemblies.
Please specify all the Devart products installed on your computer including their versions.
Also, if possible, please send us the sample project, with which this issue could be reproduced.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to dotConnect for Oracle