Home > OS >  Azure Pipeline : ASP.NET and .NET Core applications under one build pipeline
Azure Pipeline : ASP.NET and .NET Core applications under one build pipeline

Time:11-26

Background:

I have several ASP.NET projects under one solution file. I have a build pipeline for ASP.NET projects and building it with .sln. Now, we have added a new project to the same .sln which is in .NET CORE.

Problem statement:

In my build pipeline, when I try to build the whole solution, it throws an exception to the newly added project. (.NET CORE)

"The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)"

I believe this is due to framework versions.

Question:

Is it possible to have both projects under one build pipeline, if yes, how can I achieve it? if not, what would be the ideal solution?

Additional information: From the visual studio, everything is building and working fine, but I build the project pipeline it's throwing this error.

CodePudding user response:

You could add a reference to System.Data.Entity to test if the exception is thrown again.

Or you could refer to this document for more details about Organize your project to support both .NET Framework and .NET

CodePudding user response:

Initially build the code from visual studio to avoid errors while building in the azure pipeline.

Used different projects in azure pipeline enter image description here Create a repository using Visual Studio or Azure Devops. enter image description here

Fill the necessary fields while creating a repository enter image description here

Then it enters into a Git Credential Manager screen and have to choose the account from which you want to create and proceed further.

enter image description here Create branches if required. enter image description here Using Visual Studio, we can sync and push the changes made from the specific branch enter image description here

enter image description here enter image description here Create a pipeline with azure subscription and build the code.

Refer this link for more info.

  • Related