اشتراک‌ها
ویژوال استودیو برای مک رسما منتشر شد!

Designed natively for the Mac

Visual Studio for Mac brings the developer productivity you love to the Mac. The experience has been meticulously crafted to optimize the developer workflow for the Mac.

Collaborate efficiently

Manage your code in Git repos, hosted by any provider, including GitHub and Visual Studio Team Services. Share projects seamlessly with developers using Visual Studio across Windows and Mac. 

ویژوال استودیو برای مک رسما منتشر شد!
اشتراک‌ها
شروع کار با Visual Studio 2017 برای Mac

On 16th November 2016, Nat Friedman and James Montemagno introduced Visual Studio for Mac, the newest member of the Visual Studio family at Connect(); 2016 event. I thought let's give it a try so I installed the same and went through the project templates available in it. This blog is kind of a getting started guide to install Visual Studio For Mac. 

شروع کار با Visual Studio 2017 برای Mac
اشتراک‌ها
معرفی سیستم Credential Manager گیت در ویندوز 10

Secure password storage in the Windows Credential Store

Multi-factor authentication support for Visual Studio Team Services.

Two-factor authentication support for GitHub

Personal Access Token generation and usage support for Visual Studio Team Services and GitHub

Non-interactive mode support for Visual Studio Team Services backed by Azure Directory

Optional settings for build agent optimization 

معرفی سیستم Credential Manager  گیت در ویندوز 10
اشتراک‌ها
مقدمه ای بر Visual Studio Dev

Visual Studio Dev Essentials is a new free developer offering from Microsoft. A free membership to this program gives you access to a range of benefits including developer tools and services, training and support. This video provides an overview of some key benefits, including Visual Studio Community, Visual Studio Team Services, Pluralsight training, and HackHands live programming help 

مقدمه ای بر Visual Studio Dev
اشتراک‌ها
امکان دیباگ کردن برنامه هایی که پلتفرم مقصدشان لینوکس است در ویژال استدیو

Microsoft has released a preview of its new Visual Studio GDB extension, contributing to their ongoing effort to make Visual Studio support as many development environments as possible.  Microsoft's Marc Goodner has provided details of this new ability, which can be used with Visual Studio 2015 Community edition or higher.  

امکان دیباگ کردن برنامه هایی که پلتفرم مقصدشان لینوکس است در ویژال استدیو
اشتراک‌ها
کتاب Visual Studio 2015 Succinctly

In Visual Studio 2015 Succinctly, author Alessandro Del Sole explains how to take advantage of the highly anticipated features in Microsoft Visual Studio 2015. Topics include sharing code between different types of projects, new options for debugging and diagnostics, and improving productivity with other services in the Visual Studio ecosystem, such as NuGet and Azure.

کتاب Visual Studio 2015 Succinctly
اشتراک‌ها
10 ویژگی عالی از Visual Studio Code
Enter Visual Studio Code – a free, lean, cross-platform version of your beloved Visual Studio. With a lightweight installation, you can enjoy most full-featured benefits of Visual Studio on a Windows, Mac or Linux machine. This article highlights 10 of the compelling features of VS Code, which aims to be your one-stop rich code editor across any developer platform.
10 ویژگی عالی از Visual Studio Code
مطالب
مشکل توزیع در توسعه نرم افزار‌های WindowsCE
در حین توسعه نرم افزاری برای ویندوز کامپکت مرتبا به خطاهایی که قبلا برنخورده بودم میرسیدم. چند باری هم کارهای انجام شده را بررسی کردم و در فوروم‌های مرتبط دنبال سرنخی از راه حل گشتم ولی یا جوابی مرتبط وجود نداشت و یا راه حل‌های پیشنهادی دور از حل مسئله بود؛ تا اینکه یکی از خطا‌ها نظرم را جلب کرد:
Could not load type 'System.Windows.Forms.Form' from assembly 'System.Windows.Forms, Version=3.5.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC'.
System.Windows.Forms 3.5.7283.0 but 3.5.0.0 windows CE
پس از بررسی کلی دستگاه و راهنمای آن متوجه شدم ویندوزی که برای دستگاه ساخته شده، به صورت پیش فرض دارای دات نت نصب شده‌است. من هم از دات نت نسخه‌ی سه با سرویس پک یک و ویندوز کامپکت نسخه‌ی 6 استفاده میکردم. در حین اجرا و دیباگ برنامه بر روی دستگاه، اگر نسخه‌ای از دات نت نصب باشد، زحمت به‌روز کردن دات نت را برای توزیع نمی‌دهد و برنامه به مشکل بر می‌خورد. راه حل این مشکل هم ساخت ویندوز جدید بدون دات نت فریمورک است که حدود یک ساعت و نیم زمان می‌برد:

