How do I use System.Numerics in Mono C# in MonoDevelop?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















When I have this line at the top of my file:



using System.Numerics;


I get the following error:



Error CS0234: The type or namespace name 'Numerics' does not exist in the namespace 'System' (are you missing an assembly reference?) (CS0234) (CSharpTests)



Other using directives at the top of my file, such as using System;, work just fine.



I'm using Mono 5.12.0.301 and MonoDevelop 7.5 (build 1255) on Ubuntu 18.04 64-bit.



One of my first thoughts was that the framework version was set to something old enough to not have System.Numerics. In Options -> Build -> General, my framework version is the default of 4.5, and changing it to the latest version of 4.7.1 does not make the code work:



Framework Version Build General



This answer found that the problem was with an outdated framework version, but clearly I have a new enough framework version, right?



EDIT: Ok, with SushiHangover's answer I'm able to use System.Numerics, but I'm actually trying to use System.Numerics.Vectors, which I have included in References:



System Numerics Vectors



But when I use using System.Numerics.Vectors; I get this error:



Error CS0234: The type or namespace name 'Vectors' does not exist in the namespace 'System.Numerics' (are you missing an assembly reference?) (CS0234) (CSharpTests)










share|improve this question































    1















    When I have this line at the top of my file:



    using System.Numerics;


    I get the following error:



    Error CS0234: The type or namespace name 'Numerics' does not exist in the namespace 'System' (are you missing an assembly reference?) (CS0234) (CSharpTests)



    Other using directives at the top of my file, such as using System;, work just fine.



    I'm using Mono 5.12.0.301 and MonoDevelop 7.5 (build 1255) on Ubuntu 18.04 64-bit.



    One of my first thoughts was that the framework version was set to something old enough to not have System.Numerics. In Options -> Build -> General, my framework version is the default of 4.5, and changing it to the latest version of 4.7.1 does not make the code work:



    Framework Version Build General



    This answer found that the problem was with an outdated framework version, but clearly I have a new enough framework version, right?



    EDIT: Ok, with SushiHangover's answer I'm able to use System.Numerics, but I'm actually trying to use System.Numerics.Vectors, which I have included in References:



    System Numerics Vectors



    But when I use using System.Numerics.Vectors; I get this error:



    Error CS0234: The type or namespace name 'Vectors' does not exist in the namespace 'System.Numerics' (are you missing an assembly reference?) (CS0234) (CSharpTests)










    share|improve this question



























      1












      1








      1








      When I have this line at the top of my file:



      using System.Numerics;


      I get the following error:



      Error CS0234: The type or namespace name 'Numerics' does not exist in the namespace 'System' (are you missing an assembly reference?) (CS0234) (CSharpTests)



      Other using directives at the top of my file, such as using System;, work just fine.



      I'm using Mono 5.12.0.301 and MonoDevelop 7.5 (build 1255) on Ubuntu 18.04 64-bit.



      One of my first thoughts was that the framework version was set to something old enough to not have System.Numerics. In Options -> Build -> General, my framework version is the default of 4.5, and changing it to the latest version of 4.7.1 does not make the code work:



      Framework Version Build General



      This answer found that the problem was with an outdated framework version, but clearly I have a new enough framework version, right?



      EDIT: Ok, with SushiHangover's answer I'm able to use System.Numerics, but I'm actually trying to use System.Numerics.Vectors, which I have included in References:



      System Numerics Vectors



      But when I use using System.Numerics.Vectors; I get this error:



      Error CS0234: The type or namespace name 'Vectors' does not exist in the namespace 'System.Numerics' (are you missing an assembly reference?) (CS0234) (CSharpTests)










      share|improve this question
















      When I have this line at the top of my file:



      using System.Numerics;


      I get the following error:



      Error CS0234: The type or namespace name 'Numerics' does not exist in the namespace 'System' (are you missing an assembly reference?) (CS0234) (CSharpTests)



      Other using directives at the top of my file, such as using System;, work just fine.



      I'm using Mono 5.12.0.301 and MonoDevelop 7.5 (build 1255) on Ubuntu 18.04 64-bit.



      One of my first thoughts was that the framework version was set to something old enough to not have System.Numerics. In Options -> Build -> General, my framework version is the default of 4.5, and changing it to the latest version of 4.7.1 does not make the code work:



      Framework Version Build General



      This answer found that the problem was with an outdated framework version, but clearly I have a new enough framework version, right?



      EDIT: Ok, with SushiHangover's answer I'm able to use System.Numerics, but I'm actually trying to use System.Numerics.Vectors, which I have included in References:



      System Numerics Vectors



      But when I use using System.Numerics.Vectors; I get this error:



      Error CS0234: The type or namespace name 'Vectors' does not exist in the namespace 'System.Numerics' (are you missing an assembly reference?) (CS0234) (CSharpTests)







      c# namespaces mono monodevelop






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 3:40







      Aaron Franke

















      asked Nov 22 '18 at 2:59









      Aaron FrankeAaron Franke

      53811020




      53811020
























          1 Answer
          1






          active

          oldest

          votes


















          2














          You need to add a manual reference to that assembly (and any others in the framework that you need to use, "System" is included by default)



          Double click on the Projects "References" in the solution explorer:



          enter image description here






          share|improve this answer
























          • But then using System.Numerics.Vectors; doesn't work, see my edit.

            – Aaron Franke
            Nov 22 '18 at 3:41






          • 1





            @AaronFranke The "assembly" is System.Numerics.Vectors.dll but its "namespace" for Vectors, Vector2, etc.. is System.Numerics, not System.Numerics.Vectors Different CIL assemblies, same namespace.

            – SushiHangover
            Nov 22 '18 at 4:03














          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%2f53423256%2fhow-do-i-use-system-numerics-in-mono-c-sharp-in-monodevelop%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














          You need to add a manual reference to that assembly (and any others in the framework that you need to use, "System" is included by default)



          Double click on the Projects "References" in the solution explorer:



          enter image description here






          share|improve this answer
























          • But then using System.Numerics.Vectors; doesn't work, see my edit.

            – Aaron Franke
            Nov 22 '18 at 3:41






          • 1





            @AaronFranke The "assembly" is System.Numerics.Vectors.dll but its "namespace" for Vectors, Vector2, etc.. is System.Numerics, not System.Numerics.Vectors Different CIL assemblies, same namespace.

            – SushiHangover
            Nov 22 '18 at 4:03


















          2














          You need to add a manual reference to that assembly (and any others in the framework that you need to use, "System" is included by default)



          Double click on the Projects "References" in the solution explorer:



          enter image description here






          share|improve this answer
























          • But then using System.Numerics.Vectors; doesn't work, see my edit.

            – Aaron Franke
            Nov 22 '18 at 3:41






          • 1





            @AaronFranke The "assembly" is System.Numerics.Vectors.dll but its "namespace" for Vectors, Vector2, etc.. is System.Numerics, not System.Numerics.Vectors Different CIL assemblies, same namespace.

            – SushiHangover
            Nov 22 '18 at 4:03
















          2












          2








          2







          You need to add a manual reference to that assembly (and any others in the framework that you need to use, "System" is included by default)



          Double click on the Projects "References" in the solution explorer:



          enter image description here






          share|improve this answer













          You need to add a manual reference to that assembly (and any others in the framework that you need to use, "System" is included by default)



          Double click on the Projects "References" in the solution explorer:



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 '18 at 3:16









          SushiHangoverSushiHangover

          54.2k54396




          54.2k54396













          • But then using System.Numerics.Vectors; doesn't work, see my edit.

            – Aaron Franke
            Nov 22 '18 at 3:41






          • 1





            @AaronFranke The "assembly" is System.Numerics.Vectors.dll but its "namespace" for Vectors, Vector2, etc.. is System.Numerics, not System.Numerics.Vectors Different CIL assemblies, same namespace.

            – SushiHangover
            Nov 22 '18 at 4:03





















          • But then using System.Numerics.Vectors; doesn't work, see my edit.

            – Aaron Franke
            Nov 22 '18 at 3:41






          • 1





            @AaronFranke The "assembly" is System.Numerics.Vectors.dll but its "namespace" for Vectors, Vector2, etc.. is System.Numerics, not System.Numerics.Vectors Different CIL assemblies, same namespace.

            – SushiHangover
            Nov 22 '18 at 4:03



















          But then using System.Numerics.Vectors; doesn't work, see my edit.

          – Aaron Franke
          Nov 22 '18 at 3:41





          But then using System.Numerics.Vectors; doesn't work, see my edit.

          – Aaron Franke
          Nov 22 '18 at 3:41




          1




          1





          @AaronFranke The "assembly" is System.Numerics.Vectors.dll but its "namespace" for Vectors, Vector2, etc.. is System.Numerics, not System.Numerics.Vectors Different CIL assemblies, same namespace.

          – SushiHangover
          Nov 22 '18 at 4:03







          @AaronFranke The "assembly" is System.Numerics.Vectors.dll but its "namespace" for Vectors, Vector2, etc.. is System.Numerics, not System.Numerics.Vectors Different CIL assemblies, same namespace.

          – SushiHangover
          Nov 22 '18 at 4:03






















          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%2f53423256%2fhow-do-i-use-system-numerics-in-mono-c-sharp-in-monodevelop%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

          Guess what letter conforming each word

          Port of Spain

          Run scheduled task as local user group (not BUILTIN)