Сборка VSTS CI с Xamarin.Form не находит сборку MVVMLight

Я пытаюсь настроить CI-Build на VSTS, в процессе восстановления NuGet я вижу найденный пакет MvvmLight.

2018-05-14T09:57:17.0372995Z Installing WebP.Touch 1.0.8.
2018-05-14T09:57:17.0373097Z Lock not required - Package already installed Xamarin.Forms 3.0.0.446417
2018-05-14T09:57:17.0373227Z Acquiring lock for the installation of MvvmLight 5.4.1
2018-05-14T09:57:17.0373328Z Acquired lock for the installation of MvvmLight 5.4.1
2018-05-14T09:57:17.0373530Z Installing MvvmLight 5.4.1.
2018-05-14T09:57:17.0373650Z Acquiring lock for the installation of Newtonsoft.Json 11.0.2
2018-05-14T09:57:17.0373759Z Lock not required - Package already installed Newtonsoft.Json 11.0.2
2018-05-14T09:57:17.0373876Z Acquiring lock for the installation of AiForms.Effects 1.3.0
2018-05-14T09:57:17.0373985Z Lock not required - Package already installed AiForms.Effects 1.3.0
2018-05-14T09:57:17.0374117Z Acquiring lock for the installation of CommonServiceLocator 2.0.2

Однако в процессе проекта Build Xamarin.Android возникает следующая ошибка:

2018-05-14T09:57:57.6037827Z ResolveAssemblyReferences:
2018-05-14T09:57:57.6038210Z   Primary reference "CommonServiceLocator".
2018-05-14T09:57:57.6040567Z ##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "CommonServiceLocator". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
2018-05-14T09:57:57.6041769Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "CommonServiceLocator". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\Prototype.MyProject\Prototype.MyProject\Prototype.MyProject.csproj]
2018-05-14T09:57:57.6042157Z           For SearchPath "{HintPathFromItem}".
2018-05-14T09:57:57.6042375Z           Considered "..\..\..\..\..\.nuget\packages\commonservicelocator\2.0.2\lib\netstandard2.0\CommonServiceLocator.dll", but it didn't exist.
2018-05-14T09:57:57.6042987Z           For SearchPath "{RawFileName}".
2018-05-14T09:57:57.6043207Z           Considered treating "CommonServiceLocator" as a file name, but it didn't exist.
2018-05-14T09:57:57.6043403Z   Primary reference "GalaSoft.MvvmLight".
2018-05-14T09:57:57.6044903Z ##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
2018-05-14T09:57:57.6045643Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\Prototype.MyProject\Prototype.MyProject\Prototype.MyProject.csproj]
2018-05-14T09:57:57.6046483Z           For SearchPath "{HintPathFromItem}".
2018-05-14T09:57:57.6046710Z           Considered "..\..\..\..\..\.nuget\packages\mvvmlightlibs\5.4.1\lib\xamarin.ios10\GalaSoft.MvvmLight.dll", but it didn't exist.
2018-05-14T09:57:57.6046899Z           For SearchPath "{RawFileName}".
2018-05-14T09:57:57.6047274Z           Considered treating "GalaSoft.MvvmLight" as a file name, but it didn't exist.
2018-05-14T09:57:57.6047474Z   Primary reference "GalaSoft.MvvmLight.Extras".
2018-05-14T09:57:57.6048778Z ##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight.Extras". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
2018-05-14T09:57:57.6049488Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight.Extras". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\Prototype.MyProject\Prototype.MyProject\Prototype.MyProject.csproj]
2018-05-14T09:57:57.6049822Z           For SearchPath "{HintPathFromItem}".
2018-05-14T09:57:57.6050030Z           Considered "..\..\..\..\..\.nuget\packages\mvvmlightlibs\5.4.1\lib\xamarin.ios10\GalaSoft.MvvmLight.Extras.dll", but it didn't exist.
2018-05-14T09:57:57.6050733Z           For SearchPath "{RawFileName}".
2018-05-14T09:57:57.6051030Z           Considered treating "GalaSoft.MvvmLight.Extras" as a file name, but it didn't exist.
2018-05-14T09:57:57.6051196Z   Primary reference "GalaSoft.MvvmLight.Platform".
2018-05-14T09:57:57.6052423Z ##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight.Platform". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
2018-05-14T09:57:57.6053730Z C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight.Platform". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\Prototype.MyProject\Prototype.MyProject\Prototype.MyProject.csproj]
2018-05-14T09:57:57.6054102Z           For SearchPath "{HintPathFromItem}".
2018-05-14T09:57:57.6054327Z           Considered "..\..\..\..\..\.nuget\packages\mvvmlightlibs\5.4.1\lib\xamarin.ios10\GalaSoft.MvvmLight.Platform.dll", but it didn't exist.
2018-05-14T09:57:57.6054916Z           For SearchPath "{RawFileName}".
2018-05-14T09:57:57.6055155Z           Considered treating "GalaSoft.MvvmLight.Platform" as a file name, but it didn't exist.
2018-05-14T09:57:57.6235802Z GenerateTargetFrameworkMonikerAttribute:
2018-05-14T09:57:57.6236351Z Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.

