Closed mrbelk closed 7 years ago
@mrbelk: Can you run the "msbuild" command that the XamarinAndroid task is running on your build machine from a command prompt and see if you get similar errors? I have a feeling "NuGet Restore" task did not bring down the right packages/libraries causing these errors.
when I run that command in a command prompt on my build machine, I get basically the same set of errors. What should I be looking at w.r.t. the nuget restore task?
FWIW, I am still using v1 of the NuGet restore task. I've had mixed results using v2 of it.
Based on the docs: https://docs.microsoft.com/en-us/vsts/build-release/tasks/package/nuget, the recommendation is to use .NET Core task to restore .NET core and net standard packages. Can you try that out please?
Thanks, Madhuri
so should I remove the NuGet restore step and replace it with the dotnet restore step? I can't replace the xamarin.android build step, but the docs also appear to indicate that I have to add a .NET Core step with the "build" command, but that seems redundant.
replacing the NuGet restore task with a dotnet restore task failed, too. None of the projects in my solution even restored any packages It's possible that I don't have it set up correctly, though.
I get a bunch of warnings like this in the .NET Core "restore" task:
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\bulkDelivery\bulkDelivery.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\bulkDelivery\bulkDelivery.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\Droid\bulkDelivery.Droid.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\Droid\bulkDelivery.Droid.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\ToughpadBinding\ToughpadBinding.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\ToughpadBinding\ToughpadBinding.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\BarcodeService.Interfaces\LaserScanner.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\BarcodeService.Interfaces\LaserScanner.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\BarcodeScanning.Components\BarcodeScanning.Components.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\BarcodeScanning.Components\BarcodeScanning.Components.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\MeterService.Models\MeterService.Models.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\MeterService.Models\MeterService.Models.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\MeterService\MeterService.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\MeterService\MeterService.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\MockMeterService\MockMeterService.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\MockMeterService\MockMeterService.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\bullkDelivery.Components\bulkDelivery.Components.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\bullkDelivery.Components\bulkDelivery.Components.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\ZebraBindings\ZebraBindings.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\ZebraBindings\ZebraBindings.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\CPLTemplates\CPLTemplates.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\CPLTemplates\CPLTemplates.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\bulkDelivery.DataModel\bulkDelivery.Models.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\bulkDelivery.DataModel\bulkDelivery.Models.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\bulkDelivery.Extensions\bulkDelivery.Extensions.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\bulkDelivery.Extensions\bulkDelivery.Extensions.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\bulkDelivery.Locator.Extensions\bulkDelivery.Locator.Extensions.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\bulkDelivery.Locator.Extensions\bulkDelivery.Locator.Extensions.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\JanamBinding\JanamBinding.csproj : warning NU1503: Skipping restore for project 'C:\agent\_work\2\s\JanamBinding\JanamBinding.csproj'. The project file may be invalid or missing targets required for restore. [C:\agent\_work\2\s\bulkDelivery.sln]
and then a bunch of errors like this:
2017-10-19T13:35:56.1871250Z "C:\agent\_work\2\s\bulkDelivery.sln" (Restore target) (1) ->
2017-10-19T13:35:56.1871250Z "C:\agent\_work\2\s\bulkDelivery\bulkDelivery.csproj" (_IsProjectRestoreSupported target) (2) ->
2017-10-19T13:35:56.1871250Z C:\agent\_work\2\s\bulkDelivery\bulkDelivery.csproj(376,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.0.2\Microsoft\Portable\v5.0\Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
so an update: I cleaned up my the .csproj files in projects that reference xamarin forms to remove some extraneous
@mrbelk is this issue resolved, is there anything else to investigate or can this issue be closed?
I believe this can be closed, yes.
Environment
VSTS with private agent VSTS account name: bizspeed Team Project Name: goRoamPOD build definition name: "bulkDelivery Android CI" build number: 2017.10.17.1609 private agent version 2.120.2 OS version 6.3.9600
Issue Description
I have upgraded my primary xamarin forms app "PCL" library to Xamarin Forms 2.4.0.282 and now my automated build process fails with errors in the XAML code-behind pages. My private build agent server has VS2017 15.4 installed, with Xamarin.Android 8.0.0.33. The task that fails is the Xamarin.Android task, when building my PCL project (which I have converted to use .NETStandard 1.4). The solution builds and runs from VS2017 v15.4 on a windows workstation as well as in VS for Mac v15.4.
Error logs
This is a snippet of the build output from the Xamarin.Android build task.