sdk: Debian vs. Windows data incompatibility

Steps to reproduce

$ dotnet restore Project file does not exist. $ dotnet restore project.json /path/to/project.json(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.

Generic not-touched package.json from the command to create a new empty site that runs fine on Windows.

Expected behavior

Project should run restore cleanly without issue, as it does on Windows.

Actual behavior

Errors!

Environment data

dotnet --info output:

Product Information:
 Version:            1.0.0-preview5-004232
 Commit SHA-1 hash:  355b6233cb

Runtime Environment:
 OS Name:     debian
 OS Version:
 OS Platform: Linux
 RID:         debian.8-x64
 Base Path:   /bin/sdk/1.0.0-preview5-004232

Running headless Debian stretch/sid.

Fair note

I had a bit of trouble installing the .NET CLI SDK, and may have mucked something up there? Instructions for installing on Debian (literally one of the most popular server platforms out there) are next to nonexistent.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 24 (16 by maintainers)

Most upvoted comments

That’s right. In general, so long as MSBuild is backward-compatible with updates (like it is for Sdk attributes vs. Sdk package references), VS Code will continue to work. It’s usually just a matter of tasks and targets after all. 😄

We’re leaving the preview2 support in place for the foreseeable future to allow users to transition. It’s not a nice experience when an update to an extension in VS Code breaks on the project you’ve been working on.

The preview 3-5 versions are msbuild based and use csproj instead of project.json. And they default to .net core 1.0.. You probably have a preview2-1- version installed on windows (e.g. through vs2015 + tooling) and a bleeding edge CI build on your Debian machine (vs 2017 rc shipped with a preview3, no “official” preview5 build has been published yet).

You can however install multiple versions of the CLI side-by-side. You can download the latest project-json based SDK from http://dot.net and create a global.json file in your project’s root folder to fix the version used:

{
    "sdk": {
        "version": "1.0.0-preview2-1-003177"
    }
}

@dasMulli: When you say “SDK” – you mean SDKs like Microsoft.NET.Sdk and not the .NET Core SDK, correct? If you meant the former, the only way to stick with daily builds is to manually replace them in the OmniSharp download location.