'SqlConnection' could not be found in Azure DevOps's buildBuild Errors When Attempting to AzureXamarin Build issue in Visual Studio Team Services (was: Visual Studio Online)VSTS - Building ASP.NET Core 2.0, compile error: Could not locate the assembly “Microsoft.AspNetCore.Mvc.ViewFeatures”Error build VSTS: The type or namespace name 'BoDi' could not be foundErrors in Azure DevOps build - are you missing an assembly reference?SQL Server CE, type or namespace not found on Azure DevopsAzure DevOps project build returning with log4net errorAn error from Azure DevOps Build: Could not locate the assembly “System.ComponentModel.Annotations”How to build third party references through build task in Azure DevOps build definitionazure devops Build error with asp.net core 2.2

Can you get infinite turns with this 2 card combo?

Can a US president have someone sent to prison?

How fast can a ship with rotating habitats be accelerated?

Set vertical spacing between two particular items

Are there any vegetarian astronauts?

Why is the Turkish president's surname spelt in Russian as Эрдоган, with г?

Going to get married soon, should I do it on Dec 31 or Jan 1?

How would a order of Monks that renounce their names communicate effectively?

Should I report a leak of confidential HR information?

How to modify the uneven space between separate loop cuts, while they are already cut?

Should I include salary information on my CV?

The use of "I" and "we" used in the same sentence and other questions

Would adding an external lens allow one area outside the focal plane to be in focus?

Why does the numerical solution of an ODE move away from an unstable equilibrium?

Sir Alex Ferguson advice OR Sir Alex Ferguson's advice

Dold-Kan correspondence in the category of symmetric spectra

If a high rpm motor is run at lower rpm, will it produce more torque?

If my Scout rogue has used his full movement on his turn, can he later use the reaction from the Skirmisher feature to move again?

Why is a blank required between "[[" and "-e xxx" in ksh?

Did Chinese school textbook maps (c. 1951) "depict China as stretching even into the central Asian republics"?

Forgot chonantanu after already making havdalah over wine

Dual statement category theory

Signing using digital signatures?

How should I behave to assure my friends that I am not after their money?



'SqlConnection' could not be found in Azure DevOps's build


Build Errors When Attempting to AzureXamarin Build issue in Visual Studio Team Services (was: Visual Studio Online)VSTS - Building ASP.NET Core 2.0, compile error: Could not locate the assembly “Microsoft.AspNetCore.Mvc.ViewFeatures”Error build VSTS: The type or namespace name 'BoDi' could not be foundErrors in Azure DevOps build - are you missing an assembly reference?SQL Server CE, type or namespace not found on Azure DevopsAzure DevOps project build returning with log4net errorAn error from Azure DevOps Build: Could not locate the assembly “System.ComponentModel.Annotations”How to build third party references through build task in Azure DevOps build definitionazure devops Build error with asp.net core 2.2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have a .NET core app that references the System.Data.SqlClient library and its dependencies. Building the project locally it works without problems but, when I build it in an Azure DevOps's pipeline, it returns many "not found" errors about that library.



These are the errors:



