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.

Should 'dotnet migrate' respect the "projects" node in global.json?

See original GitHub issue

Steps to reproduce

git clone https://github.com/DustinCampbell/omnisharp-roslyn
git checkout -b migrate-bug
dotnet migrate

Expected behavior

The global.json file is defined like so:

{
  "projects": [
    "src",
    "tests"
  ]
}

My expectation is that dotnet migrate would only attempt to migrate projects in the “src” and “tests” directories.

Actual behavior

The projects in the “test-assets” directory were also modified (which definitely should not be changed!).

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview5-004478)

Product Information:
 Version:            1.0.0-preview5-004478
 Commit SHA-1 hash:  4d3e2872fe

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15002
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.0-preview5-004478

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
livarcocccommented, Jan 16, 2017

We should respect the Projects node in global.json and we should respect the projects in your SLN file as well.

0reactions
livarcocccommented, Jan 19, 2017

We are already respecting the projects in global.json, when you do dotnet migrate global.json.

I will double check that we do that for dotnet migrate solution.sln.

We have a separate bug tracking running dotnet migrate in folder migrated the appropriate artifact.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS project.json migration shouldn't delete global. ...
This is an issue because dotnet migrate needs the projects section of the global.json file in order to resolve P2P references across ...
Read more >
dotnet migrate command - .NET CLI
The dotnet migrate command migrates a project and all of its dependencies.
Read more >
Migrating project.json .Net Core Projects To csproj
There is no CLI command to “migrate down” a .net core project, but you can rollback manually. Inside each project directory you will...
Read more >
global.json not work or not recognized by my .NET project
The global.json setting "sdk" selects the SDK, not the target platform. That means it chooses (basically) the compiler to use, ...
Read more >
Should I use global.json? - Alessio Franceschelli
I often get asked if it is better to have a global.json in a .NET project (not necessarily .NET Core) to define a...
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