1
$\begingroup$

I'm a complete beginner in Q#.

Consider the code in the following image:

enter image description here

For some reason, there always is an error message when I try to import anything. It also implies to keywords like Length. The error message is :

No namespace with the name "Microsoft.Quantum.Canon" exists.

However, my code works just fine. The code in the image is taken directly from user guide of Q#.

Any Suggestions?

$\endgroup$
1
$\begingroup$

If your code builds and runs successfully, this error has to come from IntelliSense.

Are you using .NET Core 3.1.300? I think QDK release 0.11.2004.2825 has IntelliSense issues with .NET Core 3.1.300 specifically, and downgrading .NET Core to 3.1.201 fixes this issue - you can try that.

Edit: the relevant issue on GitHub.

| improve this answer | |
$\endgroup$
  • $\begingroup$ I'm the person that asked the same question on Gitter few hours ago when Stack Exchange didn't provide any answer, thank you for the second time lol. $\endgroup$ – IE Irodov Jun 1 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.