it is the right thing to do, but NPanday should better find out by combination of gac and target framework which gac to use
_ Mobil versendet. Am 18.11.2011 um 14:53 schrieb Callixte Cauchois <ccauch...@virtuoz.com>: > I looked in the code and found in CompilerContextImpl.java that it should > work if the type is set to gac_msil4. > So I modified my pom.xml to set this type and it works. > > I don't know if it is the right way to solve it though. > > On Fri, Nov 18, 2011 at 12:31 PM, Callixte Cauchois > <ccauch...@virtuoz.com>wrote: > >> Hi people, >> >> I have imported a project that references Entity framework from Microsoft >> which is present in System.Data.Entity.dll which is installed on my machine >> (in GAC for version 3.5 and in C:\Program Files (x86)\Reference >> Assemblies\Microsoft\Framework\.NETFramework\v4.0 for v4.0 which is the one >> that is referenced). >> >> When I try to compile (using mvn compile or through the VS2010 add in) I >> get the following error: >> >> *c:\zvn\unstable\Common\Tools\target\18122544\ZEntityHelper.cs(3,19): >> error CS0234: The type or namespace name 'EntityClient' does not exist in >> the namespace 'System.Data' (are you missing an assembly reference?)* >> *c:\zvn\unstable\Common\Tools\target\18122544\ZEntityHelper.cs(4,19): >> error CS0234: The type or namespace name 'Objects' does not exist in the >> namespace 'System.Data' (are you missing an assembly reference?)* >> >> as if it cannot find the referenced assembly. >> If I remove the reference and re-add it, I get a dependency added to my >> pom.xml: >> <dependency> >> <groupId>System.Data.Entity</groupId> >> <artifactId>System.Data.Entity</artifactId> >> <version>4.0.0.0</version> >> <type>gac_msil</type> >> <classifier>B77A5C561934E089</classifier> >> </dependency> >> and then the following error: >> >> *[ERROR] Failed to execute goal >> org.apache.npanday.plugins:maven-compile-plugin:1.4.0-incubating:initialize >> (default-initialize) on project Common.Tools: NPANDAY-089-000: >> NPANDAY-180-020: Problem in resolving artifact: Artifact = >> System.Data.Entity:System.Data.Entity:gac_msil:B77A5C561934E089:4.0.0.0, >> Message =* >> *Failure to find >> System.Data.Entity:System.Data.Entity:dll:B77A5C561934E089:4.0.0.0 in >> http://localhost:8080/archiva/repository/internal/ was cached in the >> local repository, resolution will not be reattempted until the update >> interval of internal has elapsed or updates are forced* >> *[ERROR]* >> *[ERROR] Try downloading the file manually from the project website.* >> *[ERROR]* >> *[ERROR] Then, install it using the command:* >> *[ERROR] mvn install:install-file -DgroupId=System.Data.Entity >> -DartifactId=System.Data.Entity -Dversion=4.0.0.0 >> -Dclassifier=B77A5C561934E089 -Dpackaging=gac_msil -Dfile=/path/to/file* >> *[ERROR]* >> *[ERROR] Alternatively, if you host your own repository you can deploy >> the file there:* >> *[ERROR] mvn deploy:deploy-file -DgroupId=System.Data.Entity >> -DartifactId=System.Data.Entity -Dversion=4.0.0.0 >> -Dclassifier=B77A5C561934E089 -Dpackaging=gac_msil -Dfile=/path/to/file >> -Durl=[url] -DrepositoryId=[id]* >> *[ERROR]* >> *[ERROR]* >> *[ERROR] System.Data.Entity:System.Data.Entity:gac_msil:4.0.0.0* >> *[ERROR]* >> *[ERROR] from the specified remote repositories:* >> *[ERROR] internal (http://localhost:8080/archiva/repository/internal/, >> releases=true, snapshots=false),* >> *[ERROR] external (http://localhost:8080/archiva/repository/external/, >> releases=true, snapshots=false),* >> *[ERROR] snapshots (http://localhost:8080/archiva/repository/snapshots/, >> releases=true, snapshots=false),* >> *[ERROR] npanday (http://localhost:8080/archiva/repository/npanday/, >> releases=true, snapshots=false),* >> *[ERROR] npanday.repo.3 ( >> http://localhost:8080/archiva/repository/external/, releases=true, >> snapshots=false),* >> *[ERROR] npanday.repo.2 ( >> http://localhost:8080/archiva/repository/snapshots/, releases=true, >> snapshots=false),* >> *[ERROR] npanday.repo.1 (http://localhost:8080/archiva/repository/npanday/, >> releases=true, snapshots=false),* >> *[ERROR] npanday.repo.0 ( >> http://localhost:8080/archiva/repository/internal/, releases=true, >> snapshots=false),* >> *[ERROR] central (http://repo1.maven.org/maven2, releases=true, >> snapshots=false)* >> >> again, not finding the assembly in the gac and trying to download it from >> my repositories. >> >> I have this same issue with other System.something assemblies. Is there a >> way to solve this other than uploading every one of them on a repository? >> >> Thanks. >>