3

I am trying to run the Q# Teleportation sample. I cloned from the official Microsoft GitHub Repository, restored all dependencies, I have the Q# Development SDK installed also. The problem is when i run it the first time it worked now i tried running it again and i get this error. TeleportClassicalMessage' does not exist in the current context. I run it for the last time and it worked even with the Error. I have by the way set up TeleportationSampleas my startup project.Is there any reason for this behaviour?. I am new to Q#

enter image description here

Even with the red Squiggly the Application run after another try. enter image description here

Frank Odoom
  • 1,545
  • 18
  • 19
  • This looks like a normal C# compiler you get when you reference something not in scope. Therefore the tags are misleading. Also, it appears you did some changes to the line in question. It would be helpful if you could share your sources (Program.cs and TeleportClassicalMessage class). – Zdeněk Jelínek Dec 26 '17 at 17:26

2 Answers2

1

I solved this by deleted the bin and obj directories then run again.

my experience: Quantum Program The name 'BellTest' does not exist in the current context

0

From my experience (playing with slightly modified sample BellTest code), Q#-generated classes are properly referenced in C# only after you rebuild project (meaning dotnet build). So if you make some changes in names that are visible on the C# side, try building it and reference issues should go away. This was tested using VSCode on Windows 10 x64, .NET Core v 2.1.103

Ilia
  • 331
  • 5
  • 12