Projects targeting netcoreapp1.1 without the shared framework install produce unintelligible errors on build.
To reproduce the problem with the latest updates try:
- Create a new .Net Core project (doesn't matter if Console App or ASP.Net project)
- Update all original nuget packages that are installed from the template from versions 1.0.x to 1.1.0
- Hit F5 to Run it
The console app in both cases open and close very quickly without any visible error. The only output is on VS2017 Output pad:
The program '[13892] dotnet.exe' has exited with code -2147450749 (0x80008083).
The program '[13892] dotnet.exe: Program Trace' has exited with code 0 (0x0).
If you don't update the nugets to 1.1.0, it works just fine.
If you try to build with dotnet build this is the returned error:
CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [ THE PATH TO .csproj FILE HERE ]
The templates indeed create a Program.cs which in fact has the static Main() so it must be something else...
Guys any workaround for it? We need update to 1.1.0 otherwise other stuff like dotnet ef doesnt work since it is a prereq.
Thanks
I believe this happens if the 1.1 shared framework is not installed on the machine. Is that the case here? Tagging @piotrpMSFT.
yeah, that is the point... Just got it to work few moments ago...
We have to not just install the SDK... We have to install the runtime as well... I though it came with the SDK...
It is now able to build and run the project properly on VS2017. However, dotnet build from CLI still broken complaining about missing static 'Main' method for an entry point...
This is my dotnet --info:
dotnet --info
.NET Command Line Tools (1.0.0-preview5-004232)
Product Information:
Version: 1.0.0-preview5-004232
Commit SHA-1 hash: 355b6233cb
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14986
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.0-preview5-004232
And yes, now the 1.1.0 is installed:

Also, randomly VS2017 throw an error message saying that it can't find the netcoreapp1.1 framework and the only way to get back to work is to close all VS2017 instances and start again...
In all cases, as a feedback, a more clear error about what is going on would be more helpful... I'm almost 1 day banging my head against it just because we don't have a clear message.
Thanks
Yes we definitely need a better error message. Apologies for your wasted time. We'll use this issue to track a better error message. @piotrpMSFT any idea why dotnet build is still broken?
Can you fix this page too https://www.microsoft.com/net/download/core/#/current/runtime the layout is nonsense.
I have to push buttons umpteen times when a simple list would suffice
@srivatsn / @piotrpMSFT / @dsplaisted any updates at the dotnet build issue? We still have no success here, which makes our build servers to not work...
Are you getting the error about missing entrypoint for all projects or some specific projects? Is it a test project? Test projects generate a file with an entrypoint if the Microsoft.NET.Test.Sdk is included - maybe that's missing (that wouldn't explain why you are seeing different behavior in VS vs CLI though).
@srivatsn it is just a Console app :(
That is odd - @livarcocc @piotrpMSFT is there a way to get dotnet build to spit out a verbose log where we can see the inputs being passed to the compiler?
After upgrading my project files to the new format as introduced with VS 2017 RC2 I'm unable to restore, build and run my projects on OSX Sierra.
I'v just installed the latest bits for the runtime as well as sdk. Also the solution is no longer compatible with VS for Mac.
$ dotnet restore Api.VS17.sln
Api.csproj : error MSB4057: The target "_GenerateRestoreGraphProjectEntry" does not exist in the project.
Api.Client.csproj : error MSB4057: The target "_GenerateRestoreGraphProjectEntry" does not exist in the project.
Api.Common.csproj : error MSB4057: The target "_GenerateRestoreGraphProjectEntry" does not exist in the project.
Api.Test.csproj : error MSB4057: The target "_GenerateRestoreGraphProjectEntry" does not exist in the project.
$ dotnet --info
.NET Command Line Tools (1.0.0-preview3-004056)
Product Information:
Version: 1.0.0-preview3-004056
Commit SHA-1 hash: ccc4968bc3
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
The api is targeting netcoreapp1.1 and the others are netstandard1.6 (this I will need to look closer to as i'm not 100% sure how the api surface version maps to .net framework and its different version and .net core)
@joacar I think this is a diff issue. I guess your dotnet tooling is outdated. In your logs it points to preview3, mine is preview5. Try update it on OSX.
With #450, the original problem here is mostly fixed. The right version of Microsoft.NETCore.App should automatically be referenced depending on your target framework, and it shouldn't show updates to it in the NuGet UI.
If you change the target framework to netcoreapp1.1, then you will get the same F5 experience that was originally reported. The problem there is that there is a nice error message printed to the console telling you what's wrong, but it closes immediately. Starting without debugging (CTRL + F5) will leave the window up so you can see the error. We have #458 tracking a better experience here.
For the other problems mentioned, if you are still encountering them please file them as separate issues, and try to provide details on what you are seeing and how to reproduce the problem.
Thanks!