Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open 'Program.cs': File not found (\Program.cs). #1262

Closed
billwert opened this issue Feb 26, 2017 · 3 comments
Closed

Unable to open 'Program.cs': File not found (\Program.cs). #1262

billwert opened this issue Feb 26, 2017 · 3 comments

Comments

@billwert
Copy link
Member

Environment data

dotnet --info output:
.NET Command Line Tools (2.0.0-alpha-004853)

Product Information:
Version: 2.0.0-alpha-004853
Commit SHA-1 hash: e7689a3116

Runtime Environment:
OS Name: Windows
OS Version: 10.0.15040
OS Platform: Windows
RID: win10-x64
Base Path: D:\work\dotnets\2.0.0-alpha-004853\sdk\2.0.0-alpha-004853\

VS Code version:
Version 1.9.1
Commit f9d0c687ff2ea7aabd85fb9a43129117c0ecf519
Date 2017-02-09T00:26:45.394Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0
C# Extension version:
1.7.0

Steps to reproduce

mkdir test
dotnet new console
dotnet restore
code .
Introduce a syntax error (remove the " from the WriteLine or something)
configure task runner for .NET core
build

Expected behavior

Build fails, error window can be double clicked to take me to the error

Actual behavior

errors

Note that Program.cs is listed twice. The ones from the first ("Program.cs \") only appear after build.

@DustinCampbell
Copy link
Member

I suspect that Program is listed twice because errors are duplicated between the build and live in the editor. The issues you ran into should be tracked by #1197 and #1198.

@billwert
Copy link
Member Author

Cool. The workaround in #1197 did the trick for this issue.

@CoenraadS
Copy link

I'm just going to post the workaround here too to save other people time since this is the first google result.

In the .csproj add <GenerateFullPaths>true</GenerateFullPaths> inside <PropertyGroup></PropertyGroup>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants