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;
}
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:
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:
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
add a comment |
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:
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:
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
add a comment |
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:
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:
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
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:
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:
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
c# namespaces mono monodevelop
edited Nov 22 '18 at 3:40
Aaron Franke
asked Nov 22 '18 at 2:59
Aaron FrankeAaron Franke
53811020
53811020
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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:
But thenusing System.Numerics.Vectors;
doesn't work, see my edit.
– Aaron Franke
Nov 22 '18 at 3:41
1
@AaronFranke The "assembly" isSystem.Numerics.Vectors.dll
but its "namespace" for Vectors, Vector2, etc.. isSystem.Numerics
, notSystem.Numerics.Vectors
Different CIL assemblies, same namespace.
– SushiHangover
Nov 22 '18 at 4:03
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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:
But thenusing System.Numerics.Vectors;
doesn't work, see my edit.
– Aaron Franke
Nov 22 '18 at 3:41
1
@AaronFranke The "assembly" isSystem.Numerics.Vectors.dll
but its "namespace" for Vectors, Vector2, etc.. isSystem.Numerics
, notSystem.Numerics.Vectors
Different CIL assemblies, same namespace.
– SushiHangover
Nov 22 '18 at 4:03
add a comment |
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:
But thenusing System.Numerics.Vectors;
doesn't work, see my edit.
– Aaron Franke
Nov 22 '18 at 3:41
1
@AaronFranke The "assembly" isSystem.Numerics.Vectors.dll
but its "namespace" for Vectors, Vector2, etc.. isSystem.Numerics
, notSystem.Numerics.Vectors
Different CIL assemblies, same namespace.
– SushiHangover
Nov 22 '18 at 4:03
add a comment |
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:
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:
answered Nov 22 '18 at 3:16
SushiHangoverSushiHangover
54.2k54396
54.2k54396
But thenusing System.Numerics.Vectors;
doesn't work, see my edit.
– Aaron Franke
Nov 22 '18 at 3:41
1
@AaronFranke The "assembly" isSystem.Numerics.Vectors.dll
but its "namespace" for Vectors, Vector2, etc.. isSystem.Numerics
, notSystem.Numerics.Vectors
Different CIL assemblies, same namespace.
– SushiHangover
Nov 22 '18 at 4:03
add a comment |
But thenusing System.Numerics.Vectors;
doesn't work, see my edit.
– Aaron Franke
Nov 22 '18 at 3:41
1
@AaronFranke The "assembly" isSystem.Numerics.Vectors.dll
but its "namespace" for Vectors, Vector2, etc.. isSystem.Numerics
, notSystem.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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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