Posts

WinForm Application වල Metadata file '.dll' could not be found මෙන්න මෙහෙම error එකක් ආවොත්

මෙහෙම error එකක් ආවොත් වෙන්න පුළුවන් හේතු ගොඩක් තියෙනව. Severity Code Description Project File Line Suppression State Error CS0006 Metadata file 'G:\Land-Mark-Counter-Checking-System\SOURCE\LMCC_System\BusinessLogicLayer\bin\Debug\BusinessLogicLayer.dll' could not be found PresentationLayer.Windows G:\Land-Mark-Counter-Checking-System\SOURCE\LMCC_System\LMCC_System\CSC 1 Active  ඒනිසා මෙන්න මේකයි කියල විශේෂ හේතුවක් කියන්න බෑ. මේකට මට solution එක උනේ, Visual Studio එක close කරල .suo යන file delete කරන්න. ඊළගට project එක නැවත open කරල run කරන්න. එතකොට නැවත .suo කියන file generate වෙනව. බොහෝවිට මේ වැඩේ කරාම ඔය අවුල හරියනව. මේක හොද reference link එකක් බලන්න .

This page isn't working කියන අවුල?

Image
ASP.Net Core Web API එකක් Azure ඒකට  publish කලාට පස්සෙ ඔන්න ඔහොම අවුලක් ආව අවුල ආවෙ Firewall අවුලක්. සාමාන්‍යයෙන් ගොඩක් වෙලාවට Firewall issue එකක් තමයි ඕක අනික් ඔක්කොම හරිනම්.

ASP.Net Core වල Controller එකක් add කරනකොට එන මෙන්න මේ error

Image
there was an error running the selected code generator: value cannot be null (parametrer "connectionstring") ASP.Net Core වල මෙන්න මේ  error එක එන්න හේතුවක් වෙනව ConnectionStrings කියන වචනයේ අකුරු හරියට තිබුන් නැතිනම්. නිවැරදි ආකාරයෙන් ConnectionString යන්න ඇතුලත් කල විට මේ ගැටලුව විසදෙනව. "ConnectionStrings": {     "StudentDBConnectionString": "Server=(localdb)\\MSSQLLocalDB;Database=StudentRegDB;Integrated Security=True;"   },

The term 'Scaffold-DbContext' is not recognized as the name of a cmdlet, function, script file, or operable program අවුල හදාගන්නෙ

Image
කලින් හදල තිබුන SQL Server database එකක් Entity Framework Core එකත් එක්ක සම්බන්ද කරනකොට, EF Model base එක හදාගන්නකොට Scaffold-DbContext "Server=(localdb)\MSSQLLocalDB; Database=StudentRegDB; Trusted_Connection=True;" ඔන්න ඔය command එක run කරනකොට ඔයවගේ error එකක් ආවොත් අපී Microsoft.EntityFrameworkCore.SqlServer මේ package එක install කරල තිබුනට මදි. එකට Microsoft.EntityFrameworkCore.Tools මෙන්න මේ package එකත් install කරල තියෙන්න ඕන. අන්න එක නැති නිසයි ඔය. Scaffold-DbContext : The term 'Scaffold-DbContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + Scaffold-DbContext "Server=(localdb)\MSSQLLocalDB; Database=StudentRe ... + ~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Scaffold-DbContext:String) [], CommandNotFoundException + FullyQualifiedErrorId : Com...

UseInMemoryDatabse කියන method එක use කරන්න බැරිව error එකක් ආවොත්

Image
Error CS1061 'DbContextOptionsBuilder' does not contain a definition for 'UseInMemoryDatabase' and no extension method 'UseInMemoryDatabase' accepting a first argument of type 'DbContextOptionsBuilder' could be found (are you missing a using directive or an assembly reference?) අපි ASP.Net Core EF කියන nuget package එක Microsoft.EntityFrameworkCore.SqlServer  අපේ project එකට install කරල තියෙද්දිත් අපිට  UseInMemoryDatabse කියන method එක call කරන්න බැරි අපි සදහා තවත් nuget package එකක් install කල යුතු වෙනව. Microsoft.EntityFrameworkCore.InMemory මෙන්න මේ package එක. ඊට පස්සේ පුළුවන් UseInMemoryDatabase කියන method එක භාවිතා කරන්න. 

Angular පළමු වරට Serve කරද්දී එන "Running scripts is disabled on this system" කියන error එක?

Image
මෙන්න මෙහෙම error එකක් ආවොත් පළමුවරට Angular install කරල VS Code එකේ terminal එකේ ng serve --open ගහල project එක run කරනකොට.  ඉතින් ඒකට හේතුව තමයි poweshell වල execution policy වල default විදියට scripts run කරන්න දෙන්නෙ නෑ. අන්න ඒ නිසයි ඔහොම වෙන්නෙ. ඉතින් ඒක හදාගන්න පුළුවන් poowershell එක open කරගෙන Set-ExecutionPolicy RemoteSigned මෙන්න මෙහෙම ගහල run කරල yes දෙන්න. එතකොට වැඩේ හරි. වැඩි විස්තර, https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7 https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-powershell-1.0/ee176961(v=technet.10)?redirectedfrom=MSDN

Child list for field “ ” cannot be created කියන error එක එන්නෙ ඇයි data load කරනකොට

Image
Windows Form Application එකක DataGridView එකකට data load කරන ක්‍රම කිහිපයක් තිබුනත් එයින් එකක් තමයි DataSet එකක් භාවිතා කරල data load kකරන එක. මෙලෙස data load කරනකොට  System.ArgumentException: 'Child list for field Table_Surveyor_Type cannot be created.' මෙන්න මේ error එක එන්න හේතුව තමයි, DataSet එකක් කියන්නෙ ඇත්තටම අපේ සම්පුර්ණ database එකේ කොපියක් වගේ, ඉතින් එතකොට ඒකෙ ඇතුලේ අපේ database එකේ තියෙන table සියල්ල තියෙනව. එමනිසා අපි මොන table එකේ' data ද DataGridView එකට load කරන්නෙ කියල කියන්න වෙනව. අන්න එහෙම දෙනකොට වැරදි නමක් දීල තිබුනොත් ඔන්න ඔය error එක එනව.                     SqlDataAdapter da = new SqlDataAdapter(cmd);                     da.Fill(ds, " Table_Division ");