microsoft / azuredevopslabs

Learn how you can plan smartly, collaborate better, and ship faster with a set of modern development services with Azure DevOps.
https://www.azuredevopslabs.com
MIT License
819 stars 914 forks source link

CI Lab - Job fails in Test Assemblies Task #587

Closed RochishnaA closed 2 years ago

RochishnaA commented 2 years ago

image

smacar01 commented 2 years ago

Looks like the same problem I had. Check out their response to me in Issue #582

After applying the changes suggested, the build worked for me.

RochishnaA commented 2 years ago

Hi @smacar01 , Thanks for the response. I already have the agent specification set as "VS2017 win2016". Please note that the build step is successful, yet it fails in Test Assemblies step. Please suggest if any idea. image

RochishnaA commented 2 years ago

Any updates on the above one please?

sriramdasbalaji commented 2 years ago

Hi @RochishnaA ,

Can you try with following changes `

..\..\packages\Castle.Core.3.3.0\lib\net45\Castle.Core.dll
</Reference>`

image

<package id="Castle.Core" version="3.3.0" targetFramework="net452" /> image

<bindingRedirect oldVersion="0.0.0.0-3.3.0.0" newVersion="4.0.0.0" /> image

DanEvansBI commented 2 years ago

I'm getting a different build error on any pipleline run after the first one. I did apply the changes to "Castle.Core" as recommended by @sriramdasbalaji

2021-12-09T17:16:04.8095637Z Done Building Project "D:\a\1\s\PartsUnlimited-aspnet45\test\FabrikamFiber.SeleniumTests\FabrikamFiber.SeleniumTests.csproj" (default targets). 2021-12-09T17:16:04.8262400Z ##[error]PartsUnlimited-aspnet45\PartsUnlimited.DepValidation\PartsUnlimited.DepValidation.modelproj(36,11): Error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\ArchitectureTools\Microsoft.VisualStudio.TeamArchitect.ModelingProject.targets" was not found. Also, tried to find "ArchitectureTools\Microsoft.VisualStudio.TeamArchitect.ModelingProject.targets" in the fallback search path(s) for $(VSToolsPath) - "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v16.0" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe.Config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths.

DanEvansBI commented 2 years ago

So was able to finally get the pipeline to complete by making the following adjustments: Restore Castle.Core reference back to 3.3.0.0 from 4.0.0.0 In the Pipeline Task Settings, the Build Solution option for "Visual Studio Version" set to Visual Studio 2017. In the Pipeline Task Settings, the Test Assemblies option for "Test Platform Version" set to Visual Studio 2017.

RochishnaA commented 2 years ago

Thanks Much ! It is resolved after making changes as suggested by @sriramdasbalaji .