برای انجام این فرآیند احتیاج به نصب مقدماتی بر روی یک ویندوز تازه است که ترتیب نصب آن نیز بسیار مهم است:
1. Microsoft Visual Studio 2005
2. Microsoft Visual Studio 2005  Service Pack 1
3. Microsoft Windows Embedded CE 6.0 Toolkit
4. Windows Embedded CE 6.0 Platform Builder Service Pack 1
5. Windows Embedded CE 6.0 R2
6. Windows Embedded CE 6.0 R3
نظرات مطالب
تهیه خروجی PDF و اکسل از حاصل جستجوی پویای jqGrid به کمک PDF Report
متاسفانه با تایپ  فرمان   بالا پیغام  زیر  صادر  می‌گردد

Update-Package : A parameter cannot be found that matches parameter name 'reinstall'.
At line:1 char:26
+ update-package -reinstall <<<< 
    + CategoryInfo          : InvalidArgument: (:) [Update-Package], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,NuGet.PowerShell.Commands.UpdatePackageCommand
مطالب
فعالسازی امکانات Refactoring افزونه‌ی Roslynator در VSCode
یکی از قابلیت‌های افزونه‌ی C# for Visual Studio Code پس از نگارش 1.10.0 آن، امکان بارگذاری افزونه‌های مخصوص Roslyn است که قابلیت‌های Refactoring را به همراه دارند؛ مانند افزونه‌ی معروف و جامع Roslynator. البته هنوز افزونه‌های Analyzers مبتنی بر Roslyn، با VSCode سازگاری ندارند که قرار است در نگارش‌های آتی افزوده شوند. در این مطلب، نحوه‌ی فعالسازی افزونه‌های Roslyn refactoring ثالث را بررسی خواهیم کرد.


فعالسازی قدم به قدم Roslyn refactoring افزونه‌ی Roslynator

الف) فایل VSIX آن‌را از اینجا دریافت کنید و سپس پسوند آن‌را به zip تغییر دهید.
ب) این فایل zip را در پوشه‌ای مشخص باز کنید.
ج) پس از باز کردن این فایل zip، دو فایل Roslynator.VisualStudio.Core.dll و Roslynator.VisualStudio.dll آن‌را حذف کنید. این فایل‌ها مخصوص نگارش کامل ویژوال استودیو هستند و در صورت وجود، با سیستم بارگذاری افزونه‌های OmniSharp تداخل می‌کنند.
د) در آخر مسیر زیر را گشوده:
%USERPROFILE%/.omnisharp
و سپس فایل جدید omnisharp.json را با محتوای ذیل، در آن مسیر ایجاد کنید:
{
  "RoslynExtensionsOptions": {
    "LocationPaths": [
      "C:\\lib\\roslynator"
    ]
  }
}
که در اینجا مسیر ذکر شده، به پوشه‌ای اشاره می‌کند که فایل zip افزونه را در آنجا گشوده‌اید (به ذکر \\ هم دقت داشته باشید؛ تا فایل json نهایی، به درستی تشکیل شود).

اکنون اگر VSCode را اجرا کنید، شاهد افزوده شدن امکانات Refactoring مخصوص افزونه‌ی Roslynator به لیست Refactoring پیش‌فرض OmniSharp خواهید بود:



خودکار سازی دریافت، نصب و فعالسازی Roslyn refactoring افزونه‌ی Roslynator

مراحل فوق را می‌توان تبدیل به یک اسکریپت پاورشل کرد که با هر بار اجرای آن، به صورت خودکار کار دریافت و نصب این افزونه صورت گیرد:
Write-Host "Download, unzip and enable Roslynator for Visual Studio Code"

