Skip to content
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

Add nag message when project.json projects are opened #1657

Merged
merged 2 commits into from
Jul 21, 2017

Conversation

DustinCampbell
Copy link
Member

No description provided.

utils.requestWorkspaceInformation(server)
.then(workspaceInfo => {
if (workspaceInfo.DotNet && workspaceInfo.DotNet.Projects.length > 0) {
const shortMessage = 'project.json is no longer a supported project format for .NET Core applications.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have MSWord style quotes in this string. Expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... I'm not spotting them

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, somehow got this comment on the wrong line. See ‘dotnet migrate’.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, my phone was hiding them and printing normal quotes. Good catch!

disposables.push(server.onServerStart(() => {
utils.requestWorkspaceInformation(server)
.then(workspaceInfo => {
if (workspaceInfo.DotNet && workspaceInfo.DotNet.Projects.length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this fire for the old PCL projects that use project.json for dependencies but still have a .csproj? Do you want to deprecate those as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Just for project.json files that are handled as projects.

@DustinCampbell DustinCampbell merged commit c0eee5f into dotnet:master Jul 21, 2017
@filipw
Copy link
Contributor

filipw commented Jul 22, 2017

The one thing that is a little problematic with this is if you use VS Code to develop Azure Functions.
CSX Azure Functions use project.json for dependencies.

It is somewhat of a very niche use case I guess.

@DustinCampbell
Copy link
Member Author

Yeah, I realize this is going to be a bit ugly to roll out. Do Azure Functions actually use project.json for a 'project'? That is, does the OmniSharp DotNetProjectSystem create a project in the OmniSharpWorkspace for them? If not, this won't affect that.

@filipw
Copy link
Contributor

filipw commented Jul 22, 2017

yeah so technically we don't even officially support Azure Functions CSX yet (see OmniSharp/omnisharp-roslyn#779)
However, since Azure Functions CSX are very, veryclose to what we have built-in CSX support (which can work with standard CSI scripts, but can also read project.json) you could use the existing OmniSharp to support your Azure Functions development with a little extra preparation work. (again I think it's very niche)

From the technical standpoint, on the OmniSharp side, it would mean that actually both Dotnet (since that kicks in autoamtically for project.json) and Script (since that kicks in for .csx) project systems would be set up for you in the workspace, but in the editor-server communication, only the Script project system would be responding, since the Dotnet project system ignores .csx files.

@DustinCampbell
Copy link
Member Author

I wouldn't expend a ton of effort trying to support Azure Functions based on project.json just yet. Note that there are good reasons to stop proliferating project.json and the latest Azure Functions support for VS 2017 doesn't use them (https://blogs.msdn.microsoft.com/webdev/2017/05/10/azure-function-tools-for-visual-studio-2017/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants