@manhng

Welcome to my blog!

Windows 10 & Visual Studio 2019 Tools

May 29, 2021 15:05

Windows 10 & Visual Studio 2019 Tools (edit)

Download Windows 10 SDK
Windows 10 SDK - Windows app development (microsoft.com)

Download Visual Studio 2019 Enterprise
Download Visual Studio 2019 for Windows & Mac (microsoft.com)

Download StandaloneProfiler & RemoteTools
https://aka.ms/vs/16/release/RemoteTools.amd64ret.enu.exe
https://aka.ms/vs/16/release/StandaloneProfiler.amd64ret.enu.exe

1) Dumpchk.exe

Bạn có thể dùng Dump Check Utility (Dumpchk.exe) để xem file *.dmp

2) icACLs là viết tắt của Integrity Control Access Control List

C:\Windows\system32\icacls.exe

3) cACLs là viết tắt của control Access Control List

C:\Windows\system32\cacls.exe

4) xCopy.exe

C:\Windows\System32\xcopy.exe

5) AppCmd.exe

C:\Windows\System32\inetsrv\appcmd.exe

6) MSBuild.exe

Location of MSBuild.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe

7) InstallUtil.exe

Tool dùng để cài đặt Windows Service

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe

8) Csc.exe

Tự biên dịch C# Console bằng DOS với csc.exe

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe

9) WinDbg.exe & Gflags.exe

C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\

C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\windbg.exe

C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\gflags.exe

Các đường dẫn của các tools trong Visual Studio 2019 Enterprise

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise

C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Performance Tools\Setups\vs_profiler_x64_enu.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Performance Tools\Setups\vs_profiler_x86_enu.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VsRegEdit.exe

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\VSPerfASPNetCmd.exe

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\x64\VSPerfCLREnv.cmd

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\x64\VSPerfCmd.exe

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\x64\VSPerfMon.exe

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\x64\VSPerfSrv.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Performance Tools\vsinstr.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Performance Tools\vsinstr.legacy.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Performance Tools\VSPerfReport.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\DiagnosticsHub\Collector\VSDiagnostics.exe

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe

Các đường dẫn của các tools trong Windows 10 SDK

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\xsd.exe

Các đường dẫn của SQL Server Local DB

C:\Users\manhn\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances

Các đường dẫn của .NET Framework

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework

Các đường dẫn của các IIS Tools

C:\Windows\system32\icacls.exe
%windir%\system32\icacls.exe


C:\Windows\system32\inetsrv\appcmd.exe
%windir%\system32\inetsrv\appcmd.exe

Cách tìm đường dẫn của Visual Studio ở trên máy sau khi cài đặt

"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild

 

Các đường dẫn mà developer hay dùng

%ProgramData% ( C:\ProgramData )

%ProgramFiles% ( C:\Program Files )

%ProgramFiles(x86)%  ( C:\Program Files (x86) )

%SystemRoot% ( C:\Windows thư mục gốc của hệ điều hành)

%WinDir% ( C:\Windows thư mục gốc của hệ điều hành)

%LocalAppData% ( C:\Users\manhn\AppData\Local )

%AppData% ( C:\Users\manhn\AppData\Roaming )

%SystemRoot%\Minidump\ ( chứa các tệp Windows Memory Dump có phần mở rộng .dmp là những file hệ thống được lưu trữ ở định dạng nhị phân)

C:\windows\System32\drivers\etc\hosts ( chứa tệp hosts lưu trữ tên miền Domain được trỏ tới hoặc thông tin của các máy chủ )

%WINDIR%\Microsoft.NET\Framework64

C:\Windows\Microsoft.NET\Framework64\v4.0.30319 ( chứa chương trình cài Windows Service )

%WINDIR%\Microsoft.NET\Framework

C:\Windows\Microsoft.NET\Framework\v4.0.30319 ( chứa chương trình cài Windows Service )

On a 64-bit machine running in 64-bit mode:

  • echo %programfiles% ==> C:\Program Files
  • echo %programfiles(x86)% ==> C:\Program Files (x86)

On a 64-bit machine running in 32-bit (WOW64) mode:

  • echo %programfiles% ==> C:\Program Files (x86)
  • echo %programfiles(x86)% ==> C:\Program Files (x86)

On a 32-bit machine running in 32-bit mode:

  • echo %programfiles% ==> C:\Program Files
  • echo %programfiles(x86)% ==> %programfiles(x86)%

Những phần mở rộng file có thể ẩn chứa nguy hiểm, cân nhắc trước khi click, tải về (quantrimang.com)

Using Standard MSBuild Paths with Visual Studio

This section lists the default MSBuild paths for Visual Studio and is intended for informational purposes only.

You can install Visual Studio 2015 and later in a custom path. You need to add the custom path to MSBuild, based on the listed path patterns. A custom path follows the same patterns shown here, starting after the Program Files (x86) directory.

