Bug 57192 - MSBuild included in Mono 5+ error MSB3103: Invalid Resx file - position in </data> field (maybe resgen.exe fault)
Summary: MSBuild included in Mono 5+ error MSB3103: Invalid Resx file - position in </...
Status: RESOLVED FIXED
Alias: None
Product: Tools
Classification: Mono
Component: msbuild ()
Version: 5.0 (2017-02)
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Ankit Jain
URL:
Depends on:
Blocks:
 
Reported: 2017-06-06 17:36 UTC by Pawel Troka
Modified: 2017-09-04 21:35 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Pawel Troka 2017-06-06 17:36:54 UTC
On Windows (full .NET Framework) it works great without any issues.
On Linux and Mac OS X for Mono 5.0.0 and Mono 5.0.1 (haven't tested higher versions yet and lower versions do not have MSBuild which I am using because I want to switch fully to new csproj format) it throws this error. It can be related to this problem: https://stackoverflow.com/questions/4665327/mono-resources-resx-problem-when-porting-strange-error-in-resx-xml-file-on-d

Here is part of resx file where is the issue:
  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  <data name="propertyGrid1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
    <value>Fill</value>
  </data>

another example:
  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  <data name="button1.Location" type="System.Drawing.Point, System.Drawing">
    <value>13, 331</value>
  </data>


it's always right after '/' sign in </data> field

Here is an example of build where it is failling:
https://travis-ci.org/PawelTroka/Computator.NET/jobs/240046253

It probably is resgen.exe fault.
Comment 1 Pawel Troka 2017-06-07 06:25:44 UTC
Yeah now I can confirm that this issue appears in all recent Mono versions (5.0.0,5.0.1,beta,alpha) except nightly version, where there is no issue like that.
Comment 2 Ankit Jain 2017-06-07 19:32:04 UTC
Could you please share a simple project that reproduces this issue? What is the latest version that this failed with, and the nightly version that it worked with?
Comment 3 Pawel Troka 2017-06-07 21:07:13 UTC
Yes, give me some time. I will try to do this ASAP.
Comment 4 Pawel Troka 2017-06-08 20:54:09 UTC
Here is a bit simpler project reproducing this issue:
https://travis-ci.org/PawelTroka/Mono-MSBuild-Bug-57192/builds/240952142

It's still can get a lot simpler I hope. I will try to make it so
Comment 5 Pawel Troka 2017-06-08 21:33:59 UTC
Even smaller example:
https://travis-ci.org/PawelTroka/Mono-MSBuild-Bug-57192/builds/240955997

but still pretty big - I will try to make it smaller later on
Comment 6 Pawel Troka 2017-06-20 20:17:26 UTC
Made this project a bit simpler:
https://travis-ci.org/PawelTroka/Mono-MSBuild-Bug-57192/builds/245092037

As you can see Mono nightly (5.5.0.156), alpha (5.2.0.179) and beta (5.2.0.179) is working correctly while older releases are not (5.0.1.1, 5.0.0.0).
Comment 7 Marek Safar 2017-09-04 21:35:10 UTC
Closing as it seems to work with recent versions