Azure / Kudu - Git deploy of beta7 and dnx451 #2656
Comments
@ealsur Can you provide repro steps? |
Can you please provide a repo that repros this issue? Please see https://github.com/projectkudu/kudu/wiki/Using-a-git-repo-to-report-an-issue. Thanks! |
cc @anurse (as he tested this scenario) |
@davidfowl @davidebbo Sure, here is the link of the repo I'm using to test: https://github.com/ealsur/meetup Here is a site that has Continuous Integration on Azure Web Apps pointed to that repo: http://gitgit.azurewebsites.net/ I can run it locally with no problems, it blows up if I use the Continuous Integration through Kudu. |
Thanks, I can repro with your repo, though I don't know what's wrong. The packages are all there under Here is the full error. @davidfowl, any idea why it's failing to find packages?
|
Found the issue, we have a bug where having the project.json and global.json in the same folder causes problems. |
@davidfowl Glad you found it :) Is there anything I can do to help with it? |
@ealsur How did you create the project? |
@davidfowl manually using VS Code, originally I had the problem that Kudu was detecting beta6 (projectkudu/kudu#1663) when pulling the deployment script, @DamianEdwards recommended me to use the global.json, which worked (Kudu pulled beta7) but generated this other problem. |
In my case, I created the project with VS2015 and VS added the global.json into my Web project, probably to select the proper dnx version. After removing the global.json on my azure web app everything started to work again. |
What I found in VS is:
The second case looks broken. @hoetz it's strange that it works differently for you. I have Azure tools v2.7 for VS 2015. |
@davidebbo project.json can be on other folder other than the root and Kudu/VS will parse it? All the examples I've seen on the MVC repo (https://github.com/aspnet/Mvc/tree/dev/samples/MvcSample.Web) use it on the root. |
@ealsur correct, it does not have to be at the root. See https://github.com/davidebbo-test/AspNet5Beta7, which is an unmodified VS-create project, with Create directory for solution checked. It works fine in Kudu. |
@davidebbo Problem is that it works when using a Solution, if you create the web app using VS Code or pulling from Yeoman or the MVC sample repo there's no SLN file to specify that the project is on another folder, so your project.json ends up in the same folder than the global.json :( |
@davidebbo probably because I opened the project.json directly with Visual Studio 2015. |
Yes, it's a bug with publish but it's only happens when these websites are hand crafted manually. Customers end up with 2 global.json files in their published artifacts and one of them end up pointing to a packages folder that doesn't exist. It happens when you have a global.json and a project.json in the same folder. We'll fix this in the next release but the work around is the get rid of the global.json or to restructure your project to have a different global.json root and project root. |
@davidfowl If I get rid of global.json I end up with Kudu not detecting Beta7 and thinking it's Beta6. In the meantime, I rollbacked the whole web app to Beta6 (no global.json) and it's working :) |
You can use the other suggestion. Change the site structure to look like this:
|
@davidfowl Wouldn't I need an SLN / Xproj file for that? Thinking on the no-VisualStudio scenario and going on VS Code, does Kudu / DNX realize that my structure is different? |
You don't need an xproj or solution for that. It's simply moving the project file from the root of the repository as a workaround for a bug that exists in beta7. |
@davidfowl Did it (https://github.com/ealsur/meetup) and it works locally and deploying it to Azure, I didn't know that the project.json file got detected even if it was on a subfolder, learning something new everyday :) You rock. |
When publishing on an Azure Web App using beta7 packages (MVC6 + dependencies) with a global.json:
We get a "Failed to resolve the following dependencies for target framework 'DNX,Version=v4.5.1'
We tried using dnx46, dnx452, they all work locally but all fail on an Azure deploy, maybe its a Kudu related problem?
The text was updated successfully, but these errors were encountered: