Running dotnetcore Console application in Service Fabric Guest Executable












0















I am trying to run a dotnetcore Console application in a ServiceFabric GuestExecutable Container. While I was adding this GuestExecutable service to my SF application, I cofigured as follows




  1. Code Package Folder -> ..reposNewDllGuestSFCoreConsolebinDebugnetcoreapp2.0


  2. Program -> CoreConsole.dll


  3. Working Folder -> CodePackage



Here, I know I am trying to host this .dll file as my executable for the GuestExecutable service. This is what I am trying to do but could not somehow. When I tried the same with the treditional .NetFramework app and with an .exe executable, I am able to run it successfully on SF cluster. But I need to do is with dotnetcore application and of course with a dll executable.



So far I have tried is -
I can generate a dll as well as an exe while building my dotnetcore console application and use the generated .exe file in GuestExecutable. But here, I have to configure my console app to target multiple Frameworks as "netcoreapp2.0;net461", that is something I can not do for some reasons.



When I run my dotnetcore Console app with a dll executable in SF cluster, I faced the following error
enter image description here



Here if we see, the GuestExecutable service remains in healthy state but the application doesn't.



Can anyone please help me out on this, all I want to do is to host a .dll file as entry point in a GuestExecutable SF service.










share|improve this question





























    0















    I am trying to run a dotnetcore Console application in a ServiceFabric GuestExecutable Container. While I was adding this GuestExecutable service to my SF application, I cofigured as follows




    1. Code Package Folder -> ..reposNewDllGuestSFCoreConsolebinDebugnetcoreapp2.0


    2. Program -> CoreConsole.dll


    3. Working Folder -> CodePackage



    Here, I know I am trying to host this .dll file as my executable for the GuestExecutable service. This is what I am trying to do but could not somehow. When I tried the same with the treditional .NetFramework app and with an .exe executable, I am able to run it successfully on SF cluster. But I need to do is with dotnetcore application and of course with a dll executable.



    So far I have tried is -
    I can generate a dll as well as an exe while building my dotnetcore console application and use the generated .exe file in GuestExecutable. But here, I have to configure my console app to target multiple Frameworks as "netcoreapp2.0;net461", that is something I can not do for some reasons.



    When I run my dotnetcore Console app with a dll executable in SF cluster, I faced the following error
    enter image description here



    Here if we see, the GuestExecutable service remains in healthy state but the application doesn't.



    Can anyone please help me out on this, all I want to do is to host a .dll file as entry point in a GuestExecutable SF service.










    share|improve this question



























      0












      0








      0








      I am trying to run a dotnetcore Console application in a ServiceFabric GuestExecutable Container. While I was adding this GuestExecutable service to my SF application, I cofigured as follows




      1. Code Package Folder -> ..reposNewDllGuestSFCoreConsolebinDebugnetcoreapp2.0


      2. Program -> CoreConsole.dll


      3. Working Folder -> CodePackage



      Here, I know I am trying to host this .dll file as my executable for the GuestExecutable service. This is what I am trying to do but could not somehow. When I tried the same with the treditional .NetFramework app and with an .exe executable, I am able to run it successfully on SF cluster. But I need to do is with dotnetcore application and of course with a dll executable.



      So far I have tried is -
      I can generate a dll as well as an exe while building my dotnetcore console application and use the generated .exe file in GuestExecutable. But here, I have to configure my console app to target multiple Frameworks as "netcoreapp2.0;net461", that is something I can not do for some reasons.



      When I run my dotnetcore Console app with a dll executable in SF cluster, I faced the following error
      enter image description here



      Here if we see, the GuestExecutable service remains in healthy state but the application doesn't.



      Can anyone please help me out on this, all I want to do is to host a .dll file as entry point in a GuestExecutable SF service.










      share|improve this question
















      I am trying to run a dotnetcore Console application in a ServiceFabric GuestExecutable Container. While I was adding this GuestExecutable service to my SF application, I cofigured as follows




      1. Code Package Folder -> ..reposNewDllGuestSFCoreConsolebinDebugnetcoreapp2.0


      2. Program -> CoreConsole.dll


      3. Working Folder -> CodePackage



      Here, I know I am trying to host this .dll file as my executable for the GuestExecutable service. This is what I am trying to do but could not somehow. When I tried the same with the treditional .NetFramework app and with an .exe executable, I am able to run it successfully on SF cluster. But I need to do is with dotnetcore application and of course with a dll executable.



      So far I have tried is -
      I can generate a dll as well as an exe while building my dotnetcore console application and use the generated .exe file in GuestExecutable. But here, I have to configure my console app to target multiple Frameworks as "netcoreapp2.0;net461", that is something I can not do for some reasons.



      When I run my dotnetcore Console app with a dll executable in SF cluster, I faced the following error
      enter image description here



      Here if we see, the GuestExecutable service remains in healthy state but the application doesn't.



      Can anyone please help me out on this, all I want to do is to host a .dll file as entry point in a GuestExecutable SF service.







      .net-core azure-service-fabric guest-executable






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 24 '18 at 7:08







      starklord

















      asked Nov 24 '18 at 6:54









      starklordstarklord

      841210




      841210
























          1 Answer
          1






          active

          oldest

          votes


















          0














          As far as I understand you need to configure CodePackage in ServiceManifest.xml to run your .dll using external executable.



          Here is the example how this could be done (please pay attention to IsExternalExecutable="true" attribute):



            <CodePackage Name="Code" Version="1.0.0">
          <EntryPoint>
          <ExeHost IsExternalExecutable="true">
          <!-- We are using dotnet cli to launch our Service.dll -->
          <Program>dotnet</Program>
          <Arguments>Service.dll</Arguments>
          <WorkingFolder>CodePackage</WorkingFolder>
          </ExeHost>
          </EntryPoint>
          </CodePackage>


          Hope it helps.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53455903%2frunning-dotnetcore-console-application-in-service-fabric-guest-executable%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            As far as I understand you need to configure CodePackage in ServiceManifest.xml to run your .dll using external executable.



            Here is the example how this could be done (please pay attention to IsExternalExecutable="true" attribute):



              <CodePackage Name="Code" Version="1.0.0">
            <EntryPoint>
            <ExeHost IsExternalExecutable="true">
            <!-- We are using dotnet cli to launch our Service.dll -->
            <Program>dotnet</Program>
            <Arguments>Service.dll</Arguments>
            <WorkingFolder>CodePackage</WorkingFolder>
            </ExeHost>
            </EntryPoint>
            </CodePackage>


            Hope it helps.






            share|improve this answer




























              0














              As far as I understand you need to configure CodePackage in ServiceManifest.xml to run your .dll using external executable.



              Here is the example how this could be done (please pay attention to IsExternalExecutable="true" attribute):



                <CodePackage Name="Code" Version="1.0.0">
              <EntryPoint>
              <ExeHost IsExternalExecutable="true">
              <!-- We are using dotnet cli to launch our Service.dll -->
              <Program>dotnet</Program>
              <Arguments>Service.dll</Arguments>
              <WorkingFolder>CodePackage</WorkingFolder>
              </ExeHost>
              </EntryPoint>
              </CodePackage>


              Hope it helps.






              share|improve this answer


























                0












                0








                0







                As far as I understand you need to configure CodePackage in ServiceManifest.xml to run your .dll using external executable.



                Here is the example how this could be done (please pay attention to IsExternalExecutable="true" attribute):



                  <CodePackage Name="Code" Version="1.0.0">
                <EntryPoint>
                <ExeHost IsExternalExecutable="true">
                <!-- We are using dotnet cli to launch our Service.dll -->
                <Program>dotnet</Program>
                <Arguments>Service.dll</Arguments>
                <WorkingFolder>CodePackage</WorkingFolder>
                </ExeHost>
                </EntryPoint>
                </CodePackage>


                Hope it helps.






                share|improve this answer













                As far as I understand you need to configure CodePackage in ServiceManifest.xml to run your .dll using external executable.



                Here is the example how this could be done (please pay attention to IsExternalExecutable="true" attribute):



                  <CodePackage Name="Code" Version="1.0.0">
                <EntryPoint>
                <ExeHost IsExternalExecutable="true">
                <!-- We are using dotnet cli to launch our Service.dll -->
                <Program>dotnet</Program>
                <Arguments>Service.dll</Arguments>
                <WorkingFolder>CodePackage</WorkingFolder>
                </ExeHost>
                </EntryPoint>
                </CodePackage>


                Hope it helps.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 24 '18 at 15:54









                Oleg KarasikOleg Karasik

                5068




                5068






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53455903%2frunning-dotnetcore-console-application-in-service-fabric-guest-executable%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Berounka

                    Sphinx de Gizeh

                    Different font size/position of beamer's navigation symbols template's content depending on regular/plain...