Сводка сборки

Prototype.MyProject.Controls\AutoForm\AutoFormPickerItem.cs (3, 18)
Prototype.MyProject.Controls\AutoForm\AutoFormPickerItem.cs(3,18): Warning CS0659: 'AutoFormPickerItem' overrides Object.Equals(object o) but does not override Object.GetHashCode()
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2052, 5)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "CommonServiceLocator". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2052, 5)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2052, 5)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight.Extras". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2052, 5)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): Warning MSB3245: Could not resolve this reference. Could not locate the assembly "GalaSoft.MvvmLight.Platform". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Prototype.MyProject\Prototype.MyProject\App.xaml.cs (6, 7)
Prototype.MyProject\Prototype.MyProject\App.xaml.cs(6,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)
Prototype.MyProject\Prototype.MyProject\App.xaml.cs (7, 7)
Prototype.MyProject\Prototype.MyProject\App.xaml.cs(7,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)
Prototype.MyProject\Prototype.MyProject\Features\Authentications\LoginViewModel.cs (3, 7)
Prototype.MyProject\Prototype.MyProject\Features\Authentications\LoginViewModel.cs(3,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)
Prototype.MyProject\Prototype.MyProject\Features\Configurations\UserPerferenceViewModel.cs (2, 7)
Prototype.MyProject\Prototype.MyProject\Features\Configurations\UserPerferenceViewModel.cs(2,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainDetailViewModel.cs (4, 7)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainDetailViewModel.cs(4,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainMasterViewModel.cs (6, 7)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainMasterViewModel.cs(6,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainMasterViewModel.cs (7, 7)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainMasterViewModel.cs(7,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainView.xaml.cs (3, 7)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainView.xaml.cs(3,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainViewModel.cs (3, 7)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainViewModel.cs(3,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainViewModel.cs (4, 7)
Prototype.MyProject\Prototype.MyProject\Features\Main\MainViewModel.cs(4,7): Error CS0246: The type or namespace name 'GalaSoft' could not be found (are you missing a using directive or an assembly reference?)

Я выбрал «Решение», чтобы восстановить пакеты в файл .sln решения моего проекта.... Построено с очередью агентов. Размещено VS2017....

Что я сделал не так? :/


person King Chan    schedule 14.05.2018    source источник


Ответы (1)


Это было мое плохое, в моем проекте есть пакет nuget со ссылкой на пакет MvvmLight (не сетевой стандарт).

Затем в моем коде я ссылался затем напрямую через dll (с помощью Resharper я думал, что на него ссылается пакет nuget)

Я удалил все ссылки и установил стандартный пакет MvvmLight для .net, и теперь он работает.

person King Chan    schedule 14.05.2018