Code is not getting scanned after Sonarqube Azure Devops analysis - azure

I am using Sonarqube for Azure DevOps pipeline. These are my tasks my pipeline has
No code is getting scanned for the solution WebService on the sonarqube project. I am using MSBuild for building the code.
One warning I am getting is this. Though I have visual studio 2019 is installed on the build machine.
SonarScanner for MSBuild 4.10
Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: E:\Build Agents\AquilaPool2-Agent-2\_work\15\s\Src\Services\DataIngestion\St\WebService\XWS.WebAPI\bin\WebService.dll.RoslynCA_fixed.json 2020-09-23T08:45:11.5066077Z Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file

I fixed the issue by adding sonar.scm.exclusions.disabled=true in Prepare analysis on SonarQube step. Though this Roslyn error is still coming. All the files are getting scanned now.

Related

Azure Pipelines DotNetCoreCLI - .Net Core SDK End of Life

I am receiving an error in Azure CI pipelines. While trying to run a DotNetCoreCLI restore task.
Been scrapping the net for hours to no avail, no solution from related questions have helped me understand the problem.
Basically, we have added a new project to a repo. This project requires a dotnet restore command to be run to create the project.assets.json file.
Please see script below and log snapshot for each task.
Script:
UseDotNet snapshot:
DotNetCoreCLI error message:
Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.
##[error]No files matched the search pattern.
Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts.
Have looked around quite a bit. Nothing seems to help me understand what is going wrong here.
Any assistance would be appreciated.
Turns out the issue was in the folder location referenced as $(UtilityLibrary).
Took me a while to figure out as I didn't have access to the actual variable set.
info message is caused by the fact the .NET version is out of support https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core
Please always check the path of the solution , proj

Visual Studio Code won't compile or submit USQL script

I am using Visual Studio Code (VS Code) to compile and then submit usql scripts on our Azure platform.
Something happend and I cannot compile or submit any usql jobs anymore, with following error message:
I tried multiple solutions to fix it:
Reinstall visual studio code
Updated to the latest version (1.38)
Reinstall the Azure Data Lake Tools package
Remove all generated folders and files and start from scratch
I made sure this is not access-related (I can run jobs on Azure web portal)
The script does not have any bugs and it is supposed to run (checked on Azure web portal)
I work on MS Windows VM x64, VS Code version 1.38.
I am completely puzzled by that, any help greatly appreciated!
I can't reproduce your issue on my side. I follow steps in this detailed guide and it works well for me.
Since you already sorted out several possible issues, I would suggest you checking if you missed some installations follow above link. In particular, the following steps:
2.1 To install BuildTools, click visualcppbuildtools_full.exe in the LocalRunDependency folder, then follow the wizard instructions.
2.2 To install Win10SDK 10240, click sdksetup.exe in the LocalRunDependency/Win10SDK_10.0.10240_2 folder, then follow the
wizard instructions.
And and run ADL: Start Local Run Service.
Just for summary, it works after updating sdk version to 1.38.1.

Hosted build on VSO with Azure SDK 2.8 fails

We recently updated our Azure SDK to 2.8.
Now when building our solution on VSO hosted build we get build errors.
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\
2.8\Microsoft.WindowsAzure.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
I've found another one with similar issues with a question posted on MSDN but without any answers. Support for Azure SDK 2.8 in hosted build
Anyone know how to get around this issue? Do we have to downgrade?
We are working on the update now. Azure 2.8 should be on the build machines week of Nov. 30.
Update: We ran into a couple of issues and still hope to have this completed this week, but it may slip into next week.
Update Dec. 17: We finally got the updated image with Azure 2.8 into production yesterday. Sorry for the long delay.
The latest Azure SDK supported on Hosted build is 2.7. Refer to Hosted build controller for details.
To build your solution, you'd either downgrade Azure SDK version to 2.7 or deploy your own build agent and install Azure SDK 2.8 on it.

Build in Visual Studio Online fails since Azure SDK 2.5

Since upgrading to Azure SDK 2.5 our CI build is failing. We have an automatic build on Visual Studio Online.
Here's the exception that is being thrown:
C:\a\src\WebService\WebService.ccproj (82): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.5\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Any ideas?
We are deploying 2.5 on the build machines now. We have it on all of the scale units but one, where we hit an issue. That's under investigation now, and we'll get the roll out finished asap.
Update: We've just finished deploying the new image with 2.5 to all build machines.
Note: You can see a full list of exact versions installed: http://listofsoftwareontfshostedbuildserver.azurewebsites.net/

VS publish to azure uses debug instead of release

Is it just me, or Visual Studio 2012 with most recent update, package the current environment release upon publish, rather than the release specified in the publish settings?
UPDATE: To force it to build in release mode I have to update the build definition as per this SO question:
How do I force my TFS 2010 Build to build all projects in the solution to be built in Debug or Release Mode?
Not sure why I suddenly have to enforce this flag though??
It's not just you - I've been seeing the same thing for a week or so now and couldn't figure it out. When I remoted into my Azure vm I saw the the web.config it had published was just the debug one - yikes! Maybe it's not running the web.config transforms or something?

Resources