اشتراک‌ها
Bootstrap 4 alpha منتشر شد
  • Moved from Less to Sass
  • Improved grid system
  • Opt-in flexbox support is here
  • Dropped wells, thumbnails, and panels for cards
  • Consolidated all our HTML resets into a new module, Reboot
  • Brand new customization options
  • Dropped IE8 support and moved to rem and em units
  • Rewrote all our JavaScript plugins
  • Improved auto-placement of tooltips and popovers
  • And tons more!  
Bootstrap 4 alpha منتشر شد
اشتراک‌ها
Visual Studio 2019 RC منتشر شد
Visual Studio 2019 RC منتشر شد
نظرات مطالب
Implementing second level caching in EF code first
من هنگام cache کردن برخی از queryها با این خطا روبرو شدم:
System.InvalidOperationExceptionWhen called from 'VisitMemberInit', rewriting a node of type 'System.Linq.Expressions.NewExpression' must return a non-null value of the same type. Alternatively, override 'VisitMemberInit' and change it to not visit children of this type. 
برای حل اون این کد رو به کلاس داخلی SubtreeEvaluator در کلاس Evaluator در فایل QueryResultCache.cs اضافه کردم:
protected override Expression VisitMemberInit(MemberInitExpression node)
 {
       if (node.NewExpression.NodeType == ExpressionType.New) 
            return node;
        return base.VisitMemberInit(node);
 }
اشتراک‌ها
BenchmarkDotNet v0.10.13 منتشر شد

BenchmarkDotNet v0.10.13 has been released! This release includes:

  • Mono Support for DisassemblyDiagnoser: Now you can easily get an assembly listing not only on .NET Framework/.NET Core, but also on Mono. It works on Linux, macOS, and Windows (Windows requires installed cygwin with obj and as). (See #541)
  • Support ANY CoreFX and CoreCLR builds: BenchmarkDotNet allows the users to run their benchmarks against ANY CoreCLR and CoreFX builds. You can compare your local build vs MyGet feed or Debug vs Release or one version vs another. (See #651)
  • C# 7.2 support (See #643)
  • .NET 4.7.1 support (See 28aa94)
  • Support Visual Basic project files (.vbroj) targeting .NET Core (See #626)
  • DisassemblyDiagnoser now supports generic types (See #640)
  • Now it's possible to benchmark both Mono and .NET Core from the same app (See #653)
  • Many bug fixes (See details below) 
BenchmarkDotNet v0.10.13 منتشر شد
اشتراک‌ها
NET 6 Preview 5. منتشر شد

We’re now in the second-half of the .NET 6 release, and starting to see significant features coming together. A great example is .NET SDK Workloads, which is the foundation of our .NET unification vision and enables supporting more application types.  

NET 6 Preview 5. منتشر شد
نظرات مطالب
کار با Docker بر روی ویندوز - قسمت اول - Container چیست؟
اخیراً Docker Desktop از WebAssembly پشتیبانی میکند. به این معنا که بدون نیاز به یک کانتینر خاص میتوانیم توسط یک Wasm runtime با نام WasmEdge اپلیکیشن‌های وب‌اسمبلی را اجرا کنیم. در واقع توسط این runtime رفتار یک کانتینر شبیه‌سازی شده است بدون اینکه ایمیج کانتینر حاوی OS یا runtime context باشد. با این اوصاف میتوانیم یک پروژه NET.ی را توسط Wasi.Sdk به Wasm تبدیل کنیم و آن را درون Docker به صورت مستقیم اجرا کنیم:

dotnet new console -o MyFirstWasiApp
cd MyFirstWasiApp
dotnet add package Wasi.Sdk --prerelease
dotnet build
اگر به مسیر bin/Debug/net7.0 مراجعه کنید خواهید دید که MyFirstWasiApp.wasm نیز تولید شده است؛ از دستور wasmtime برای اجرای آن نیز میتوانیم استفاده کنیم:
wasmtime bin/Debug/net7.0/MyFirstWasiApp.wasm
در ادامه میتوانیم یک Dockerfile ایجاد کرده و خروجی Wasm applicationمان را به اصطلاح containerised کنیم:
FROM scratch

COPY bin/Debug/net7.0/MyFirstWasiApp.wasm MyFirstWasiApp.wasm

ENTRYPOINT [ "MyFirstWasiApp.wasm" ]
برای بیلد کردن ایمیج فوق میتوانیم از دستور زیر استفاده کنیم:
docker buildx build . --file=Dockerfile --tag=dotnet-webassembly --platform wasi/wasm32
در اینجا با کمک فلگ platform به Docker گفته‌ایم که برای ساخت ایمیج موردنظر از معماری Wasm استفاده کند؛ به این معنا که برای کامپیوترهای مختلف نیاز نخواهد بود که ایمیج‌های جداگانه‌ایی تهیه کنیم بلکه wasm runtime اینکار را برای ما به صورت خودکار انجام خواهد داد. در نهایت بعد از ایجاد ایمیج میتوانیم از دستور docker run برای اجرای Wasm applicationمان استفاده کنیم:
docker run --runtime=io.containerd.wasmedge.v1 --platform=wasi/wasm32 dotnet-webassembly
نکته: برای اجرای Wasm application باید مطمئن شوید که فیچر containerd image store فعال باشد:


دقت داشته باشید که این فیچر هنوز در مرحله Beta قرار دارد؛ و ممکن است در حین تهیه ایمیج با edge caseهای روبرو شوید به عنوان مثال من سعی کردم یک وب‌سرور ASP.NET Core (توسط Wasi.Sdk این امکان وجود دارد) را containerised کنم که در نهایت با خطای زیر مواجه شدم:

[error] instantiation failed: incompatible import type, Code: 0x61
     Mismatched function type. Expected: FuncType {params{i32 , i32 , i32} returns{i32}} , Got: FuncType {params{i32 , i32} returns{i32}}
     When linking module: "wasi_snapshot_preview1" , function name: "sock_accept"
     At AST node: import description
     At AST node: import section
     At AST node: module


اشتراک‌ها
Bootstrap 5 Beta 2 منتشر شد

Our second beta has arrived for Bootstrap 5! We delayed its release to iron out some issues with third-party libraries and stabilize our major changes. We’ve also once again shipped some awesome updates to our documentation. 

Bootstrap 5 Beta 2 منتشر شد
اشتراک‌ها
NET 7.0.201. منتشر شد

The .NET 7.0.201 release is available for download. This SDK includes the previously released .NET 7.0.3 Runtime and is in support of Visual Studio 17.5 release.  

NET 7.0.201. منتشر شد