Hello,
My ASP.NET Web forms application compiles fine in Visual Studio 2019 however when the project is built with MSBuild in Azure Pipelines to automate some processes we are getting errors that the telerik web ui namespace cannot be loaded in because we are building against .NET 4.0 for this project and despite the Telerik.Web.UI.dll being a 4.0 built DLL it is complaining about some .NET 4.5 dependencies internally. How can I resolve this issue? If I switch this project to build with .NET 4.5 then these issues go away however we need to get the project working while compiling with .NET 4.0 for other reasons I cannot specify here.
Warning causing the errors at the bottom:
##[warning]D:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): Warning MSB3275: The primary reference "Telerik.Web.UI, Version=2020.1.219.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the assembly "AWSSDK.S3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604" which was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
##[error]Artoo.Telerik.Web\Extensions\NumericTextBox.cs(11,55): Error CS0246: The type or namespace name 'RadNumericTextBox' could not be found (are you missing a using directive or an assembly reference?)
EDIT:
Adding this setting below to my csproj for this project removed this error but now I am getting an error saying Telerik.Web.UI is depending on System.Net.Http despite the fact that my project is .NET 4 and this assembly is for .NET 4.5 and above only.
<ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>true</ResolveAssemblyReferenceIgnoreTargetFrameworkAttributeVersionMismatch>
New Error:
Thank you!