نظرات مطالب
ASP.NET MVC #5
در مورد فعال کردن MvcBuildViews  من وقتی این کارو انجام میدم با خطای زیر روبه رو می‌شم.
Error1The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\temp\93647db0\578ae027\App_Web_krwrdmvd.0.cs26
 
اشتراک‌ها
Visual Studio 2017 version 15.7.3 منتشر شد

These are the customer-reported issues addressed in 15.7.3:

Visual Studio 2017 version 15.7.3  منتشر شد
اشتراک‌ها
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 منتشر شد
فایل‌های پروژه‌ها
PdfRpt-2.7.rar
- Added .NET 3.5, 4.0 and 4.5 profiles to the NuGet package.
PM> Install-Package PdfReport
- Updated the project to use itextsharp.dll 5.5.4.0.
- Fixed issue #2392.
- Fixed reopening of MemoryStreams.
- Added `Merge In-Memory Pdf Files` sample.
- Improved Grouping/GroupingPdfReport.cs sample to show how to inject an arbitrary HTML data at the end of the each group.
اشتراک‌ها
Visual Studio 2019 version 16.2.2 منتشر شد

Top Issues Fixed in Visual Studio 2019 version 16.2.2

Security Advisory Notices

CVE-2019-1211 Git for Visual Studio Elevation of Privilege Vulnerability

An elevation of privilege vulnerability exists in Git for Visual Studio when it improperly parses configuration files. An attacker who successfully exploited the vulnerability could execute code in the context of another local user. To exploit the vulnerability, an authenticated attacker would need to modify Git configuration files on a system prior to a full installation of the application. The attacker would then need to convince another user on the system to execute specific Git commands. The update addresses the issue by changing the permissions required to edit configuration files. 

Visual Studio 2019 version 16.2.2 منتشر شد
نظرات مطالب
ساده سازی تعریف فضاهای نام در C# 10.0
یک نکته‌ی تکمیلی: وادار کردن خود به استفاده‌ی یک‌دست از این قابلیت در سراسر Solution

می‌توان با تنظیم فایل editorconfig. که در کنار فایل sln. قرار دارد، زیر تمام فضاهای نام پیشین، یک خط اخطار جهت ارتقاء به روش جدید کشید. برای اینکار تنها کافی است تنظیم زیر را به آن اضافه کنید:
[*.cs]

csharp_style_namespace_declarations = file_scoped:warning

و همچنین اگر می‌خواهید پس از این تغییر، تمام فایل‌ها را یکجا به روز رسانی کنید، در NET 6.، برنامه‌ی dotnet-format، جزء استاندارد SDK است. به همین جهت در همان ریشه‌ی sln.، دستور زیر را صادر کنید:
dotnet format
البته اگر فقط می‌خواهید لیست تغییراتی را که صورت می‌گیرند مشاهده کنید، دستور زیر را صادر کنید:
dotnet format --verify-no-changes
اشتراک‌ها
فعال سازی browser cache در ASP.NET MVC

The OutputCache attribute does not allow us to dynamically change the cache settings for the current request. As MVC and Web API both rely on different libraries I could not reuse the Web API action filter in MVC so I had to come up with a new solution. This again resulted in two simple classes. 

فعال سازی browser cache در ASP.NET MVC
نظرات مطالب
ارتقاء به ASP.NET Core 2.0 - معرفی بسته‌ی Microsoft.AspNetCore.All
یک نکته‌ی مهم: روش صحیح به روز رسانی وابستگی‌های پروژه‌های NET Core.
اگر solution شما از چندین پروژه تشکیل شده‌است، برای به روز رسانی وابستگی‌های آن، به آخرین نگارش پایدار هر کدام، از ابزار سراسری « dotnet-outdated » استفاده کنید. به این ترتیب به صورت خودکار تمام وابستگی‌های پروژه‌های شما اسکن شده و به آخرین نگارش موجود ارتقاء پیدا می‌کنند.
برای نصب آن از دستور زیر استفاده کنید:
dotnet tool install --global dotnet-outdated
و یا برای به روز رسانی نگارش موجود آن، دستور زیر را اجرا کنید:
dotnet tool update --global dotnet-outdated
پس از آن، به ریشه‌ی solution خود، جائیکه فایل sln قرار دارد، از طریق خط فرمان وارد شده و دستور زیر را اجرا کنید:
dotnet outdated -u
مزیت مهم اینکار، به روز رسانی خودکار و یک دست تمام پروژه‌های یک solution، به آخرین وابستگی‌های پایدار آن‌ها است. به این ترتیب خطاهایی مانند «MissingMethodException» را در حین کار با اجزای غیرهماهنگ با هم، دریافت نخواهید کرد.