Announcement

Collapse
No announcement yet.

Simple csproj (old format) doesn't work with linux bridge CLI (using docker image)

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

    Simple csproj (old format) doesn't work with linux bridge CLI (using docker image)

    We have been trying to use the bridge CLI (docker image) for server CI builds.

    The following are cases the cases of a project that was created from visual studio (new project -> Bridge Library).

    This is the working case with MSBuild.
    nuget restore -PackagesDirectory ../packages
    msbuild /t:build
    But using the CLI method does not work (we are building on linux with the linux bridge CLI)
    bridge restore
    bridge build
    Building SEL.Observables.Bridge  [ERROR] FATAL UNHANDLED EXCEPTION: System.PlatformNotSupportedException: Operation is not supported on this platform.
      at Microsoft.Build.Shared.BuildEnvironmentHelper.get_Instance () [0x00017] in <03a204074b9b49e3a88337f9ec679986>:0
      at Microsoft.Build.Shared.NativeMethodsShared.get_IsMono () [0x00033] in <03a204074b9b49e3a88337f9ec679986>:0
      at Microsoft.Build.BackEnd.Logging.LoggingService..ctor (Microsoft.Build.BackEnd.Logging.LoggerMode loggerMode, System.Int32 nodeId) [0x00040] in <03a204074b9b49e3a88337f9ec679986>:0
      at Microsoft.Build.BackEnd.Logging.LoggingService.CreateLoggingService (Microsoft.Build.BackEnd.Logging.LoggerMode mode, System.Int32 node) [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
      at Microsoft.Build.Evaluation.ProjectCollection.CreateLoggingService (System.Int32 maxCPUCount, System.Boolean onlyLogCriticalEvents) [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
      at Microsoft.Build.Evaluation.ProjectCollection..ctor (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.Collections.Generic.IEnumerable`1[T] loggers, System.Collections.Generic.IEnumerable`1[T] remoteLoggers, Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations, System.Int32 maxNodeCount, System.Boolean onlyLogCriticalEvents) [0x00112] in <03a204074b9b49e3a88337f9ec679986>:0
      at Microsoft.Build.Evaluation.ProjectCollection..ctor (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.Collections.Generic.IEnumerable`1[T] loggers, Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations) [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
      at Microsoft.Build.Evaluation.ProjectCollection..ctor (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties) [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
      at Microsoft.Build.Evaluation.ProjectCollection..ctor () [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
      at Bridge.Translator.Translator.OpenProject (System.String location, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties) [0x00000] in <278de2b84f464d40b870b48d41a15c14>:0
      at Bridge.Translator.Translator.EnsureProjectProperties () [0x0003b] in <278de2b84f464d40b870b48d41a15c14>:0
      at Bridge.Translator.TranslatorProcessor.SetTranslatorProperties () [0x002e2] in <278de2b84f464d40b870b48d41a15c14>:0
      at Bridge.Translator.TranslatorProcessor.PreProcess () [0x00012] in <278de2b84f464d40b870b48d41a15c14>:0
      at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object)
      at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid1[T0] (System.Runtime.CompilerServices.CallSite site, T0 arg0) [0x000fa] in <7aa7d6192efc4d31a9896d7a49ef2104>:0
      at Bridge.CLI.Program.Main (System.String[] args) [0x00607] in <0aaab49d007848f5a018b89c310ebc6d>:0
    Any thoughts on this? It seems that there is a issue in the bridge CLI.
    Last edited by selinc; 2018-10-22 @ 10:17 PM.

    #2
    Hello @selinc!

    If you do nuget restore you shouldn't need bridge restore. But it is not clear to me which operation is not supported by the platform by what you're sharing on output. It seems to involve logging, so experiment disabling bridge's logging in bridge.json and see what happens.

    It could be your mono version is too old and does not implement a part required to run (or it misses libraries related to logging service or build tools).

    Hope this helps!

    Comment


      #3
      Those were two separate cases: first one works, second one does not.
      Its the bridge build step that is failing. Do you know what is the minimum version required for the bridge CLI (msbuild works fine). I thought that the bridge CLI was just calling MSBuild or something along these lines. (if this is accurate, then I don't think it could be the mono/.net core version because the msbuild can build it).

      I don't think Mono == .net core? Anyway I'm using .net core.

      Comment


        #4
        Specifically here are the steps that I took:
        * Create a new bridge project in Windows (bridge v 17.4) [Compiles and works just fine in VS 2017]
        * Copy to a docker container hosted on a linux host.
        ** This docker container is built from the latest bridge docker image (FROM bridgedotnet/bridge:17.4.0)
        ** .Net Core is installed as a part of our docker image creation (following the steps from the jessie dotnet docker file) https://github.com/dotnet/dotnet-doc...d64/Dockerfile

        * run "bridge restore" -- SUCCESS
        * run "bridge build" -- ERROR


        Building SimpleBridgeProjectTest  [ERROR] FATAL UNHANDLED EXCEPTION: System.PlatformNotSupportedException: Operation is not supported on this platform.
          at Microsoft.Build.Shared.BuildEnvironmentHelper.get_Instance () [0x00017] in <03a204074b9b49e3a88337f9ec679986>:0
          at Microsoft.Build.Shared.NativeMethodsShared.get_IsMono () [0x00033] in <03a204074b9b49e3a88337f9ec679986>:0
          at Microsoft.Build.BackEnd.Logging.LoggingService..ctor (Microsoft.Build.BackEnd.Logging.LoggerMode loggerMode, System.Int32 nodeId) [0x00040] in <03a204074b9b49e3a88337f9ec679986>:0
          at Microsoft.Build.BackEnd.Logging.LoggingService.CreateLoggingService (Microsoft.Build.BackEnd.Logging.LoggerMode mode, System.Int32 node) [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
          at Microsoft.Build.Evaluation.ProjectCollection.CreateLoggingService (System.Int32 maxCPUCount, System.Boolean onlyLogCriticalEvents) [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
          at Microsoft.Build.Evaluation.ProjectCollection..ctor (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.Collections.Generic.IEnumerable`1[T] loggers, System.Collections.Generic.IEnumerable`1[T] remoteLoggers, Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations, System.Int32 maxNodeCount, System.Boolean onlyLogCriticalEvents) [0x00112] in <03a204074b9b49e3a88337f9ec679986>:0
          at Microsoft.Build.Evaluation.ProjectCollection..ctor (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.Collections.Generic.IEnumerable`1[T] loggers, Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations) [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
          at Microsoft.Build.Evaluation.ProjectCollection..ctor (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties) [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
          at Microsoft.Build.Evaluation.ProjectCollection..ctor () [0x00000] in <03a204074b9b49e3a88337f9ec679986>:0
          at Bridge.Translator.Translator.OpenProject (System.String location, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties) [0x00000] in <278de2b84f464d40b870b48d41a15c14>:0
          at Bridge.Translator.Translator.EnsureProjectProperties () [0x0003b] in <278de2b84f464d40b870b48d41a15c14>:0
          at Bridge.Translator.TranslatorProcessor.SetTranslatorProperties () [0x002e2] in <278de2b84f464d40b870b48d41a15c14>:0
          at Bridge.Translator.TranslatorProcessor.PreProcess () [0x00012] in <278de2b84f464d40b870b48d41a15c14>:0
          at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object)
          at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid1[T0] (System.Runtime.CompilerServices.CallSite site, T0 arg0) [0x000fa] in <7aa7d6192efc4d31a9896d7a49ef2104>:0
          at Bridge.CLI.Program.Main (System.String[] args) [0x00607] in <0aaab49d007848f5a018b89c310ebc6d>:0

        Comment


          #5
          Update
          It seems that even if I remove everything else in the Dockerfile (except the FROM bridgedotnet/bridge:17.4.0 line) it still doesn't work and fails with the same message.
          Is there some way for me to send you my "SimpleBridgeProjectTest"?

          Please do note specifically that we are building the docker image on a Windows machine, deploying the docker image as a container on a Linux host (VM on a Windows machine). There must be something different between our environment or cases as it sounds like this is working on your end.

          Comment

          Working...
          X