Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

State-Visualizer: 'QsMain' does not exist in the current context #316

Description

@isaac-gs

Describe the bug
Operations in .qs files are not recognized in the project. If I place the quantum code in a project where the sdk is set to Microsoft.Quantum.Sdk/0.10.2001.2831 (in the csproj file) it works fine. All other projects under "samples" build fine, so I think it's related to the use of "Microsoft.NET.Sdk.Web". When it does fail, the following is what I get.

Program.cs(21,32): error CS0103: The name 'QsMain' does not exist in the current context [*\Quantum\samples\runtime\state-visualizer\StateVisualizer.csproj]

This very well could be something I've done wrong, as I've checked multiple versions of this code (back until one in January - Commit d516ef9) and the same thing happens.

To Reproduce
Steps to reproduce the behavior:

  1. Follow setup instructions for Q# development (I did Visual Studio and VS Code). Q# + C# Instructions
  2. Verify setup is correct as in the instructions with a few simple programs from the Quantum Katas or other samples.
  3. Follow instructions here

Expected behavior
Expect for the code to run and for me to be able to access the visualizer at localhost:5000.

System information

  • OS: Windows
  • Browser: Chrome (but didn't get that far)
  • Version: 0.10.2001.2831 (and older versions)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions