Posts

Showing posts from May, 2020

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 එක භාවිතා කරන්න.