For Visual Studio 2017 and 2019, the first two paths with a Professional directory differ based on your edition of Visual Studio. As appropriate, you can replace Professional with Enterprise or Community. The Visual Studio Preview installation also changes the path based on Enterprise, Professional, or Community.

Tạo ứng dụng Command Line bằng C#

Command-line Building With csc.exe (Part 1) | Nixforest (wordpress.com)

Command-line Building With csc.exe (Part 2) | Nixforest (wordpress.com)

Visual Studio 2019

  • Standard Visual Studio Paths

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\amd64\

  • Visual Studio Preview Paths

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin

  • C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\amd64\
  • MSBuild Tools Paths

    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\

    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\amd64\

Visual Studio 2017

  • Standard Visual Studio Paths

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\amd64\

  • Visual Studio Preview Paths

    C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\15.0\Bin

  • MSBuild Tools Paths

    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\

    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\

Visual Studio 2015

  • C:\Program Files (x86)\MSBuild\14.0\Bin\
  • C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\

How to use Windbg.exe to collect a memory dump

Getting Started with WinDbg (User-Mode) - Windows drivers | Microsoft Docs

Environment

  • Microsoft Windows: All Supported Versions

Objective

This article provides step by step instructions on how to collect a memory dump when application crashes for all other reasons besides an access violation. 

Resolution

  1. Download Windbg at Download Debugging Tools for Windows - WinDbg - Windows drivers
  2. Install windbg to the default location. (Ex: C:\Program Files (x86)\Windows Kits\10\). When selecting features during install only "Debugging Tools for Windows" is required
  3. Launch gflags.exe (Ex: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\gflags.exe)
  4. Select the Image File (tab)
  5. Enter the application name under the Image field (Ex: winword.exe)
  6. Select the debugger check box and enter the full pack of windbg (ex: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\windbg.exe)
    undefined
  7. This should allow Windbg to attach to the specific process, launch windbg automatically when the application crashes, capture the exception, then break. At this point enter the following command to create the dump file
  8. .dump /ma <folder location of the dump file> (ex: .dump /ma C:/dumpfile) 
    undefined

Additional Notes

  • Typically memory dumps for application crashes can be collected using Windows procdump, but procdump only collects a dump automatically when the application crashes due to an access violation.

Measure Performance with Profiling Tools

August 21, 2020 10:09

Measure Performance with Profiling Tools (edit)

https://docs.microsoft.com/en-us/visualstudio/profiling/beginners-guide-to-performance-profiling?view=vs-2019

https://docs.microsoft.com/en-us/visualstudio/profiling/profiling-feature-tour?view=vs-2019

https://devblogs.microsoft.com/visualstudio/how-to-debug-and-profile-any-exe-with-visual-studio/

https://devblogs.microsoft.com/devops/diagnosing-memory-issues-with-the-new-memory-usage-tool-in-visual-studio/ (Samples)

https://devblogs.microsoft.com/devops/understanding-symbol-files-and-visual-studios-symbol-settings/

https://docs.microsoft.com/en-us/visualstudio/profiling/perftips?view=vs-2019

https://docs.microsoft.com/en-us/visualstudio/profiling/running-profiling-tools-with-or-without-the-debugger?view=vs-2019

https://docs.microsoft.com/en-us/visualstudio/profiling/profile-apps-from-command-line?view=vs-2019

https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh750313(v=win.10)

https://github.com/dotnet/sourcelink

https://github.com/0xd4d/dnSpy

https://github.com/icsharpcode/ILSpy

Tools

September 29, 2017 02:22

Code Generators (edit)

Dynamic navigation items ASP.NET MVC 5

Html Content Editor ASP.NET MVC 5

https://www.apriorit.com/dev-blog/625-web-tools-for-design-time-code-generation

https://awesomeopensource.com/project/thangchung/awesome-dotnet-core

Roadmap to becoming an ASP.NET Core developer in 2019

https://github.com/MoienTajik/AspNetCore-Developer-Roadmap (ASP.NET Core Road Map)

Source Code Samples

Building and deploying an ASP.NET Core app with Docker containers - in 5 minutes

https://github.com/MaxHorstmann/OneMinuteMax

Lightweight and Extensible Infrastructure for Building Web Applications - Web Application Framework

https://github.com/rabbal/DNTFrameworkCore

Boilerplate project templates based on DNTFrameworkCore

https://github.com/rabbal/DNTFrameworkCoreTemplate

HTML Editor

https://www.c-sharpcorner.com/UploadFile/3d39b4/bootstrap-wysiwyg-editor-in-Asp-Net-mvc/

Rich Editor

https://www.c-sharpcorner.com/article/asp-net-mvc5-rich-text-wysiwyg-editor/

Easy SQL Server Tool using C#

https://code.msdn.microsoft.com/windowsapps/Easy-SQL-Server-Tool-using-6b0b7795

XML tools

http://www.utilities-online.info/xmltojson/

https://onlinexmltools.com/convert-json-to-xml

http://xmlgrid.net/jsonXml.html

JSON tools

JSON Editor

