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

Dependency conflict when project.json reference csproj #2865

Closed
rrelyea opened this issue May 31, 2016 · 6 comments
Closed

Dependency conflict when project.json reference csproj #2865

rrelyea opened this issue May 31, 2016 · 6 comments
Assignees
Labels
Platform:Xplat Priority:1 High priority issues that must be resolved in the current sprint. Type:Bug
Milestone

Comments

@rrelyea
Copy link
Contributor

rrelyea commented May 31, 2016

Port of https://github.com/dotnet/cli/issues/3205

@rrelyea rrelyea added this to the 3.5 Beta2 milestone May 31, 2016
@rrelyea rrelyea added Type:DCR Design Change Request Type:Bug Platform:Xplat Priority:1 High priority issues that must be resolved in the current sprint. and removed Type:DCR Design Change Request labels Jun 3, 2016
@jainaashish
Copy link
Contributor

This works fine in VS or through msbuild but not with dotnet restore which is as designed as of now.

@sayedihashimi dotnet restore works only with xproj in current design and will need framework changes to support csproj.

@jainaashish jainaashish assigned rrelyea and unassigned jainaashish Jun 6, 2016
@BrianVallelunga
Copy link

@jainaashish If I understand you correctly, then it is literally impossible to build a combined project.json + csproj solution right now with msbuild and that's as designed? If you read the linked issues, you'll see people are trying to build simple sites that reference a csproj project on a build server and the build is breaking, while working in VS.

@rrelyea rrelyea modified the milestones: 3.5 Beta3, 3.5 Beta2 Jun 14, 2016
@rrelyea rrelyea modified the milestones: 3.6 Beta, 3.5 RTM Jul 19, 2016
@rrelyea rrelyea modified the milestones: 4.0 RC, Future-1 Nov 23, 2016
@rrelyea
Copy link
Contributor Author

rrelyea commented Nov 23, 2016

This is being fixed by the move of .NET Core projects to use project files, instead of Project.Json.
The first release of that support is in VS 2017 RC, which is now publicly available.
Closing. Please let us know if you see any issues with the support we are shipping in VS 2017 RC.

@rrelyea rrelyea closed this as completed Nov 23, 2016
@jsgoupil
Copy link

@rrelyea Trying this VS2017, after a conversion of a xproj to a csproj, there is no packages.config files.
Doing a normal nuget restore on a solution will not restore the dependencies.

You can repro this by creating a new ASP.net Framework web app. Then run what Azure would run:

:: 1. Restore NuGet packages
IF /I "WebApplication2.sln" NEQ "" (
  call :ExecuteCmd nuget restore     "%DEPLOYMENT_SOURCE%\WebApplication2.sln"
  IF !ERRORLEVEL! NEQ 0 goto error
)

You'll get

Nothing to do. None of the projects in this solution specify any packages for NuGet to restore.

Then, it won't compile...

NuGet is 3.5

CC @Rick-Anderson

@blackdwarf
Copy link

@jsgoupil if you modify what Azure runs to run dotnet restore instead, does it work?

@jsgoupil
Copy link

@blackdwarf

I spent so much time on this... just added 2 more hours and I didn't succeed much. dotnet restore works but it doesn't create the /packages like VS2017 does IF you have a Class Library. (Is it needed though?)

My project GUID is 7B770C35-F561-4221-8A08-E6646CB96DCE. I have noticed that the new Class Library in 2017 have 4DAECC67-F322-4E30-8B4A-A7F6D588ABD5.

There are too many variables that I cannot try them all. It's just not working.

When can I expect this to work on Azure out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform:Xplat Priority:1 High priority issues that must be resolved in the current sprint. Type:Bug
Projects
None yet
Development

No branches or pull requests

6 participants