$name = "josefpihrt.Roslynator2017"
$url = "https://marketplace.visualstudio.com/items?itemName=$name"
$currentDir = $PSScriptRoot
$file = "$currentDir\Roslynator.zip"

$pattern = "<script class=`"vss-extension`" defer=`"defer`" type=`"application\/json`">(.*?)<\/script>"
$regex = [regex]"(?m)$pattern"
Write-Host "Grab the home page of the $name."
$dom = (New-Object Net.WebClient).DownloadString($url); 
if($dom -and $dom -match $pattern) 
{
    $matches = $regex.Match($dom)
    $jsonText = $matches[0].Groups[1]

    $json = ConvertFrom-Json $jsonText

    $version = $Json.versions[0].version # Parse the json in the page for the latest version number
    $parts = $name.Split(".")
    $publisher = $parts[0]
    $package = $parts[1]

    # Assemble the url for the vsix package
    $packageUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/$publisher/vsextensions/$package/$version/vspackage"
    Write-Host "Download the vsix package: $packageUrl"
    (New-Object Net.WebClient).DownloadFile($packageUrl, $file)

    Write-Host "Using $currentDir as the current dir."
    Write-Host "Unzip $file."
    $shellApp = new-object -com shell.application 
    $zipFile = $shellApp.namespace($file) 
    $destination = $shellApp.namespace($currentDir) 
    $destination.Copyhere($zipFile.items(), 0x14)# overwrite and be silent

    Write-Host "Delete VS specific files. Otherwise they will interfere with the MEF services inside OmniSharp."
    Remove-Item "$currentDir\Roslynator.VisualStudio.Core.dll","$currentDir\Roslynator.VisualStudio.dll", "$currentDir\Roslynator.VisualStudio.pkgdef"

    $omnisharpJsonFilePath = "$env:USERPROFILE\.omnisharp\omnisharp.json";
    Write-Host "Create $omnisharpJsonFilePath file."
    $omnisharpJson = @" 
{{
  "RoslynExtensionsOptions": {{
    "LocationPaths": [
      "{0}"
    ]
  }}
}}
"@ -f $currentDir -Replace "\\","\\"
    $omnisharpJson | Out-File "$omnisharpJsonFilePath" -Confirm

    Write-Host "Done!"
}
else
{
    Write-Host "Failed to find the packageUrl!"
}
کدهای فوق را با نام فرضی update.ps1 ذخیره کنید (و یا از اینجا دریافت کنید: update.zip ). سپس می‌توانید آن‌را با اجرای دستور update.ps1\.، اجرا کرده و به صورت خودکار شاهد این مراحل باشید:
PS D:\Prog\1396\RoslynatorVSCode> .\update.ps1
Download, unzip and enable Roslynator for Visual Studio Code
Grab the home page of the josefpihrt.Roslynator2017.
Download the vsix package: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/josefpihrt/vsextensions/Roslynator2017/1.7.0/vspackage
Using D:\Prog\1396\RoslynatorVSCode as the current dir.
Unzip D:\Prog\1396\RoslynatorVSCode\Roslynator.zip.
Delete VS specific files. Otherwise they will interfere with the MEF services inside OmniSharp.
Create C:\Users\Vahid\.omnisharp\omnisharp.json file.

Confirm
Are you sure you want to perform this action?
Performing the operation "Output to File" on target "C:\Users\Vahid\.omnisharp\omnisharp.json".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):
Done!
ابتدا صفحه‌ی اصلی این افزونه دریافت می‌شود. سپس از داخل آن، پارامترهای مخصوص دانلود افزونه استخراج و آدرس دریافت نهایی آن تشکیل می‌شود.
در ادامه این افزونه دریافت شده و در پوشه‌ی جاری باز خواهد شد. سپس فایل omnisharp.json نیز به صورت خودکار تشکیل و مقدار دهی می‌شود.
اکنون اگر VSCode را اجرا کنید، همه چیز آماده بوده و امکانات این افزونه در دسترس خواهند بود.