HelpersMicrosoftSQLServerHelper.cs(15,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(19,42): error CS0246: The type or namespace name 'SqlCommand' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(29,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(43,42): error CS0246: The type or namespace name 'SqlCommand' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(55,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(59,39): error CS0246: The type or namespace name 'SqlBulkCopy' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]


I've checked what command is launch by Azure DevOps to build the project ("C:Program Filesdotnetdotnet.exe" build d:a1ssrcVisyon.ETLsVisyon.ETLs.csproj --configuration Release) and I've launched on my local machine. Locally, it works.



Also, I use the default .NET core build template provided by Azure DevOps and run the build on the agent "VS2017".



Can someone help me?










share|improve this question
























  • Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    – Leo Liu-MSFT
    Mar 27 at 7:04

















0















I have a .NET core app that references the System.Data.SqlClient library and its dependencies. Building the project locally it works without problems but, when I build it in an Azure DevOps's pipeline, it returns many "not found" errors about that library.



These are the errors:



HelpersMicrosoftSQLServerHelper.cs(15,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(19,42): error CS0246: The type or namespace name 'SqlCommand' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(29,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(43,42): error CS0246: The type or namespace name 'SqlCommand' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(55,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(59,39): error CS0246: The type or namespace name 'SqlBulkCopy' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]


I've checked what command is launch by Azure DevOps to build the project ("C:Program Filesdotnetdotnet.exe" build d:a1ssrcVisyon.ETLsVisyon.ETLs.csproj --configuration Release) and I've launched on my local machine. Locally, it works.



Also, I use the default .NET core build template provided by Azure DevOps and run the build on the agent "VS2017".



Can someone help me?










share|improve this question
























  • Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    – Leo Liu-MSFT
    Mar 27 at 7:04













0












0








0








I have a .NET core app that references the System.Data.SqlClient library and its dependencies. Building the project locally it works without problems but, when I build it in an Azure DevOps's pipeline, it returns many "not found" errors about that library.



These are the errors:



HelpersMicrosoftSQLServerHelper.cs(15,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(19,42): error CS0246: The type or namespace name 'SqlCommand' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(29,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(43,42): error CS0246: The type or namespace name 'SqlCommand' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(55,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(59,39): error CS0246: The type or namespace name 'SqlBulkCopy' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]


I've checked what command is launch by Azure DevOps to build the project ("C:Program Filesdotnetdotnet.exe" build d:a1ssrcVisyon.ETLsVisyon.ETLs.csproj --configuration Release) and I've launched on my local machine. Locally, it works.



Also, I use the default .NET core build template provided by Azure DevOps and run the build on the agent "VS2017".



Can someone help me?










share|improve this question
















I have a .NET core app that references the System.Data.SqlClient library and its dependencies. Building the project locally it works without problems but, when I build it in an Azure DevOps's pipeline, it returns many "not found" errors about that library.



These are the errors:



HelpersMicrosoftSQLServerHelper.cs(15,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(19,42): error CS0246: The type or namespace name 'SqlCommand' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(29,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(43,42): error CS0246: The type or namespace name 'SqlCommand' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(55,41): error CS0246: The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]
HelpersMicrosoftSQLServerHelper.cs(59,39): error CS0246: The type or namespace name 'SqlBulkCopy' could not be found (are you missing a using directive or an assembly reference?) [d:a1ssrcVisyon.ETLs.ExecutorsVisyon.ETLs.Executors.csproj]


I've checked what command is launch by Azure DevOps to build the project ("C:Program Filesdotnetdotnet.exe" build d:a1ssrcVisyon.ETLsVisyon.ETLs.csproj --configuration Release) and I've launched on my local machine. Locally, it works.



Also, I use the default .NET core build template provided by Azure DevOps and run the build on the agent "VS2017".



Can someone help me?







azure-devops azure-pipelines






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 25 at 12:26









Hasitha M Jayawardana

1,5711 gold badge8 silver badges21 bronze badges




1,5711 gold badge8 silver badges21 bronze badges










asked Mar 25 at 11:37









LorisLoris

247 bronze badges




247 bronze badges












  • Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    – Leo Liu-MSFT
    Mar 27 at 7:04

















  • Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    – Leo Liu-MSFT
    Mar 27 at 7:04
















Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

– Leo Liu-MSFT
Mar 27 at 7:04





Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

– Leo Liu-MSFT
Mar 27 at 7:04












1 Answer
1






active

oldest

votes


















0















'SqlConnection' could not be found in Azure DevOps's build




According to the error message, it seems you are missing the reference System.Data.SqlClient when you build with Azure DevOps. You should add two nuget tasks to restore the package System.Data.SqlClient:



NuGet Tool Installer task



Restore NuGet packages



When we build the project/solution on local machine, the packages is downloaded stored in the packages folder, this folder is ignored by the source control when we submit our source code(This is recommended.), so when we build the project/solution on the Azure DevOps, we need add nuget restore task to restore nuget package before we build it:



enter image description here



enter image description here



Hope this helps.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55336929%2fsqlconnection-could-not-be-found-in-azure-devopss-build%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0















    'SqlConnection' could not be found in Azure DevOps's build




    According to the error message, it seems you are missing the reference System.Data.SqlClient when you build with Azure DevOps. You should add two nuget tasks to restore the package System.Data.SqlClient:



    NuGet Tool Installer task



    Restore NuGet packages



    When we build the project/solution on local machine, the packages is downloaded stored in the packages folder, this folder is ignored by the source control when we submit our source code(This is recommended.), so when we build the project/solution on the Azure DevOps, we need add nuget restore task to restore nuget package before we build it:



    enter image description here



    enter image description here



    Hope this helps.






    share|improve this answer



























      0















      'SqlConnection' could not be found in Azure DevOps's build




      According to the error message, it seems you are missing the reference System.Data.SqlClient when you build with Azure DevOps. You should add two nuget tasks to restore the package System.Data.SqlClient:



      NuGet Tool Installer task



      Restore NuGet packages



      When we build the project/solution on local machine, the packages is downloaded stored in the packages folder, this folder is ignored by the source control when we submit our source code(This is recommended.), so when we build the project/solution on the Azure DevOps, we need add nuget restore task to restore nuget package before we build it:



      enter image description here



      enter image description here



      Hope this helps.






      share|improve this answer

























        0












        0








        0








        'SqlConnection' could not be found in Azure DevOps's build




        According to the error message, it seems you are missing the reference System.Data.SqlClient when you build with Azure DevOps. You should add two nuget tasks to restore the package System.Data.SqlClient:



        NuGet Tool Installer task



        Restore NuGet packages



        When we build the project/solution on local machine, the packages is downloaded stored in the packages folder, this folder is ignored by the source control when we submit our source code(This is recommended.), so when we build the project/solution on the Azure DevOps, we need add nuget restore task to restore nuget package before we build it:



        enter image description here



        enter image description here



        Hope this helps.






        share|improve this answer














        'SqlConnection' could not be found in Azure DevOps's build




        According to the error message, it seems you are missing the reference System.Data.SqlClient when you build with Azure DevOps. You should add two nuget tasks to restore the package System.Data.SqlClient:



        NuGet Tool Installer task



        Restore NuGet packages



        When we build the project/solution on local machine, the packages is downloaded stored in the packages folder, this folder is ignored by the source control when we submit our source code(This is recommended.), so when we build the project/solution on the Azure DevOps, we need add nuget restore task to restore nuget package before we build it:



        enter image description here



        enter image description here



        Hope this helps.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 26 at 2:40









        Leo Liu-MSFTLeo Liu-MSFT

        24.4k2 gold badges31 silver badges42 bronze badges




        24.4k2 gold badges31 silver badges42 bronze badges





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55336929%2fsqlconnection-could-not-be-found-in-azure-devopss-build%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현