نظرات مطالب
NuGet 2.0 منتشر شد
درهر حالتی اگه شما بخواین نسخه ای از نوگت رو به روز رسانی بکنین یکسری خطاهایی ممکنه به وجود بیاد. البته ظاهرا این مشکل نوگت نیست (^ و ^) بلکه به یه ایرادهای خاص در Visual Studio Extension manager بر میگرده (^ و ^) : Hotfix و یا این مورد:

Attempting to install or uninstall results in the error "Cannot create a file when that file already exists.”
For some reason, Visual Studio extensions can get in a weird state where you've uninstalled the VSIX extension, but some files were left behind. To work around this issue:

1. Exit Visual Studio
2. Open the following folder (it might be on a different drive on your machine)
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\<version>\
3. Delete all the files with the .deleteme extensions.
4. Re-open Visual Studio
After following these steps, you should be able to continue.

اشتراک‌ها
الگوهای طراحی، الگوهای رفتاری [Behavioral Design Patterns] (مقاله سوم)
طی ماه‌های اخیر مجموعه ای سه گانه از مقالات الگوهای طراحی در Code Project منتشر شده‌اند.
قسمت اول - الگوهای سازنده (Best C# article of July 2012 - Best overall article of July 2012)
قسمت دوم - الگوهای ساختاری

الگوهای طراحی، الگوهای رفتاری [Behavioral Design Patterns] (مقاله سوم)
نظرات مطالب
آشنایی با Refactoring - قسمت 5
سلام وخسته نباشید
آیا نرم افزار   Clone detective     برای نسخه  vs 2012  وجود دارد یا خیر؟
من نرم افزار فوق را در  vs 2012 نصب کردم ولی تولبار آن نمایش داده نمیشود 
لطفا راهنمایی کنید 
مطالب Refactoring بسیار مفید بود
تشکر
اشتراک‌ها
انتشار ویژوال استدیو ۲۰۲۲ نگارش 17.5

For .NET and cloud developers, we’ve focused on improving the inner-loop dev experience. New .http/.rest files make it easier to test and iterate on your APIs directly in Visual Studio, while improved Dev Tunnels help streamline the configuration and management of your webhooks. We’ve also made it easier than ever to deploy your ASP.NET apps to containers.

Game developers can now view properties from base classes modified in an Unreal Blueprint asset without leaving the IDE. Visual Studio has improved the cross-platform development experience with a new remote file explorer, Linux Console output to the Integrated Terminal window, dev container improvements, and more.

Beyond individuals, Visual Studio also has new features to better support dev teams at scale, with exportable configuration files and a persistent update toggle helping ensure everyone on your team is working from the latest version of the tool.

This blog covers several of the top new features in Visual Studio 17.5—to see some in action, watch the Visual Studio 17.5 release video. As always lot of these features come straight from your feedback and suggestions. Your feedback is critical to help us make Visual Studio the best tool it can be! 

انتشار ویژوال استدیو ۲۰۲۲ نگارش 17.5
نظرات مطالب
شروع کار با Apache Cordova در ویژوال استودیو #3
سلام
من Visual Studio Tools for Apache Cordova CTP3.1 رو کامل نصب کردم 
اون پیغام Getting started with Visual Studio رو هم نشون داد ولی موقع اجرا با Ripple یا build پروژه با پیغام زیر مواجه میشم و برنامه اجرا نمیشه و  هیچ اروری هم تو Error List نیست 
ممنون میشم اگه راهنمایی کنید
------ Build started: Project: BlankCordovaApp4, Configuration: Debug Android ------
1>  GeneratedJavascript=scripts\index.js;scripts\index.js.map;scripts\platformOverrides.js;scripts\platformOverrides.js.map
1>  D:\Project Dot Net\BlankCordovaApp4\BlankCordovaApp4>call "C:\Program Files (x86)\nodejs\"\nodevars.bat 
1>  Your environment has been set up for using Node.js 0.12.7 (ia32) and npm.
1>  ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\MH2WEJOO.42Y\packages\vs-mda
1>  ------ Name from source package.json: vs-mda
1>  ------ Version from source package.json: 0.1.75
1>  ------ Current globally installed version: 0.1.75
1>  ------ Package already installed globally at correct version.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

اشتراک‌ها
Visual Studio 2019 version 16.2.3 منتشر شد
  • Fixed: Android SDK not found after upgrade to 16.2
  • Fixed: VS won't start after update with message tht setup is complete.
  • Fixed an issue resulting in an installer verification or manifest verification fail when user is updating through the setup UI.
  • Fixed an issue that caused Visual Studio to crash or stop responding during shutdown.
  • Fixed a timing-related issue while saving changed Xamarin.Android project properties or building the project that resulted in the product to stop responding.
  • Fixed an issue with Visual Studio crashing when C# users typed above a namespace.
  • Fixed an issue preventing SSIS packages from successfully running in some circumstances after reloading a solution. 
Visual Studio 2019 version 16.2.3 منتشر شد
اشتراک‌ها
Visual Studio 2017 15.5.7 منتشر شد

Team Explorer support for TLSv1.2

  • We have updated the Git and the Git Credential Manager components that ship in Visual Studio.
  • The optional Git for Windows component has also been updated.
  • This update allows Git to connect to services that have deprecated support for TLSv1 and TLSv1.1 in favor of TLSv1.2.

Issues Fixed in this Release

These are the customer-reported issues addressed in this release:

  • Projects targeting .NET Core 2.1 or newer are not supported by Visual Studio 2017 version 15.5.
  • Fixed issue where installation of the SDK for .NET Core 2.1 or newer would cause the option to create ASP.NET Core 2.0 Web applications to disappear. 
Visual Studio 2017 15.5.7 منتشر شد
مطالب
FxCop برای SQL Server

حتما با FxCop که برای آنالیز اسمبلی‌های برنامه‌های دات نتی بکار می‌رود آشنایی دارید. شبیه به این مورد به صورت افزونه‌ای برای Visual studio 2008 team system نیز موجود است. فقط کافی است Microsoft® Visual Studio Team System 2008 Database Edition GDR R2 را نصب کرده و یک پروژه دیتابیس جدید را شروع کنید (نوع database wizard که یک دیتابیس کامل را import می‌کند). سپس در برگه build تیک مربوط به code analysis را قرار دهید (شکل 1) و یکبار پروژه را build کنید. به این صورت در پنجره خروجی، اشکالات کدهای T-SQL شما گوشزد می‌شود (شکل 3). این‌کار را با استفاده از منوی Data نیز می‌توان انجام داد (شکل 2).

شکل 1- فعال سازی تحلیل و بررسی کد

شکل 2- اجرای تحلیل و بررسی کد


شکل 3- یک نمونه خروجی حاصل از تحلیل و بررسی کد


نظرات مطالب
کوئری نویسی در EF Core - قسمت ششم - کار با تاریخ و زمان
اگر جستجوی مدنظر چنین شکلی را داشته باشد:

مدلسازی نمونه‌ی آن به صورت زیر است:

    public class UIModel
    {
        public int PersianYear { set; get; }

        public int[] SelectedPersianMonths { set; get; }
    }
برای مثال اگر اطلاعات دریافتی از کاربر به صورت زیر باشد:
var model = new UIModel
{
    PersianYear = 1391,
    SelectedPersianMonths = new[] { 4, 5 }
};
کوئری گرفتن بر اساس ماه‌های انتخابی را (new DateTime را می‌توانید با پارامتر PersianCalendar تعریف کنید و ... کار می‌کند) باید بر اساس OR نوشت (حالت پیش‌فرض زنجیروار نوشتن Whereها And است):
var itemsQuery = context.Members.AsQueryable();

// Linq chaining where clauses as an `Or` instead of `And`
var predicate = PredicateBuilder.False<Member>();

foreach (var month in model.SelectedPersianMonths)
{
    var start = new DateTime(model.PersianYear, month, 1, new PersianCalendar());
    var end = new DateTime(model.PersianYear, month, month <= 6 ? 31 : 30, new PersianCalendar());

    // We can chain `IQueryable`s.
    // itemsQuery = itemsQuery.Where(x => x.JoinDate.Date >= start && x.JoinDate.Date <= end);
    // But it will be translated as an `AND`, not `OR`

    predicate = predicate.Or(x => x.JoinDate.Date >= start && x.JoinDate.Date <= end);
}

itemsQuery = itemsQuery.Where(predicate);

var items = itemsQuery.Select(x => new { x.FirstName, x.Surname }).ToList();
که یک چنین خروجی SQL ای را تولید می‌کند:
SELECT [m].[FirstName],
       [m].[Surname]
FROM   [Members] AS [m]
WHERE  ((CONVERT (DATE, [m].[JoinDate]) >= '2012-06-21T00:00:00')
        AND (CONVERT (DATE, [m].[JoinDate]) <= '2012-07-21T00:00:00'))
       OR ((CONVERT (DATE, [m].[JoinDate]) >= '2012-07-22T00:00:00')
           AND (CONVERT (DATE, [m].[JoinDate]) <= '2012-08-21T00:00:00'));
مثال کامل آن