Change target framework of a Office Addins project from .NET Framework to .NET Core












1















The default Excel Web Add-in template created by Visual Studio in a new Office Addins solution has two projects:





  • AppName: A manifest project, with only a XML file.


  • AppNameWeb: A .NET Framework 4.6.1 project with several template files.


I want to delete the .NET Framework project and use a brand new .NET Core project instead, that I just created in the same solution.



I went to the project reference dialog of AppName. I removed AppNameWeb included my .NET Core project, then I confirmed the changes.



Now I get this warning:



Project 'AppName.csproj' targets 'netcoreapp2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.6.1'.



I opened AppName project properties, but I don't have the option to change its target framework to .NET Core 2.1, it only lists .NET Framework 4.x.x



Question is: is it possible to change the target framework of a Office Addins project from .NET Framework to .NET Core? If it is not, how is the best way to work with Office Addins with ASP.NET Core?



Thanks!










share|improve this question



























    1















    The default Excel Web Add-in template created by Visual Studio in a new Office Addins solution has two projects:





    • AppName: A manifest project, with only a XML file.


    • AppNameWeb: A .NET Framework 4.6.1 project with several template files.


    I want to delete the .NET Framework project and use a brand new .NET Core project instead, that I just created in the same solution.



    I went to the project reference dialog of AppName. I removed AppNameWeb included my .NET Core project, then I confirmed the changes.



    Now I get this warning:



    Project 'AppName.csproj' targets 'netcoreapp2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.6.1'.



    I opened AppName project properties, but I don't have the option to change its target framework to .NET Core 2.1, it only lists .NET Framework 4.x.x



    Question is: is it possible to change the target framework of a Office Addins project from .NET Framework to .NET Core? If it is not, how is the best way to work with Office Addins with ASP.NET Core?



    Thanks!










    share|improve this question

























      1












      1








      1


      1






      The default Excel Web Add-in template created by Visual Studio in a new Office Addins solution has two projects:





      • AppName: A manifest project, with only a XML file.


      • AppNameWeb: A .NET Framework 4.6.1 project with several template files.


      I want to delete the .NET Framework project and use a brand new .NET Core project instead, that I just created in the same solution.



      I went to the project reference dialog of AppName. I removed AppNameWeb included my .NET Core project, then I confirmed the changes.



      Now I get this warning:



      Project 'AppName.csproj' targets 'netcoreapp2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.6.1'.



      I opened AppName project properties, but I don't have the option to change its target framework to .NET Core 2.1, it only lists .NET Framework 4.x.x



      Question is: is it possible to change the target framework of a Office Addins project from .NET Framework to .NET Core? If it is not, how is the best way to work with Office Addins with ASP.NET Core?



      Thanks!










      share|improve this question














      The default Excel Web Add-in template created by Visual Studio in a new Office Addins solution has two projects:





      • AppName: A manifest project, with only a XML file.


      • AppNameWeb: A .NET Framework 4.6.1 project with several template files.


      I want to delete the .NET Framework project and use a brand new .NET Core project instead, that I just created in the same solution.



      I went to the project reference dialog of AppName. I removed AppNameWeb included my .NET Core project, then I confirmed the changes.



      Now I get this warning:



      Project 'AppName.csproj' targets 'netcoreapp2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.6.1'.



      I opened AppName project properties, but I don't have the option to change its target framework to .NET Core 2.1, it only lists .NET Framework 4.x.x



      Question is: is it possible to change the target framework of a Office Addins project from .NET Framework to .NET Core? If it is not, how is the best way to work with Office Addins with ASP.NET Core?



      Thanks!







      asp.net-core office-js






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 31 '18 at 22:29









      Felipe Costa GualbertoFelipe Costa Gualberto

      432311




      432311
























          1 Answer
          1






          active

          oldest

          votes


















          2














          Follow steps below for a workaround to achieve the same result:




          1. Remove AppNameWeb and AppNameWeb Core projects reference from AppName

          2. Specify Web Project of AppName project properties as (None)

          3. Open AppName.xml, replace ~remoteAppUrl with AppNameWeb Core home address


          4. Set SourceLocation with home address like



            <DefaultSettings>
            <SourceLocation DefaultValue="https://localhost:44382" />
            </DefaultSettings>


          5. Right-Click solution -> Properties -> Configure Multiple startup projects with AppName and AppNameWeb Core


          6. Startup multiple project to check the running.







          share|improve this answer
























          • Yes! It worked! Is it possible to "tell" the manifest that ~remoteAppUrl is in fact the other localhost address instead replacing each occurance of its file?

            – Felipe Costa Gualberto
            Jan 1 at 17:41











          • @FelipeCostaGualberto I am afraid it is impossible, ~remoteAppUrl is reset by the Web Project, for choosing web project, you will need to reference the AppNameWeb Core project will cause this reference error.

            – Tao Zhou
            Jan 2 at 1:51











          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%2f53991876%2fchange-target-framework-of-a-office-addins-project-from-net-framework-to-net-c%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









          2














          Follow steps below for a workaround to achieve the same result:




          1. Remove AppNameWeb and AppNameWeb Core projects reference from AppName

          2. Specify Web Project of AppName project properties as (None)

          3. Open AppName.xml, replace ~remoteAppUrl with AppNameWeb Core home address


          4. Set SourceLocation with home address like



            <DefaultSettings>
            <SourceLocation DefaultValue="https://localhost:44382" />
            </DefaultSettings>


          5. Right-Click solution -> Properties -> Configure Multiple startup projects with AppName and AppNameWeb Core


          6. Startup multiple project to check the running.







          share|improve this answer
























          • Yes! It worked! Is it possible to "tell" the manifest that ~remoteAppUrl is in fact the other localhost address instead replacing each occurance of its file?

            – Felipe Costa Gualberto
            Jan 1 at 17:41











          • @FelipeCostaGualberto I am afraid it is impossible, ~remoteAppUrl is reset by the Web Project, for choosing web project, you will need to reference the AppNameWeb Core project will cause this reference error.

            – Tao Zhou
            Jan 2 at 1:51
















          2














          Follow steps below for a workaround to achieve the same result:




          1. Remove AppNameWeb and AppNameWeb Core projects reference from AppName

          2. Specify Web Project of AppName project properties as (None)

          3. Open AppName.xml, replace ~remoteAppUrl with AppNameWeb Core home address


          4. Set SourceLocation with home address like



            <DefaultSettings>
            <SourceLocation DefaultValue="https://localhost:44382" />
            </DefaultSettings>


          5. Right-Click solution -> Properties -> Configure Multiple startup projects with AppName and AppNameWeb Core


          6. Startup multiple project to check the running.







          share|improve this answer
























          • Yes! It worked! Is it possible to "tell" the manifest that ~remoteAppUrl is in fact the other localhost address instead replacing each occurance of its file?

            – Felipe Costa Gualberto
            Jan 1 at 17:41











          • @FelipeCostaGualberto I am afraid it is impossible, ~remoteAppUrl is reset by the Web Project, for choosing web project, you will need to reference the AppNameWeb Core project will cause this reference error.

            – Tao Zhou
            Jan 2 at 1:51














          2












          2








          2







          Follow steps below for a workaround to achieve the same result:




          1. Remove AppNameWeb and AppNameWeb Core projects reference from AppName

          2. Specify Web Project of AppName project properties as (None)

          3. Open AppName.xml, replace ~remoteAppUrl with AppNameWeb Core home address


          4. Set SourceLocation with home address like



            <DefaultSettings>
            <SourceLocation DefaultValue="https://localhost:44382" />
            </DefaultSettings>


          5. Right-Click solution -> Properties -> Configure Multiple startup projects with AppName and AppNameWeb Core


          6. Startup multiple project to check the running.







          share|improve this answer













          Follow steps below for a workaround to achieve the same result:




          1. Remove AppNameWeb and AppNameWeb Core projects reference from AppName

          2. Specify Web Project of AppName project properties as (None)

          3. Open AppName.xml, replace ~remoteAppUrl with AppNameWeb Core home address


          4. Set SourceLocation with home address like



            <DefaultSettings>
            <SourceLocation DefaultValue="https://localhost:44382" />
            </DefaultSettings>


          5. Right-Click solution -> Properties -> Configure Multiple startup projects with AppName and AppNameWeb Core


          6. Startup multiple project to check the running.








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 1 at 6:20









          Tao ZhouTao Zhou

          6,83831332




          6,83831332













          • Yes! It worked! Is it possible to "tell" the manifest that ~remoteAppUrl is in fact the other localhost address instead replacing each occurance of its file?

            – Felipe Costa Gualberto
            Jan 1 at 17:41











          • @FelipeCostaGualberto I am afraid it is impossible, ~remoteAppUrl is reset by the Web Project, for choosing web project, you will need to reference the AppNameWeb Core project will cause this reference error.

            – Tao Zhou
            Jan 2 at 1:51



















          • Yes! It worked! Is it possible to "tell" the manifest that ~remoteAppUrl is in fact the other localhost address instead replacing each occurance of its file?

            – Felipe Costa Gualberto
            Jan 1 at 17:41











          • @FelipeCostaGualberto I am afraid it is impossible, ~remoteAppUrl is reset by the Web Project, for choosing web project, you will need to reference the AppNameWeb Core project will cause this reference error.

            – Tao Zhou
            Jan 2 at 1:51

















          Yes! It worked! Is it possible to "tell" the manifest that ~remoteAppUrl is in fact the other localhost address instead replacing each occurance of its file?

          – Felipe Costa Gualberto
          Jan 1 at 17:41





          Yes! It worked! Is it possible to "tell" the manifest that ~remoteAppUrl is in fact the other localhost address instead replacing each occurance of its file?

          – Felipe Costa Gualberto
          Jan 1 at 17:41













          @FelipeCostaGualberto I am afraid it is impossible, ~remoteAppUrl is reset by the Web Project, for choosing web project, you will need to reference the AppNameWeb Core project will cause this reference error.

          – Tao Zhou
          Jan 2 at 1:51





          @FelipeCostaGualberto I am afraid it is impossible, ~remoteAppUrl is reset by the Web Project, for choosing web project, you will need to reference the AppNameWeb Core project will cause this reference error.

          – Tao Zhou
          Jan 2 at 1:51




















          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%2f53991876%2fchange-target-framework-of-a-office-addins-project-from-net-framework-to-net-c%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

          Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

          Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

          A Topological Invariant for $pi_3(U(n))$