erluk's picture

Building OpenTK using Mono


I'm trying to build OpenTK trunk on an ArchLinux box, using Mono 2.6.1.

Starting from a clean svn checkout, I get the following error while running 'xbuild OpenTK.sln':

Target GenerateResources:
				Compiling resource file 'Properties/Resources.resx' into 'obj/Debug/OpenTK.Build.Properties.Resources.resources'
/usr/lib/mono/2.0/Microsoft.Common.targets: error : Invalid ResX input.  at System.Resources.ResXResourceReader.LoadData () [0x00000] in <filename unknown>:0 
  at System.Resources.ResXResourceReader.GetEnumerator () [0x00000] in <filename unknown>:0 
  at Microsoft.Build.Tasks.GenerateResource.CompileResourceFile (System.String sname, System.String dname) [0x00000] in <filename unknown>:0 
/usr/lib/mono/2.0/Microsoft.Common.targets: error : Error during compiling resource file.
			Task "GenerateResource" execution -- FAILED

This happens while xbuild tries to build the 'build' project. The attachment contains the full output of the xbuild run. Has anyone seen this before?

xbuild_OpenTK.sln_svnrev_2600.log4.08 KB


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

I have seen this issue come up on Mono 2.4.3 / Linux. On the other hand, Mono 2.6.0 / Windows seems to compile OpenTK just fine (xbuild). This leads me to believe it's a path issue (resource compiler cannot locate some resource), but a quick look showed everything to be in line. Maybe the space character in "Prebuild License.txt" is throwing the compiler off?

I'll test once I get back to my Linux box.

ankit9's picture

Try running xbuild with the environment variable MONO_IOMAP set to drive.

$ MONO_IOMAP=drive xbuild OpenTK.sln

The problem is that the Resources.resx in the Build project, has windows style
"\" as path separator. I'll fix xbuild to handle this better.

erluk's picture

Thanks ankit9, building with MONO_IOMAP works fine. As does building with MonoDevelop 2.2, by the way.

the Fiddler's picture

Thanks for looking into this. MonoDevelop 2.0 also consumes backslashes fine - I'll change OpenTK to use forward slashes throughout, but a fix in xbuild would also be nice.

ankit9's picture

I've already fixed xbuild to handle this. It should be available in the next mono release.