question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Project produced with 'dotnet new' doesn't build

See original GitHub issue

This starts with 2882 and is true today in 2913. It worked in 2877.

Steps to reproduce

  1. 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
  2. dotnet new
  3. dotnet restore
  4. 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
ericstjcommented, Jun 1, 2016

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.

0reactions
billwertcommented, Jun 8, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet build command - .NET CLI
The dotnet build command builds a project and all of its dependencies.
Read more >
dotnet new console fails to create when being built within a ...
All I want to do right now is create a new hello world console project and run it with a mapped directory. This...
Read more >
"dotnet pack" does not build · Issue #12160 · dotnet/sdk
According to the documentation (https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-pack) the command dotnet pack should first build ...
Read more >
How to Create Your .NET Project Template
This article will focus on project templates, that is, templates that allow you to create a new project with specific features. While in...
Read more >
Part 2 - Caveats of project.json to MSBuild conversion
Installing a new version of dotnet.exe was just a matter up updating what was inside C:\Program Files\dotnet. The Caveat 1 :warning: Visual ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found