Category Archives: Uncategorized

Change Default Path for cmd.exe

Step 1 search on star menu, type ‘command’ click on ‘Open file location’. Step 2 right click on command in opened folder Now in ‘Start in’ field, put path you want.

Posted in Uncategorized | Comments Off on Change Default Path for cmd.exe

How to turn ‘Not Run Tests’ into normal test in Visual Studio

all unit tests in newly added Unit Test Project are not appeared in ‘Test Explorer’ or those unit tests are marked as “Not Run Tests” and never run it no matter how hard you pressure visual studio to run. do … Continue reading

Posted in Uncategorized | Comments Off on How to turn ‘Not Run Tests’ into normal test in Visual Studio

WCF – How to publish WCF into IIS

1. copy web.config 2. copy service.svc 3. copy dll and pdb file into bin folder 4. in iis, setup a new web instance, and point physical folder address into published folder setup .net support version correctly for web instance. 5. … Continue reading

Posted in Uncategorized | Comments Off on WCF – How to publish WCF into IIS

Interface out T vs T

The out keyword in generics is used to denote that the type T in the interface is covariant. check following code. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 … Continue reading

Posted in Uncategorized | Comments Off on Interface out T vs T

How to set Visual Studio support C# 7 features.

open visual studio and click on project and choose ‘Properties’ in ‘Build’ tab, choose ‘Advanced…’, check screen dump in language version, in dropdown list showing in screen dump, there is not ‘C#7’ and ‘C# 7.2’ for visual studio 2015 in … Continue reading

Posted in Uncategorized | Comments Off on How to set Visual Studio support C# 7 features.

Asp.net Core publish on Ubuntu

1. Download asp.net core sdk 2 from Microsoft website 2. link ‘dotnet’ command line to ‘/usr/bin/dotnet’ 3. publish project and zip all binary files including dlls, scp zip to ubuntu vps 4. export ASPNETCORE_URLS=”http://*:80″ This step is very important, because … Continue reading

Posted in Uncategorized | Comments Off on Asp.net Core publish on Ubuntu

webapi – remove web api json string only

by default web api return is xml only. even return json string, but it is still embedded inside an xml file. for example: 1 2 3 <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"> [{"Id":1,"Name":"Glenn Block"},{"Id":2,"Name":"Dan Roth"}] </string><string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"> [{"Id":1,"Name":"Glenn Block"},{"Id":2,"Name":"Dan Roth"}] </string> in WebApiConfig.cs: 1 … Continue reading

Posted in Uncategorized | Comments Off on webapi – remove web api json string only

visual studio – how to format whole project files

formatting one single file is simple, find Edit.FormatDocument command in visual studio and click to apply for it. or Ctrl+K Ctrl+D. customizing C# indent, for example, going Tools | Options | Text Editor | C# | Tabs, on UI user … Continue reading

Posted in Uncategorized | Comments Off on visual studio – how to format whole project files

xamarin debug android on device and release to apk

this example code could be find on following url https://github.com/emacslisp/XNA2DGame/tree/dev/Android/PlatformReading 1. How to build apk from visual studio change build mode from ‘debug’ to ‘release’ select project properties and change option on ‘Application’, ‘Android Manifest’, ‘Android Options’ 2. How to … Continue reading

Posted in Uncategorized | Comments Off on xamarin debug android on device and release to apk

c# – NHibernate.MappingException: No persister for: XYZ

as screen dump show, build action of XYZ.hbm.xml should be ‘Embedded Resource’.

Posted in Uncategorized | Comments Off on c# – NHibernate.MappingException: No persister for: XYZ