You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by "Adelita L. Padilla (JIRA)" <ji...@apache.org> on 2010/11/22 03:09:14 UTC

[jira] Resolved: (NPANDAY-316) Trying to import WPF-project on 64-bit system (VS 2008) throws FileLoadException

     [ https://issues.apache.org/jira/browse/NPANDAY-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adelita L. Padilla resolved NPANDAY-316.
----------------------------------------

    Resolution: Fixed

> Trying to import WPF-project on 64-bit system (VS 2008) throws FileLoadException
> --------------------------------------------------------------------------------
>
>                 Key: NPANDAY-316
>                 URL: https://issues.apache.org/jira/browse/NPANDAY-316
>             Project: NPanday
>          Issue Type: Bug
>            Reporter: artemfedorenko
>            Assignee: Adelita L. Padilla
>            Priority: Minor
>             Fix For: 2.0
>
>
> When trying to import a solution with WPF-project on 64 bit system in Visual Studio 2008 (for other versions also will be the case I think) NPanday throws the following exception:
> Could not load file or assembly 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
>    at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
>    at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
>    at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
>    at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
>    at NPanday.ProjectImporter.Converter.Algorithms.AbstractPomConverter.ResolveDependency(Reference reference) 
>    at NPanday.ProjectImporter.Converter.Algorithms.AbstractPomConverter.AddProjectReferenceDependency(Reference reference) 
>    at NPanday.ProjectImporter.Converter.Algorithms.AbstractPomConverter.AddProjectReferenceDependenciesToList() 
>    at NPanday.ProjectImporter.Converter.Algorithms.NormalPomConverter.ConvertProjectToPomModel(Boolean writePom, String scmTag) 
>    at NPanday.ProjectImporter.Converter.Algorithms.AbstractPomConverter.ConvertProjectToPomModel(String scmTag) 
>    at NPanday.ProjectImporter.Converter.PomConverter.ConvertProjectToPomModel(ProjectDigest projectDigest, String mainPomFile, Model parent, String groupId, Boolean writePom, String scmTag)
> Fusion log is the following:
> === Pre-bind state information ===
> LOG: User = **\********
> LOG: DisplayName = PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64
>  (Fully-specified)
> LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 9.0/Common7/IDE/
> LOG: Initial PrivatePath = NULL
> Calling assembly : NPanday.ProjectImporterEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
> ===
> LOG: This bind starts in LoadFrom load context.
> WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
> LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe.Config
> LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
> LOG: Post-policy reference: PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64
> ERR: An assembly with different processor architecture is already loaded.
> As you can see from fusion log NPanday tries to load an assembly with different architecture (AMD64) than the one that was already loaded. The problem here is that PresentationCore.dll (among some other dll) is used by visual studio itself (especially the case for VS 2010 whose UI is based on WPF) so is loaded with VS studio. And visual studio is by nature a 32 bit application. So when NPanday tries to import an app on 64 bit system it 'founds' the 64-bit version of this dll and loads it using FULL assembly name with processorArchitecture causing the the above error.
> I created a small patch forcing assembly load without processorArchitecture parameter (anyway its architecture is not important for NPanday at the time of import as it is not used in POM). It worked as supposed also on my 64 bit system and imported solution without any problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.