We moved from TFS 2010 to TeamCity, and we have problems creating our solution file.
We are using .NET 4.0. The Google library, as you know, causes problems with .NET 4.0 + system.net.http when trying to create it. We were able to configure this setting on TFS (it uses MSBuild 4.0) without errors.
App.config must have the correct builds:
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.2.28.0" newVersion="2.2.28.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.2.28.0" newVersion="2.2.28.0" /> </dependentAssembly> </assemblyBinding> </runtime>
We have already tried: - Use different types of runners: Visual studio, MSbuild - Link to all Dlls directly (google + system.net.http +, etc.) - Use direct recovery of the Nuget package on these DLLs (it restores everything in order )
Build error: ResolveAssemblyReference] C: \ Program Files (x86) \ MSBuild \ 12.0 \ bin \ Microsoft.Common.CurrentVersion.targets (1635, 5): warning MSB3268: main link "Google.Apis.Auth.PlatformServices, version = 1.9 .0.26016, Culture = neutral, processorArchitecture = MSIL "cannot be resolved because it has an indirect dependency on the system build" System.Net.Http, Version = 2.2.22.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a ", which cannot be allowed in the current target framework. ".NETFramework, Version = v4.0". To fix this problem, delete the link "Google.Apis.Auth.PlatformServices, Version = 1.9.0.26016, Culture = neutral, processorArchitecture = MSIL" or migrate the application to the version of the framework containing "System.Net.Http, Version = 2.2.22.0 , Culture = Neutral, PublicKeyToken = b03f5f7f11d50a3a. "
The following are: [07:58:29] W: [MSBuild output] C: \ BuildAgent \ work \ dda43f1992063b18 \ Integrations \ CalendarSync \ Devices \ Google Calendar \ GoogleCalendarDevice.vb (788.78): error BC30009: Link required for Google builds. Apis, Version = 1.9.0.23042, Culture = neutral, PublicKeyToken = null ', containing the implemented interface' Google.Apis.Requests.IDirectResponseSchema '. Add it to your project. [C: \ BuildAgent \ work \ dda43f1992063b18 \ integration \ CalendarSync \ Severa.Integrations.CalendarSync.vbproj]