Closed ShipraRay150 closed 1 year ago
Hey @ShipraRay150. Please add minimal repro steps with a repo how to reproduce the issue.
Sorry i cannot share the repo as it is a organizations so cant share in public. Issue: In Azure devops pipeline my .Net framework 4.6 toolversion = 14 was building fine when agent specification used VS2017-win 2016(which is deprecated now). My organization solution is using Fake library to build the solution
But when agent specification used windows-2019 , build is failing at soln.fsx(Fake build script). (After analyzing the fake build script found 'Fake.DotNet.MSBuild.run' not able to pick the 2019 msbuild) which was completely working fine when agent specification used VS2017-win 2016. Please help!
I am not able to check the vs2017-win2016(i donot see the link is visible to check software in msdn as this is deprecated) software links to validate which software is missing that needs to be installed in windows 2019
@ShipraRay150 the latest windows-2016 readme is available by this link, you can compare the difference https://github.com/actions/runner-images/blob/493f3c3ee19fc6f2f5456b1f8563f77f0096c3e1/images/win/Windows2016-Readme.md
In my local i am able to build the solution but in Azure Devops Pipeline it is failing.
In my local i have VS2019, but in environment variable i have added: MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin
Please help on this!
@miketimofeev @al-cheb Any suggestions on this issue?
@miketimofeev @al-cheb Any suggestions on this issue?
We can't investigate without repro steps.
@al-cheb
Reproducing steps:
1.In Azure devops pipeline my .Net framework 4.6 toolversion = 14 was building fine when agent specification used VS2017-win 2016(which is deprecated now). My organization solution is using Fake library to build the solution
2.But when agent specification used windows-2019 , build is failing at soln.fsx(Fake build script). (After analyzing the fake build script found 'Fake.DotNet.MSBuild.run' not able to pick the 2019 msbuild) which was completely working fine when agent specification used VS2017-win 2016.
@al-cheb @miketimofeev AzureDevops Pipeline fail error When selected Pool: [Azure Pipelines] Image: windows-2019
MSBuild Path taken by fake build script is : c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
Expected Behaviour: MSBuild path should be C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin
Details of MSBuild path in Azure devops when the fake build script was successful: When selected Pool: [Azure Pipelines] Image: VS2017-win16(which is deprecated by microsoft now)
MSBuild path taken by fake build script is : C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe
@al-cheb @miketimofeev
Please help on this.
@ShipraRay150, try to add a step:
steps:
- task: BatchScript@1
displayName: 'Run script C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
inputs:
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
arguments: x64
modifyEnvironment: true
@al-cheb I have one task to execute the Fake build script.
Do i need to add this Batch script before the Fake build script task ?
@ShipraRay150, before the Fake build task.
@al-cheb
Tried but this didnot worked.
MSBuild Path taken: c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
@ShipraRay150, please attach build logs.
ToolPath should be an exe file, like: let msBuildPath ="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe"
ToolPath should be an exe file, like: let msBuildPath ="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe"
tried with this also not worked, for some reason fake build is still taking MSbuild path as: c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
@al-cheb
Is it possible to add an MSBuild environment variable for this agent windows-2019 in microsoft servers path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin ?
You can add a step to set this variable:
- pwsh: 'Write-Host "##vso[task.setvariable variable=MSBuild]C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin"'
displayName: 'Set env var'
You can add a step to set this variable:
- pwsh: 'Write-Host "##vso[task.setvariable variable=MSBuild]C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin"' displayName: 'Set env var'
How to add this ?
You can add a step to set this variable:
- pwsh: 'Write-Host "##vso[task.setvariable variable=MSBuild]C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin"' displayName: 'Set env var'
How to add this ?
Click Add a task -> Choose PowerShell:
@al-cheb
Thankyou !! this worked setting the env variable.Build is success now.
@al-cheb
My classic build pipeline is working fine but when i ran release pipeline using agent windows-2019 i get this error from Solution\AssemblyVersion.cs: error CS7034: The specified version string does not conform to the required format - major[.minor[.build[.revision]]]
Can you please help on this??
@ShipraRay150, please share the AssemblyVersion.cs content.
@al-cheb Before the last successful ran with the release pipeline when agent selected was VS2017-win16
I get this error with agent windows-2019
@ShipraRay150, do you have a SolutionInfo.cs file?
@ShipraRay150, do you have a SolutionInfo.cs file?
@al-cheb No we dont have
@al-cheb Any suggestions on this please?
@ShipraRay150, please attach logs of the failed build.
@ShipraRay150, Please show TEST.build.Constants.csproj content.
@ShipraRay150, from previous log you passed 2021.9.1646096.1
version. Could you replace the Build part to less than 65535 ( 2021.9.164.1
) ?
@ShipraRay150, from previous log you passed
2021.9.1646096.1
version. Could you replace the Build part to less than 65535 (2021.9.164.1
) ?
sure will do and check
@ShipraRay150, from previous log you passed
2021.9.1646096.1
version. Could you replace the Build part to less than 65535 (2021.9.164.1
) ?sure will do and check
This worked Thankyou..!! (y)
@al-cheb, Hi need one help is there any azure devops pipeline task to copy remote server files to local machine? Please help!
@al-cheb, Hi need one help is there any azure devops pipeline task to copy remote server files to local machine? Please help!
You can publish an artifact and download it manually to the local machine. How to publish artifacts - https://learn.microsoft.com/en-us/azure/devops/pipelines/artifacts/build-artifacts?view=azure-devops&tabs=classic#publish-artifacts
@al-cheb, Hi need one help is there any azure devops pipeline task to copy remote server files to local machine? Please help!
You can publish an artifact and download it manually to the local machine. How to publish artifacts - https://learn.microsoft.com/en-us/azure/devops/pipelines/artifacts/build-artifacts?view=azure-devops&tabs=classic#publish-artifacts
@al-cheb my requirement like - i want to fetch some certificates from server to my local machine.how can i do that?
@al-cheb, Hi need one help is there any azure devops pipeline task to copy remote server files to local machine? Please help!
You can publish an artifact and download it manually to the local machine. How to publish artifacts - https://learn.microsoft.com/en-us/azure/devops/pipelines/artifacts/build-artifacts?view=azure-devops&tabs=classic#publish-artifacts
@al-cheb my requirement like - i want to fetch some certificates from server to my local machine.how can i do that?
Please read message above how to publish artifacts.
Description
Unable to build in Azure Devops pipeline using agent specification windows-2019, before the code was building fine using agent VS2017-win2016(which is decommissioned now)
My VS .net solution is building fine using VS2019 in my local machine but it fails in Azure Devops pipeline using windows-2019 agent. In my local i had to add one environment variable : MSBuild with below path C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin
The solution in pipeline was building fine when agent specification used wasVS2017-win2016(which is decommissioned now).
Please help on this.
Platforms affected
Virtual environments affected
Image version and build link
As this is Company's build i cant share in public.
Is it regression?
yes local development
Expected behavior
The Azure devops pipeline build should be successful using agent-specification windows-2019
Actual behavior
Unable to build in Azure Devops pipeline using agent specification windows-2019, before the code was building fine using agent VS2017-win2016
Repro steps
Unable to build in Azure Devops pipeline using agent specification windows-2019, before the code was building fine using agent VS2017-win2016(which is decommissioned now)
My VS .net solution is building fine using VS2019 in my local machine but it fails in Azure Devops pipeline using windows-2019 agent. In my local i had to add one environment variable : MSBuild with below path C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin
The solution in pipeline was building fine when agent specification used wasVS2017-win2016(which is decommissioned now).
Please help on this.