Project produced with 'dotnet new' doesn't build
See original GitHub issueThis starts with 2882 and is true today in 2913. It worked in 2877.
Steps to reproduce
- unzip/add to path: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/1.0.0-preview2-002882/dotnet-dev-win-x64.1.0.0-preview2-002882.zip
- dotnet new
- dotnet restore
- dotnet build
Expected behavior
Build succeeds.
Actual behavior
Build fails
Project 2 (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing Compiling 2 for .NETCoreApp,Version=v1.0 D:\work\findit\tests\2\project.json(7,31): error NU1002: The dependency Microsoft.CodeAnalysis.Common 2.0.0-beta1 does not support framework .NETCoreApp,Version=v1.0. D:\work\findit\tests\2\project.json(7,31): error NU1002: The dependency Microsoft.CodeAnalysis.CSharp 2.0.0-beta1 does not support framework .NETCoreApp,Version=v1.0. D:\work\findit\tests\2\project.json(7,31): error NU1002: The dependency Microsoft.CodeAnalysis.VisualBasic 2.0.0-beta1 does not support framework .NETCoreApp,Version=v1.0.
Compilation failed. 0 Warning(s) 3 Error(s)
Time elapsed 00:00:00.0224491
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-preview2-002882)
Product Information: Version: 1.0.0-preview2-002882 Commit SHA-1 hash: f46be283f1
Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:17 (17 by maintainers)
Top GitHub Comments
Agreed @eerhardt , not your fault. Just needs to get fixed. If we want to make it automatic we could do something in the core-setup repo’s publishing /cc @dagood.
Yeah, we can close this. It happens that today’s build can new, restore, and build successfully on a clean machine, so that’s great!
FWIW: As you explain it, it’s of course obvious that using --packages like that can’t work, since project.lock.json doesn’t carry path information. However, the fact that it’s the only place right now where it exists implies to the user that it should work the way I thought it did; otherwise what good is the argument?
This deserves promotion to a top level issue. I’ll open one.