Posts

Fix Cannot determine the organization name for this 'dev.azure.com' remote URL Issue Visual Studio 2019

Image
 Recently I got this error in Visual studio 2019 after an update.I am able to connect to the remote repository and clone but couldn't perform Fetch,Pull and Push. Restarting visual studio also wont give a fix for this. But finally managed to fix this by modifying some settings in the git plugin. Error :    Cannot determine the organization name for this ' dev.azure.com ' remote URL. Ensure the `credential.useHttpPath` configuration value is set, or set the organization name as the user in the remote URL '{org}@dev.azure.com'.   Fix : Go to Tools > Options > Source control > Git Global Settings Then modify the settings as shown as below : Reason For This Error : After the update,the Git plugin for visual studio also updated. Previous version of the Git plugin doesn't require these values to be set. But new version expect values for these settings.

Automate SQL Stored Procedure Unit Testing for Code First Approach Part - 2

Image
In the last post we have learnt how to create SQL Server Database project and how to create unit test project using that. Also we have learnt how to add unit test case and add pre test and post test scripts.If you have missed anything please follow the below link. Link : https://codespate.blogspot.com/2020/07/automate-sql-stored-procedure-unit.html Today we are going to add the unit test and database project to azure pipeline and automate the build and test.I am following the ef code first approach.So the database deployment will be handled by the migrations/migrator. This sql server project is useless for me. But why we have added that here is to simplify the unit test creation. So the plan is Application and the database will be deployed through the existing pipeline We need to modify the build pipeline to build the sql unit test project After release only we can see the latest changes in the database.So we need to add the testing after the release only. Thus we need to cre...

Automate SQL Stored Procedure Unit Testing for Code First Approach Part -1

Image
Currently I am working on a project that uses ef core and for most of the server side aggregate  operations, I am using stored procedures. Using the stored procedures along with ef core I can able to optimize the performance and reduce the response time. But when it comes to testing, its quite difficult to test the logic of the stored procedure with unit testing.  Application wise we can mock the stored procedure results and unit test the logic.But we cant test the logic inside the stored procedures. Because most of the unit testing frameworks using the in-memory database. So to overcome these, I have decided to use the SQL Server Database Project to the solution. Since I am following the ef code first approach this project will not help me with the database deployment but this will simplify the process of creating the unit test cases for the stored procedures. So I am going to  cover the following in this article to show how I have done the unit testing. Steps to A...

Fix Sql Unit Test build failure in Azure Devops pipeline

Image
Recently I have faced an issue when adding the SQL DB project and SQL Unit test project to my existing .net core solution. In my local machine I am able to build successfully but the build failed in Azure devops pipeline. I got the below error when I build with .net core CLI.  Error MSB4019: The imported project "C:\Program Files\dotnet\sdk\3.1.301\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\3.1.301\\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" is correct, and that the file exists on disk. Some of the discussions mentioned that specifying the vs SSDT path will fix the issue. So i have unloaded the project and edited the paths as below. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets But...

How to Save Asp.net HTML Editor Content Using AJAX with Time Interval???

Image
When you are working with the ajax editor control sometimes you need to store the content in database or xml. Most of the time we need the content as same when we are navigating through the website. To achieve this i flowed these steps: Create the masterpage and add the editor to that page.  Using AJAX to save the content to the session variable with the time interval Call the session variable and assign the content to editor from master pages using onInit() method. first create the Ajax control toolkit editor in the masterpage using the below code    <cc1:editor height="530px" id="Editor1" oncontentchanged="editor_content_load" runat="server"> </cc1:editor> Add service class(.asmx) for whatever thing you want to do in the server side. In my case i created falconsServic...

How to call content page method from master page in ASP.NET

Image
hi,last week i had a problem with calling the content page methods from the masterpage.After spend lot of time with google finally i fond a solution for that.The solution is... In my case i have an ajax control toolkit html editor in my master page.When content loaded to the editor i have a method to trigger in master page.through that method i need to populate my content page.for populating content page i have a method in content page.but the problem is when the content is loaded i need to trigger the content page method.i dont know any other ways are available or not but my solution is first trigger the master page method and then trigger the content page method through that. my master page public partial class Falcons : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { } //this is the method that will called from editor when content loaded protected void editor_content_load(object sender, EventArgs e...