Uncategorized

Solution: The following Windows service is installed on your computer: elasticsearch-service-x64. Remove elasticsearch-service-x64 to continue.

Solution:

This error may come when installing Azure DevOps Server, all you need to do is to open command prompt as administrator and navigate to Elastic search directory which is usullay as below:

D:\Program Files\Azure DevOps Server 2019\Search\ES\elasticsearchv6.2\bin

And run below command:

elasticsearch-service.bat remove

You will get message as below upon success:

The service ‘elasticsearch-service-x64’ has been removed

Advertisements
Azure DevOps Server, CICD, VSTS

TF401219: The team project collection cannot be detached because its version ID is different than the ID for the configuration database. The collection has the following version: Dev12.M53. The Azure DevOps Server is at the following version: Dev17.M153.5.

Solution:

  1. Delete Collection Database using SQL Management Studio.
  2. Now Run below command to delete the collection using TFSConfig Utility:
tfsconfig collection /delete /collectionName:MyCollection

You may need to add Environment Path Variable to TFSConfig tool location usually it is located at: C:\Program Files\Azure DevOps Server 2019\Tools

Now go to your OLD TFS installation and run below command to Detach the Database:

TFSConfig collection /detach /collectionName:MyProject

Take backup, move the database to new TFS SQL Server and re-attach the Project collection either by GUI or through command.

Best of luck.

Entity Framework

Solved : context has changed since the database was created. Consider using Code First Migrations to update the database

Solution:

Are you moving changes from Development Environment to staging and you are getting above error, well there is a very quick and simple solution to the problem.

Just got to database and delete this table, and it will solve the issue, given that you already have moved the changes to the required tables etc using SQL compare or any other tool.

_MigrationsHistory

Considerations and Other Solutions:

There is an other approach to automatically move the changes to database by using below code in configuration.cs file in Migrations folder.

AutomaticMigrationsEnabled = true;

Please for the love of God don’t go for drop and recreate database option, as you will lose data when accidentally code is moved to staging or production, code as given below(Warning, You will lose data by using this)

Database.SetInitializer<NameOfDbContext>(new DropCreateDatabaseIfModelChanges<NameOfDbContext>());

Visit Stack Over flow for more discussion.

Dotnet-Core

500.19 Error After Deploying .Net Core Solution

Solution:

The solution is very straight forward, just go to Microsoft dotnet-core website, download and install the run time along with hosting package and you are good to go.

I am using Dotnet-Core 2.1.11 on windows so I downloaded the package as highlighted below:

For some reason if you get the below error, that surely mean that you have installed wrong version of the dotnet-core, you don’t need to uninstall previously installed package for most cases, just install the correct version and you are good to go.

http error 502.5 – process failure asp.net core 2.1

Azure DevOps Server

Azure DevOps Server 2019 Stuck at Nuget Restore Step

Solution:

The solution is manual one, unless you find any automated solution.

It would stuck and display like below:

[command]D:DevOpsAgent_work_toolNuGet4.9.4x64nuget.exe restore D:DevOpsAgent_work2sAbC.sln -Verbosity Detailed -NonInteractive -ConfigFile D:DevOpsAgent_work2NugettempNuGet_247.config

So All you need to do is to go to your agent server and go to the directory

D:DevOpsAgent_work_toolNuGet4.9.4×64

and execute below command

restore D:DevOpsAgent_work2sAbC.sln -Verbosity Detailed -NonInteractive -ConfigFile D:DevOpsAgent_work2NugettempNuGet_247.config

It will restore the packages at once and you need to cancel the build and initiate again. Next time whole process will work like a charm. Please also make sure you have access to internet or source of the nuget packages.