Should 'dotnet migrate' respect the "projects" node in global.json?
See original GitHub issueSteps 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:
- Created 7 years ago
- Comments:12 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We should respect the Projects node in global.json and we should respect the projects in your SLN file as well.
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.