SxS with project.json and csproj
Steps to reproduce
Install an msbuild based CLI after installing a project.json based one.
Expected behavior
Building my old stable projects should not be broken.
Actual behavior
Now I have to go through the effort to migrate all my projects or isolate their build environments.
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview4-004079)
Product Information: Version: 1.0.0-preview4-004079 Commit SHA-1 hash: 43dfa6b8ba
Runtime Environment: OS Name: Windows OS Version: 10.0.14393 OS Platform: Windows RID: win10-x64
Isn't that what sdk in global.json is for? How would you expect this to work otherwise?
@Petermarcu https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/ProjectJsonToCSProj.md
I'll work with the host team to see if we can do something more self-contained for the next release.
CC @schellap
@schellap we talked about this briefly offline. Is there a fix here you and @gkhanna79 would like to pursue in the host?
@piotrpMSFT @schellap Can you share the details of the discussion?
@piotrpMSFT I believe we landed on having a meeting on this as none of the fixes seemed ideal. Some options we discussed were:
- Update VS to drop a
global.jsonalways. - Make users set an env variable
DOTNET_SDK_VERSION. --sdk-versioncommand line option to dotnet.- Higher CLI asks user
y/nfor dropping aglobal.jsonin the project dir at first invocation. - Detect project type and re-route invocations from higher CLI to lower CLI.
- Host parsing CLI commands and detecting project layout structure before selecting SDK.
@schellap @piotrpMSFT what is the status of this? Will it land for 1.0.0?