-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debian vs. Windows data incompatibility #7336
Comments
Welp. So new question: EDIT: Also, Windows produced a EDIT2: Also, I seem to have to run |
The preview 3-5 versions are msbuild based and use csproj instead of project.json. And they default to .net core 1.0.. 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
|
Hm... You are correct. |
@mcmonkey4eva You can get prerelease versions of omnisharp-vscode here on GitHub: https://github.com/OmniSharp/omnisharp-vscode/releases |
1.6.0-beta3 still says |
@mcmonkey4eva can you share your project? |
I suspect that you have a mismatch of versions across your system. You have to match CLI + Omnisharp to support either project.json or csproj. I mean, the version of the CLI that you are using and the version of omnisharp that you are using need to support project.json, if that's what you are trying to use. And likewise for csproj. Though, to be honest, I don't know what is the state of Omnisharp with regards to csproj support. |
One whole csproj file, fresh off the VSCode, http://pastebin.com/VBxaXzwA |
/cc @DustinCampbell for the VS Code question |
@mcmonkey4eva since this is a web app, you will want to use the web-sdk: |
@livarcocc isn't quite right. You don't need to match up OmniSharp with the version of the CLI. However, the .csproj projects produced by the CLI are definitely a bit ahead of OmniSharp. The Sdk attribute isn't supported by OmniSharp yet, but referencing the Sdk as a PackageReference is supported. I've just merged this fairly significant PR which will allow the Sdk attribute to work in OmniSharp: OmniSharp/omnisharp-roslyn#705. Watch the C# extension repo for a new beta (hopefully tomorrow). That beta should support projects produced by CLI preview2, preview3, preview4, and preview5. |
@DustinCampbell my bad. Is there a good way to keep track of what is compatible? Or maybe publish it? And just for my own understanding, VSCode will work with csproj even if the CLI is say, preview2? |
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. |
@DustinCampbell I didn't mean VS Code would stop work. I was talking about VS Code working with CSProj and/or project.json depending on what CLI you have in place. |
Right I understood. The C# extension for VS Code does not actually depend much on the CLI. OmniSharp carries its own copy of MSBuild and SDKs for understanding CSProj. The only dependency that the extension has on the CLI is shelling out to "dotnet build" and "dotnet restore". |
@DustinCampbell so there currently is no way to use daily SDK builds with vscode? like setting/overriding the sdk path for msbuild? (or manually replacing omnisharp's version in the download location) |
@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. |
Hey look, a beta4!
|
Thanks @mcmonkey4eva! I ran into this error as well, but only when running some tests on AppVeyor on Windows. However, those tests passed locally. I had a couple of leads to investigate:
I was going to look at both of these angles this morning. Would any of these seem relevant to your scenario? Could you post your whole OmniSharp log when this fails? |
Well, I couldn't reproduce the issue with 1.6-beta4 on Win8.1-x64 (same as AppVeyor) with no Visual Studio installed. I installed the latest VS Code with 1.6-beta4 of the C# extension, and the most recent .NET CLI preview5. I tried opening projects produced with 'dotnet new' and 'dotnet new -t web' and did not encounter the UriFormatException. |
Note: I have a fix for this. I should have another beta available within the next hour or two. |
@mcmonkey4eva: I've released v1.6-beta5, which should fix this issue for it. Feel free to file an issue over at https://github.com/OmniSharp/omnisharp-vscode/issues if it gives you any trouble. |
Assuming the remainder of this is an Omnisharp-VSCode issue, I'm move the issue to dotnet/vscode-csharp#1050 for the moment. |
Just wanted to let anyone else tracking the VS Code problem on this thread that we were able to get to the bottom of it. The latest beta of the C# extension should work properly. |
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: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.
The text was updated successfully, but these errors were encountered: