Reputation: 53
Update Fixed by moving the build server on premises so I could install sync framework. The build queue can still be managed in Visual Studio Team Services.
I have a TF project hosted on Visual Studio Online. It depends on the NuGet package for Microsoft Sync Framework. According to the NuGet documentation, Visual Studio online will automatically perform a NuGet package restore when building the solutions.
Unfortunately, assembly references to Microsoft.Synchronization.* are not working:
42>ResolveAssemblyReferences:
Primary reference "Microsoft.Synchronization.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL".
42>C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Synchronization.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [d:\a\src\SomeProject.csproj]
Other NuGet packages like MoreLinq and EPPlus are working correctly.
Upvotes: 0
Views: 258
Reputation: 1
The problem is that NuGet restore in fact downloads msi file, not the libraries themselves, and after download is done it doesn't execute the msi.
So additionally you need to run cmd\powershell to execute this msi installer, before starting the build. In my case it was Azure DevOps MS hosted agent (but i guess it's similar to VSO) and it puts the package in the next directory:
D:\a\1\s\packages\Microsoft.SyncFramework.2.1.0.2\tools\x64\
- folder may vary, but you got the idea.
And then just execute the installer with quiet argument, so agent installs it silently:
Synchronization-v2.1-x64-ENU.msi /quiet
Then start building your project\solution.
Upvotes: 0
Reputation: 23444
Try removing the Nuget package and the references and then adding it again.
Often I find there is one person on the team that does not "get" Nugget and adds the reference manually...
Upvotes: 0