Problem with ValueTuple in Azure Function (v1)












2















I am currently experiencing a problem in one of my Azure Functions. I want to use a library that makes use of ValueTuple. The lib is built against .net Core 2.0. This leads to the following error message in my function:



Reference to type 'ValueTuple<,>' claims it is defined in 'System.Runtime', but it could not be found


I already tried to add the corresponding Nuget Package to my function:



{
"frameworks": {
"net46":{
"dependencies": {
"DocX": "1.2.1",
"MediaTypeMap": "2.1.0",
"System.ValueTuple": "4.5.0"
}
}
}
}


and referencing the assembly with:



#r "System.ValueTuple"


Any ideas how I could solve this?



Thanks a lot!










share|improve this question


















  • 1





    The library should be built against NET Standard 2.0 in order to be used, I think.

    – Nick
    Nov 18 '18 at 16:08
















2















I am currently experiencing a problem in one of my Azure Functions. I want to use a library that makes use of ValueTuple. The lib is built against .net Core 2.0. This leads to the following error message in my function:



Reference to type 'ValueTuple<,>' claims it is defined in 'System.Runtime', but it could not be found


I already tried to add the corresponding Nuget Package to my function:



{
"frameworks": {
"net46":{
"dependencies": {
"DocX": "1.2.1",
"MediaTypeMap": "2.1.0",
"System.ValueTuple": "4.5.0"
}
}
}
}


and referencing the assembly with:



#r "System.ValueTuple"


Any ideas how I could solve this?



Thanks a lot!










share|improve this question


















  • 1





    The library should be built against NET Standard 2.0 in order to be used, I think.

    – Nick
    Nov 18 '18 at 16:08














2












2








2








I am currently experiencing a problem in one of my Azure Functions. I want to use a library that makes use of ValueTuple. The lib is built against .net Core 2.0. This leads to the following error message in my function:



Reference to type 'ValueTuple<,>' claims it is defined in 'System.Runtime', but it could not be found


I already tried to add the corresponding Nuget Package to my function:



{
"frameworks": {
"net46":{
"dependencies": {
"DocX": "1.2.1",
"MediaTypeMap": "2.1.0",
"System.ValueTuple": "4.5.0"
}
}
}
}


and referencing the assembly with:



#r "System.ValueTuple"


Any ideas how I could solve this?



Thanks a lot!










share|improve this question














I am currently experiencing a problem in one of my Azure Functions. I want to use a library that makes use of ValueTuple. The lib is built against .net Core 2.0. This leads to the following error message in my function:



Reference to type 'ValueTuple<,>' claims it is defined in 'System.Runtime', but it could not be found


I already tried to add the corresponding Nuget Package to my function:



{
"frameworks": {
"net46":{
"dependencies": {
"DocX": "1.2.1",
"MediaTypeMap": "2.1.0",
"System.ValueTuple": "4.5.0"
}
}
}
}


and referencing the assembly with:



#r "System.ValueTuple"


Any ideas how I could solve this?



Thanks a lot!







c# .net function azure valuetuple






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 18 '18 at 15:54









Jörg A.Jörg A.

111




111








  • 1





    The library should be built against NET Standard 2.0 in order to be used, I think.

    – Nick
    Nov 18 '18 at 16:08














  • 1





    The library should be built against NET Standard 2.0 in order to be used, I think.

    – Nick
    Nov 18 '18 at 16:08








1




1





The library should be built against NET Standard 2.0 in order to be used, I think.

– Nick
Nov 18 '18 at 16:08





The library should be built against NET Standard 2.0 in order to be used, I think.

– Nick
Nov 18 '18 at 16:08












1 Answer
1






active

oldest

votes


















1














This is not going to work, according to the docs the V1 version cannot use .Net Core 2 libraries. Only v2 can.



So, try modifying the library to target .Net standard or migrate to Azure Functions V2:




Migrating from 1.x to 2.x

You may choose to migrate an existing app written to use the version 1.x runtime to instead use version 2.x. Most of the changes you need to make are related to changes in the language runtime, such as C# API changes between .NET Framework 4.7 and .NET Core 2. You'll also need to make sure your code and libraries are compatible with the language runtime you choose. Finally, be sure to note any changes in trigger, bindings, and features highlighted below. For the best migration results, you should create a new function app for version 2.x and port your existing version 1.x function code to the new app.







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%2f53362759%2fproblem-with-valuetuple-in-azure-function-v1%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









    1














    This is not going to work, according to the docs the V1 version cannot use .Net Core 2 libraries. Only v2 can.



    So, try modifying the library to target .Net standard or migrate to Azure Functions V2:




    Migrating from 1.x to 2.x

    You may choose to migrate an existing app written to use the version 1.x runtime to instead use version 2.x. Most of the changes you need to make are related to changes in the language runtime, such as C# API changes between .NET Framework 4.7 and .NET Core 2. You'll also need to make sure your code and libraries are compatible with the language runtime you choose. Finally, be sure to note any changes in trigger, bindings, and features highlighted below. For the best migration results, you should create a new function app for version 2.x and port your existing version 1.x function code to the new app.







    share|improve this answer




























      1














      This is not going to work, according to the docs the V1 version cannot use .Net Core 2 libraries. Only v2 can.



      So, try modifying the library to target .Net standard or migrate to Azure Functions V2:




      Migrating from 1.x to 2.x

      You may choose to migrate an existing app written to use the version 1.x runtime to instead use version 2.x. Most of the changes you need to make are related to changes in the language runtime, such as C# API changes between .NET Framework 4.7 and .NET Core 2. You'll also need to make sure your code and libraries are compatible with the language runtime you choose. Finally, be sure to note any changes in trigger, bindings, and features highlighted below. For the best migration results, you should create a new function app for version 2.x and port your existing version 1.x function code to the new app.







      share|improve this answer


























        1












        1








        1







        This is not going to work, according to the docs the V1 version cannot use .Net Core 2 libraries. Only v2 can.



        So, try modifying the library to target .Net standard or migrate to Azure Functions V2:




        Migrating from 1.x to 2.x

        You may choose to migrate an existing app written to use the version 1.x runtime to instead use version 2.x. Most of the changes you need to make are related to changes in the language runtime, such as C# API changes between .NET Framework 4.7 and .NET Core 2. You'll also need to make sure your code and libraries are compatible with the language runtime you choose. Finally, be sure to note any changes in trigger, bindings, and features highlighted below. For the best migration results, you should create a new function app for version 2.x and port your existing version 1.x function code to the new app.







        share|improve this answer













        This is not going to work, according to the docs the V1 version cannot use .Net Core 2 libraries. Only v2 can.



        So, try modifying the library to target .Net standard or migrate to Azure Functions V2:




        Migrating from 1.x to 2.x

        You may choose to migrate an existing app written to use the version 1.x runtime to instead use version 2.x. Most of the changes you need to make are related to changes in the language runtime, such as C# API changes between .NET Framework 4.7 and .NET Core 2. You'll also need to make sure your code and libraries are compatible with the language runtime you choose. Finally, be sure to note any changes in trigger, bindings, and features highlighted below. For the best migration results, you should create a new function app for version 2.x and port your existing version 1.x function code to the new app.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 18 '18 at 20:03









        Peter BonsPeter Bons

        9,93932243




        9,93932243
































            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%2f53362759%2fproblem-with-valuetuple-in-azure-function-v1%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







            這個網誌中的熱門文章

            Xamarin.form Move up view when keyboard appear

            Post-Redirect-Get with Spring WebFlux and Thymeleaf

            Anylogic : not able to use stopDelay()