How to build .net core project in team city 2020? - teamcity

I have upgraded my Teamcity build server to Teamcity 2020 and now I am not seeing .Net CLI runner (dotnet). I wasted a day try to fix this but still not resolved.
Does anyone have faced this issue?

The .NET cli plugin was renamed to .NET. In the common case TeamCity should convert all .NET cli steps to .NET steps automatically, but for the case when your had installed a custom version of .NET cli the conversion may not work. If you have few build configurations it is easier to do it manually. It is better to create a backup and to remove custom version of .NET cli before all operations. Otherwise you could create a ticket in the support.

Related

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

Azure Service Fabric in Visual Studio - hresult : 0x80131500

I'm currently trying to work on Azure Service Fabric in Visual Studio 2015 but I have a general exception (hresult : 0x80131500) when i create a new service fabric project.
For example, I got this error when i create a stateless service project, or anything else coming from service fabric... Can't post screenshots of the process for now... Thing is that when I installed service fabric packages, there were errors (already installed package but not, couldn't access the package)...
Spent hours trying to resolve this problem, I tried to uninstall everything, to change from a version to another, I searched a lot for an answer but not found.
Maybe I didn't understand what is happening there, and maybe someone could help me !
Service Fabric Tools: 1.4
Visual Studio: 14.0.25431.01 Update 3
.NET framework: 4.6.1
UPDATE
Thank you everyone, Microsoft updated their packages, it seems that it was coming from them, i tried to reinstall packages again and it works now !
I don't know how this post can be marked as resolved, if someone could do it, it would be great !
I was able to repro this when the 3.5 .NET Framework was missing. Specifically project creation is looking for targets files under the C:\Windows\Microsoft.NET\Framework\v2.0.50727 folder triggering the exception. Need to investigate why the tooling has a dependency on the older .NEt framework.
For now to try to fix the issue, can you enable the .NET Framework 3.5 (includes .NET 2.0 and 3.0) feature in "Control-Panel->Programs and Features-> Turn Windows features on or off" and see if it also resolves the issue for you.
Microsoft updated their packages, it seems that it was coming from them, i tried to reinstall packages again and it works now !
Launch Web Platform Installer (type it in Windows run menu).
Select Microsoft Service Fabric package.
Install it, or update it.
Should work.

No code coverage for .NET Projects when MSBuild SonarQube Runner is used

We are using sonarqube 5.1.1 version and faced issues while analyzing .NET projects using sonar-runner.
As the recent update says, sonar-runner does not support .NET projects anymore, we have installed MSBuild.SonarQube.Runner-1.0 to analyze the same.
We are able to create dashboards for the .NET projects now but unit test cases and unit test coverage is missing.
Could you kindly help us here?
Please note that we have enterprise license and all the existing .NET projects in production environment use Visual studio 2010.
I have upgraded the dev instance to check the feasibility.

TeamCity Warning: No enabled compatible agents for this build configurationn

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.

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.

Resources