Unable to Detect Error through Build Definition - msbuild

I Have created a build definition for ASP.net core 2.2 application on .sln file,
i intensionally commited wrong code which i will get build error in visual studio 2017, but when build definition is run build task it is not showing any error and build is also passing ....please help me
following picture are my build definition

Related

MSBuild.exe does not result in failed build for editorconfig violations

I am creating a Visual Studio extension that attempts to rebuild a solution following a button click. I am using Process.Start() to perform a Rebuild the project using MSBuild. MSBuild displays all of the build errors/warnings but if I introduce an .editorconfig file with some code formatting guidelines for instance csharp_prefer_braces = true : error, MSBuild does not result in a failed build. Would anyone know what I could be doing wrong?
I am attempting to build a .NET framework 4.6 Console application and my MSBuild version is 4.8.4084.0
Thank you

Appveyor CI fails to build a .net core 2.1 solution with a database project

Our .net core 2.1 solution compiles fine on our local development machines with .net core sdk 2.1.301. Appveyor used to compile the solution in its CI pipeline when there was no database projects defined. Once such a project added, Appveyor started failing in building the solution with the error message below. Any clues how to address this issue?
C:\projects\comingsoon\ComsingSoonDatabase\ComsingSoonDatabase.sqlproj(57,3):
error MSB4019: The imported project "C:\Program
Files\dotnet\sdk\2.1.300\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets"
was not found. Confirm that the path in the declaration is
correct, and that the file exists on disk.
The database project can only be built using the full framework MSBuild tools included in visual studio.
Depending on how you set up appveyor, you need to change your definition to use msbuild.exe instead of dotnet commands.

NuGet restore works, but compile fails on build server

I am trying to build a .NET 4.6 project using MSBuild 15 on our build server (using CruiseControl).
The project has a NuGet package reference (to Oracle.ManagedDataAccess) and it gets restored correctly.
However, the build task fails with the error "The type or namespace name 'Oracle' could not be found".
I have tried building the project in VS 2017 on the build server using the same account, and it works.
I expected MSBuild to retrieve the package contents from the same location, but apparently it can't. What could be the reason?
The error seems to have been caused because MSBuild 14 was used in the build task instead of MSBuild 15. Not sure exactly why that made it fail, but it works now.

.NET Standard and TFS 2015 -> Build failures

My infrastructure now has TFS 2015, but we started a new project in .NET Standard. Our build server now has VS2017, and the project builds when loaded within VS2017 in that server.
When we set a new build definition to run the build through the build agent, then it fails. Seems even that System is not found:
Error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?)
Is there any simple thing to do to make it work, ir we will have to migrate to the new build steps to make it work? Some workaround?
I find a workaround for that. Simply I gave up of using the TFS 2015 build steps MSBUILD and Visual Studio Build, and now I am using the Command Line step. Calling the commands from there:
dotnet restore
dotnet build
That does the trick.
This is because we need to do our restore a different way using the .net core restore. You could fix this by adding the .NET Core (PREVIEW) task to the build definition or just use command line task. With command line task could running dotnet restore, dotnet build, dotnet publish, and dotnet test.
More details please take a look at this blog: Setting up .net core continuous integration build with VSTS/TFS
For command line solution please refer vsts-agent Build Definition for .NET Core (with Test Results) Also take a look at this similar question: Visual studio team services build .net core 1.1

TFS error: when I'm giving checkin in my project one Rotativa.dll bug

I am using ASP .NET MVC 4 with Entity Framework 4.5
I downloaded the nuget something to be able to export my data pro PDF and found one called RotativaW7. The project is working normal but I try to check in the project to publish to TFS and is giving the following error message:
ERROR: Multiple errors occurred during the operation, the first of which is displayed below. A full error list is available in the Output Window.
..\packages\RotativaW7.1.5.4\RotativaW7.1.5.4.nupkg: Unable to write data to the transport connection: The cancellation of an existing connection was forced by the remote host.
nuget:
Install-Package RotativaW7 -Version 1.5.4
Could anyone help me solve this problem?
The nuget package contains an .exe, are you sure TFS allows you to check in executable files?