[Mono-bugs] [Bug 530210] New: xbuild fails if an unmanaged library is located in a project reference path
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Aug 12 01:09:24 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=530210
Summary: xbuild fails if an unmanaged library is located in a
project reference path
Classification: Mono
Product: Mono: Tools
Version: 2.4.x
Platform: x86
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: P5 - None
Component: xbuild
AssignedTo: jankit at novell.com
ReportedBy: jhurliman at metaverseindustries.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2 (.NET CLR 4.0.20506)
(libOpenMetaverse is successfully compiling with xbuild except for this last
issue)
When the assembly reference path (in a Visual Studio project file) for a
project contains an unmanaged (C/C++) .dll, it looks like xbuild will end up
calling System.Reflection.AssemblyName.GetAssemblyName() on it even if no
projects are referencing that library. This results in the error and stack
trace below:
Project
"C:\Code\OpenMetaverse\t
runk\OpenMetaverse.StructuredData\OpenMetaverse.StructuredData.csproj"
(GetTarge
tPath target(s)):
Target ResolveAssemblyReferences:
System.BadImageFormatException: Could not load file or assembly
'C:\Code\OpenMet
averse\trunk\bin\openjpeg-dotnet-x86_64.dll' or one of its dependencies. An
atte
mpt was made to load a program with an incorrect format.
File name: 'C:\Code\OpenMetaverse\trunk\bin\openjpeg-dotnet-x86_64.dll'
at (wrapper managed-to-native)
System.Reflection.Assembly:InternalGetAssemblyN
ame (string,System.Reflection.AssemblyName)
at System.Reflection.AssemblyName.GetAssemblyName (System.String
assemblyFile)
[0x00000]
at Microsoft.Build.Tasks.AssemblyResolver.FindInDirectory (ITaskItem
reference
, System.String directory, System.String[] file_extensions) [0x00000]
at Microsoft.Build.Tasks.ResolveAssemblyReference.ResolveReference (ITaskItem
item, System.String[] search_paths) [0x00000]
at
Microsoft.Build.Tasks.ResolveAssemblyReference.ResolveDependencyByAssemblyN
ame (System.Reflection.AssemblyName aname, System.String parent_copy_local)
[0x0
0000]
at
Microsoft.Build.Tasks.ResolveAssemblyReference.ResolveAssemblyFileDependenc
ies (ITaskItem item, System.String parent_copy_local) [0x00000]
at Microsoft.Build.Tasks.ResolveAssemblyReference.ResolveAssemblyFiles ()
[0x0
0000]
at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute () [0x00000]
at Microsoft.Build.BuildEngine.TaskEngine.Execute () [0x00000]
at Microsoft.Build.BuildEngine.BuildTask.Execute () [0x00000]
: error : Error while building
C:\Code\OpenMetaverse\trunk\OpenMetaverseCore\Op
enMetaverseCore.csproj
Reproducible: Always
Steps to Reproduce:
1. Compile a solution with xbuild and confirm that it works
2. Put an unmanaged .dll in your project assembly reference path
3. Try to compile with xbuild again and observe that it fails
Actual Results:
Should completely ignore unmanaged binaries that are not referenced by any
project files
Expected Results:
Printed out the error shown above
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list