0

I have a bog standard .Net Core ASP MVC page utilising EF and utilising Telerik Components.

The project works great on my machine without fail.

I am however no good at the devops side and don't get the ecosystem that goes around the project. I am trying to build a deployable package, and it appears to go through stages where it says "restoring packages for xxxxx"

it then tries to contact https://nuget.telerik.com/nuget/FindPackagesById()?id= for a whole variety of packages and fails

It then goes through "installing" all of them (I can only assume it tries a different repo), then it fails on some one.

The build then fails with

c:\Program Files\dotnet\sdk\2.1.503\Sdks\Microsoft.NET.SDk\targets\Microsoft.PackageDependencyResolution.targets(198,5): Error NETSDK1004 Assets flie xxxxxx not found. Run a NuGet package restore to generate this file.

This file does not exist though and I have tried numerous solutions without any luck (one being to clear the Nuget Cache - and, I waste 2 hours trying to fix the project after that!).

Can anyone advise the next steps?

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Dev X
  • 89
  • 9
  • NuGet is responsible for writing the assets file, which suggests that NuGet didn't run, or it failed so bad it couldn't even write an assets file with an error message. Since you say you have messages about contacting telerik's nuget feed, I guess it failed. You should check the log more carefully and look for restore errors. – zivkan Jul 05 '19 at 13:10
  • Hi friend, any update for this issue? What's result if you create a new simple Project and consume same nuget packages? Does this issue persist, if so maybe the issue has something to do with telerik's nuget feed, check this point and share more details for it. – LoLance Jul 11 '19 at 06:34

1 Answers1

0

Maybe what you're experiencing is something similar to this issue which has been reported to Github dotnet /SDK. And the same cause like this issue.

Not sure what the real msbuild command you use in Devops, but please try adding the /Restore or -restore switch to the command. It could look like: msbuild ...... /Restore

Let me know if it helps:)

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • Hi Lance, I'm still learning. It appears this only happens when publishing and choosing web deploy. Doing it to filesystem seems to work fine. I'm not sure why/what happened and I haven't been able to get around it, even with your suggestion :( – Dev X Jul 08 '19 at 09:35
  • @DevX Do you mean it works well when choosing FileSystem in Devops side, and failed when choosing Web-deploy also in Devops side? – LoLance Jul 08 '19 at 09:53
  • If I go to publish options and choose a web deploy package, it fails the build/doesn't output any files... If I choose standard file system, it creates all the files fine and I can just copy them to the folder on the server. – Dev X Jul 08 '19 at 16:09
  • It's strange that when publishing in VS, file system is ok but web-deploy-package failed. In my opinion, if the single build succeeds, then the publish after it would also succeeds. Have you created a new project to check if this issue is related to the nuget package you referenced? I suggest you can create a new solution which contains a new mvc project, and check if same issue persists. – LoLance Jul 09 '19 at 08:49