Announcement

Collapse
No announcement yet.

Bridge CLI fails to compile on Linux

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Bridge CLI fails to compile on Linux

    I've updated a bridge project to 17.0.0 and am able to build it on windows 10 using either Visual Studio or 'bridge build' command.

    Our build server runs on linux using bridge CLI and was building the project version with 16.8.2. We've updated that system to use 17.0.0 and we now get this error:
    error 26-Apr-2018 00:26:08 + bridge build -c Release -S Version:0.3.6690.780 build 26-Apr-2018 00:26:08 Defaulting Project Location to /root/SEL.Observables/SEL.Observables.Bridge/SEL.Observables.Bridge.csproj error 26-Apr-2018 00:26:09 error 26-Apr-2018 00:26:09 Unhandled Exception: error 26-Apr-2018 00:26:09 System.InvalidCastException: Specified cast is not valid. error 26-Apr-2018 00:26:09 at Microsoft.Build.Utilities.TaskItem..ctor (Microsoft.Build.Framework.ITaskItem sourceItem) [0x0008b] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at (wrapper remoting-invoke-with-check) Microsoft.Build.Utilities.TaskItem..ctor(Microsoft .Build.Framework.ITaskItem) error 26-Apr-2018 00:26:09 at Microsoft.Build.BuildEngine.DirectoryScanner.Proce ssInclude (Microsoft.Build.Framework.ITaskItem include_item, System.Collections.Generic.Dictionary`2[TKey,TValue] excludedItems, System.Collections.Generic.List`1[T] includedItems) [0x00195] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at Microsoft.Build.BuildEngine.DirectoryScanner.Scan () [0x00072] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at Microsoft.Build.Evaluation.ProjectCollection+<GetA llItems>d__117`1[T].MoveNext () [0x0019a] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at Microsoft.Build.Evaluation.Project.EvaluateItems (System.Collections.Generic.IEnumerable`1[T] elements) [0x00139] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at Microsoft.Build.Evaluation.Project.ProcessXml () [0x00022] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at Microsoft.Build.Evaluation.Project.Initialize () [0x001b2] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at Microsoft.Build.Evaluation.Project..ctor (Microsoft.Build.Construction.ProjectRootElement xml, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00043] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at Microsoft.Build.Evaluation.Project..ctor (Microsoft.Build.Construction.ProjectRootElement xml, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection) [0x00000] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at Microsoft.Build.Evaluation.Project..ctor (System.Xml.XmlReader xmlReader, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection) [0x00007] in <15ec0561dfb24e4c99c603904f71d6da>:0 error 26-Apr-2018 00:26:09 at Bridge.Translator.Translator.GetSourceFiles (System.Xml.Linq.XDocument doc) [0x0003c] in <0799593d7d7f45b98c99480ee647120e>:0
    Please look into this and let me know if it is an issue on your end or if you need any more information. Thanks.

    #2
    Hello selinc! Thanks for your feedback on using Bridge!

    It seems you hit an interesting scenario. While packaging Bridge, I've noticed that mono got some rather reasonable updates -- Bridge was not quite working with the older version (5.4.6.1), mostly because the Docker image I used had old SSL certificates and I couldn't download packages from NuGet at all.

    Since I switched over to mono 5.10.x (which is around their stable release according to http://www.mono-project.com/download/stable/), all worked fine.

    I didn't get down to the point I could even possibly reproduce the issue you're reporting but with the C#7 (and 7.1, 7.2) syntax support, some technology upgrades needed to kick in. This most likely means that old Mono releases may have trouble handling Bridge 17 projects.

    That said, would you confirm the Mono version you're using on your server? If still previous stable (<5.10), maybe that's a good idea to try upgrading it to latest stable and see what happens.

    By the way, it is rather difficult to read your text output snippet, you probably want to wrap that in [code][/code] tags for a more useful display of the issue.

    Comment


      #3
      We are using the bridge.net docker container obtained from https://hub.docker.com/r/bridgedotnet/bridge/.

      That is installing mono 5.10.0.160

      Comment


        #4
        Hello selinc! Thanks for the follow-up!

        Can you enable logging to info and/or trace, try rebuilding, and provide the file? The objective would be to identify which part of the code is failing to build. The docker image can build simple projects so we are probably talking about specific scenarios that break down there. If we can trim that down to the part of code that doesn't work it would be more feasible to analyze the issue.

        Comment


          #5
          We tracked this down. It has nothing to do with version 17 (same problem occurs on 16.8)

          Our build process is as follows:
          1. Using the bridge.net docker container.
          2. Start with the same csproj files used on Windows. Modify it with a python script to make it compatible with bridge build.
          3. Run nuget restore.
          4. Run bridge build.

          Anyway, the problem was that bridge doesn't like the <Link>...</Link> we were using to link files from a non-bridge project into this one. We tweaked the python script to fix this and we're off and running again.

          Thanks again for your help!

          Comment

          Working...
          X