TeamCity Warning: No enabled compatible agents for this build configurationn - visual-studio-2010

I'm trying to set up continuous integration at my current place of work. It's not something I've done before so I'm fairly certain that there will be a few steps I've not done or things I'm un-aware of.
I installed TeamCity Professional 7.1.3 on a build server (Windows Server 2008 R2). I've created a simple .NET application that has no database connections and only three NUnit tests. This app uses .NET framework 4.
I set up a build step using NUnit and received a number of errors but I've now resolved them, basically by installing the .NET framework on the build server.
I'm now adding an extra step using Visual Studio but TeamCity now displays the warning 'No enabled compatible agents for this build configuration'.
This question looks similar to mine:
What do I need to install a Visual Studio 2010 (sln)-compatible Build Agent in TeamCity? and it helped me solve the problems I had with NUnit but not for this current problem.
Is there something I've missed during my set-up? If I'm building and running tests with NUnit do I need to bother with this second step?

You installed the full framework, correct -- not just the client pieces? Here's a TeamCity forum post on how to resolve the Unmet requirements:DotNetFramework4.0_x86 exists compatibility error when you've previously installed the framework.

Related

Using Microsoft.NET.Sdk.Web without Visual Studio?

I am trying to build a dotnet core web app on a build server that has MsBuild, but not Visual Studio, installed. I cannot get around the message error MSB4236: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found.
The command dotnet --info shows Microsoft.NETCore.App 3.1.0 installed, just as on my development machine where the project builds. The contents of C:\Program Files\dotnet\sdk\3.1.100 appear to match between the two machines. Global.json points to the 3.1.0 version.
Is Microsoft.NET.Sdk.Web a separately-installed thing? I see what look like separate packages, now deprecated, on NuGet, and I'm guessing this is now baked into the base .NET SDK?
Where should I be looking for differences to try to find the missing pieces?
Solved the problem by (1) running vs-buildtools installer to put some additional pieces in place, and (2) adding some NuGet packages for web component.

Team City Build Failure Restoring .NET Standard

I'm trying to set up a build configuration for an ASP.NET Core (built on .NET full framework 4.6.2) project.
I'm Using TeamCity Enterprise 2017.2.3 (build 51047)
The .NET Core SDK is installed on the build server, along with 4.6.2 of the .NET Framework.
I am getting the following Build Error Message:
... This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets.
Anyone come across this error before?
I added the latest recommended Nuget exe (4.6.2) as well.
The build step upon which it is failing is a .NET CLI (dotnet) step.
I've set the Command to build
and the Projects to the Solution file.
Dotnet CLI is definitely installed and is version 2.1.300
Yeah update the build tools on the TeamCity server, you're probably using the latest Visual Studio version on your local machine but your build tools on the build server are slightly out of date, probably earlier than v15.5.
https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15
Also ensure that you have selected to add the .NET Core 2(+) build tools as they include the .NETStandard and aren't selected by default. See https://github.com/dotnet/standard/issues/458#issuecomment-323845208

Install MSTest in Teamcity 9

So, I've just installed Teamcity 9.1 (latest version, today) on a Windows server 2012. Before that I installed VS2015. I want to run MSTest after compilation as a separate build step. However, it doesn't show up in the list (dropdown). I only see Nunit et.c. How do I get MSTest to be one of the test runners? Do I need to install something separately? According to the docs it should be a built-in feature. Am I missing something? Any help is appreciated.
If you are using 9.1+ the runner is now called Visual Studio Tests
Hope this helps

VS 2010 Setup Project Requires .NET 4.0, but it is already installed

I have a VS 10 project using .Net 4.0 and I use lots of stuff that do require 4.0. I created a VS Setup project added the primary output from my project and built it. I then installed it and everything worked fine. A few days later I am ready to do a new build so I rebuild my project and then the setup project. Now when I run the msi it tells me that .Net Framework 4.0 is required.... I figured I screwed it up so I just create a new setup project, and that works fine. But again a few days later (restarted VS in there probably and maybe even the computer) I rebuild and get the error telling me that .Net 4.0 is required. I did it a few times just to verify and it consistently happens and I cannot figure out why.
The project I am building and installing has a windows service that is set as the startup project. I will switch that to a console app object for local testing purposes and build and test the project (not the setup project). This is the only thing I can think of that may be impacting the build, but again, I cannot figure out why.
Any help is appreciated.
This error message is thrown when the Launch Conditions in the Setup Project aren't met.
Go to View > Editor > Launch Conditions
Change the .Net Framework version value to
match the version your setup project
is compiled into. By default, the 2010 setup and deployment project condition is set to .NET 4.0 Client Profile.

How to use CruiseControl.NET for database and windows service deployment?

I have a VS 2008 solutions that includes a number of projects including a couple of class libraries, a web application, a windows service and a SQL 2008 database project. The build server currently has CruiseControl.NET version 1.5.0.6237, command-line subversion client and .NET framework 3.5 SP1 installed (Windows Server 2008 R2, no Visual Studio). I was able to configure ccnet to retrieve get latest from svn repository, build the solution using an MSBuild task and deploy the web application using robocopy. Now I'm struggling to make ccnet deploy the database script and I also need get the windows service deploy and start on the build/dev server. The latest error is that the assembly Microsoft.Data.Schema.Tasks is missing on the build server (I had to add Microsoft.Data.Schema.Common.targets and Microsoft.Data.Schema.SqlTasks.targets files to the solution and modify the database project file to get this far).
What would be the best CI/deployment approach in my scenario? Am I using the right tools for the job, or should I be using something other than ccnet? Do I need to install anything else on the build/dev server to make my life easier?
Please be very specific since I'm new to CruiseControl.NET and MSBuild tasks.
You can use nant.
For a jump start you can use
nantbuilder.
For service install
read this
For a DB deploy read this

Resources