http://jsoneditoronline.org/

JSON Formatter

https://jsonformatter.org/

JSON Viewer

http://jsonviewer.stack.hu/

JSON Viewer

https://codebeautify.org/jsonviewer

JSON -> TypeScript

http://json2ts.com/

TypeScript -> JSON

var j={"name":"binchen"};
JSON.stringify(j); // '{"name":"binchen"}'

JSON -> CSharp

http://json2csharp.com/

CSharp -> JSON

http://csharp2json.azurewebsites.net/

TypeScript: Working with JSON

http://choly.ca/post/typescript-json/

Log Parser 2.2

https://www.microsoft.com/en-us/download/details.aspx?id=24659

Code Migration

https://volosoft.com/

ASP.NET MVC 5 -> ASP.NET Core MVC

https://volosoft.com/blog/Migrating-from-ASP.NET-MVC-5.x-to-ASP.NET-Core

https://stormpath.com/blog/token-authentication-asp-net-core (ASP.NET Core Token Authentication Guide)

Code Gen Tools (paid)

Code Generation tool for ASP.NET Core

KeenThemes - Bootstrap Admin Dashboard Templates & Frontend Themes Templates

Metronic - Bootstrap 4 HTML, React, Angular 9, VueJS & Laravel Admin Dashboard Theme

https://keenthemes.com/

Code On Time

Code On Time Premium database app generator for ASP.NET, Azure, DotNetNuke, and SharePoint

https://codeontime.com/

Tolitech Code Generator

https://www.codegenerator.com.br/

  • .NET Core 2.1
  • Dapper / EF Core 2.1
  • Web API
  • Angular 6
  • Bootstrap 4

Creating new projects through a data model

https://www.codegenerator.com.br/en/documentation/creating-new-projects-using-the-online-editor-/778ebf09-840d-4b8e-b62c-aa0037f09252

Creating new projects using the online editor

https://www.codegenerator.com.br/en/documentation/creating-new-projects-through-a-data-model-/943c9b50-781a-49d0-bcb4-49e4ff085444

ASP.NET Zero: 

Base solution for your next web application!

https://docs.aspnetzero.com/en/common/latest

ASP.NET Boilerplate (ABP) - Web Application Framework

https://aspnetboilerplate.com/

ASP.NET Maker:

https://aspnetmaker.dev/

AspCoreGen

https://www.junnark.com/

ComponentOne (Grape City)

https://www.grapecity.com/

Code Gen Tools (free)

Scaffolding ASP.NET Core API Controllers - Quickly create API controllers to jump start your project

https://www.nuget.org/packages/dotnet-aspnet-codegenerator/

dotnet aspnet-codegenerator

https://mattmillican.com/blog/aspnetcore-controller-scaffolding

Learn. Code. Succeed. Welcome to Code Maze. We treat everyone equally, and the knowledge we share is suitable for both beginners and experts alike.

https://code-maze.com/

https://code-maze.com/ultimate-aspnet-core-3-web-api/

https://www.codingame.com/

Serenity

Serenity

https://github.com/volkanceylan/Serenity

https://volkanceylan.gitbooks.io/serenity-guide/content/

https://github.com/volkanceylan/Serenity/wiki/UI:-Dynamic-navigation-items (Dynamic Navigation)

Generate ASP.NET Core MVC code with complete best practices

https://github.com/Mobioos/Generator-ASP.NET-Core-MVC

Custom Code Generator Using ASP.NET Core

https://www.c-sharpcorner.com/article/custom-code-generator-using-asp-net-core/

Code Generator

https://github.com/ShashangkaShekhar/Code-Generator

https://github.com/Mobioos/Generator-ASP.NET-Core-MVC

http://shashangka.com/2018/04/21/code-generator/

Generate PDF in ASP.NET Core 3.1

Install-Package Wkhtmltopdf.NetCore

https://blog.elmah.io/generate-a-pdf-from-asp-net-core-for-free/

https://www.codeproject.com/articles/18040/tutorials-on-creating-pdf-files-using-c-2-0

Generate QRCode in ASP.NET Core 3.1

Install-Package QRCoder -Version 1.1.5

https://www.aspsnippets.com/Articles/ASPNet-Core-Dynamically-generate-and-display-QR-Code-Image-in-ASPNet-MVC-Core.aspx

Images & Files Uploads

https://www.codewithmukesh.com/blog/file-upload-in-aspnet-core-mvc/

https://imar.spaanjaars.com/471/storing-images-as-serialized-strings-in-code-instead-of-in-resource-files

1. File Upload https://github.com/iammukeshm/FileUpload.MVC
2. Mail Service https://github.com/iammukeshm/MailService.WebApi

ASP.NET - Code samples

https://imar.spaanjaars.com/

Code Coverage Tools

TestDriven.Net

https://www.testdriven.net/

NCover

https://www.ncover.com/

dotCover

https://www.jetbrains.com/dotcover/

OpenCover

https://github.com/sawilde/opencover

Categories

Recent posts