[Nasıl Yapılır] C# ile NTier Mimari Örneği – Unit Of Work – Repository Pattern – Validation – Testing

image1 677x400 - [Nasıl Yapılır] C# ile NTier Mimari Örneği - Unit Of Work - Repository Pattern - Validation - Testing

Merhaba hanımefendiler, beyefendiler.

Uzun zamandır bu video serisini çekmek istiyordum ve sonunda bitirdim, Youtube sayfasında yayına aldım.

Dilim döndüğünce, N Katmanlı Mimaride bir uygulama geliştirmeyi basit düzeyde anlatmaya çalıştım. Bu süreçte iş katmanı, Unit Of Work tasarım deseni, Repository tasarım deseni geliştirdim ve bol örnekli test yazdım. Testler özellikle çok iyi oldu.

Sürç-ü lisan ettiysek şimdiden affola.

Youtube Link: https://www.youtube.com/playlist?list=PLojQVfYvlEpec2hnuVZEe84I7ijBolYVU

Github Link: https://github.com/eniskurtayyilmaz/NTier

image1 - [Nasıl Yapılır] C# ile NTier Mimari Örneği - Unit Of Work - Repository Pattern - Validation - Testing

Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor

image 5 722x400 - Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor

Bir .NET Core Web API projesi geliştiriyorum. (Dotnet Version: 2.2.401)

Karar verdim. Eğer Web API içerisinde bir sorun olursa, ziyaretçilere “Web Api’de ne oldu” diye gösterecektim ve bunu Response Body içerisinde yapacaktım. Ama önce, genel bir Global Exception middleware’ini yazmam gerekecekti.

Tamam, bunu yaptım ve onlara response body içerisinde gösterdim.

Fakat bazen bu doğru yol değildir eğer bir Web API projesi geliştiriyorsanız. Response Headers içerisine de ekleyebilirsiniz. (Bence yapmalısınız)

Aynı mesajı, response headers içerisine de customize edecek şekilde yaptım ve ne oldu dersiniz? Crash!!!

Neden oldu dersiniz? Headers içerisinde ASCII olmayan karakter kabûl etmiyormuş. (Teşekkürler stackflowover.com)

Mesajım “Login olamıyor mk.” idi 🙂

image - Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor
[Web API]
image 1 - Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor
[Global Exception için Middleware- Startup.cs]
image 4 - Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor
[Global Exception için customize headers tanımları- HttpResponse_AddApplicationError_Extensions.cs]

Postman uygulaması ile (Postman çok önemli bir tool) denediğimde, body ve headers kısımları boş geliyordu.

image 2 1024x631 - Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor
[WEB API’den gelen Response Body Bilgisi – Postman]
image 3 1024x599 - Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor
[WEB API’den gelen Response Headers Bilgisi – Postman]

Sonunda çözümü buldum. Body kısmı çalışıyordu, headers kısmı çalışmıyordu çünkü ASCII karakter olmayanları kabul etmiyordu. Ben de headers kısmını base64’e çevirmeye karar verdim.

Çalışıyor.

image 5 - Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor
[Converting to base64 – Extensions.cs]
image 6 1024x531 - Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor
[WEB API’den gelen Response Body Bilgisi – Postman]
image 7 1024x531 - Çözüldü: .NET Core Response Headers İçerisinde ASCII Olmayan Karakterlere İzin Vermiyor
[WEB API’den gelen Response Headers Bilgisi – Postman]

Tamamdır çalışıyor ve biraz kod yazmam lazım! Görüşürüz.

Solved: .NET Core Doesn’t Pass Non ASCII Characters In Response Headers

image 5 722x400 - Solved: .NET Core Doesn't Pass Non ASCII Characters In Response Headers

I’m coding a new project in .NET Core Web API. (Dotnet Version: 2.2.401)

I decided that If there is something wrong in the Web API, I can show them (the visitors) “What happened in Web API” in response body. But first, I have to set up global exception things in my project.

Ok.. I did it! I gave them a message in response body.

In sometimes this is not good way If you creating a web api project. You can add to response headers. (I think you must do it)

So, I tried to add same message in response headers and It happened.. Crash..

Because, my error message was containing non ascii characters. (Thanks stackflowover.com)

My message was “Login olamıyor mk.”

image - Solved: .NET Core Doesn't Pass Non ASCII Characters In Response Headers
[Code Snippet from Web API]
image 1 - Solved: .NET Core Doesn't Pass Non ASCII Characters In Response Headers
[Middleware for Global Exception- Startup.cs]
image 4 - Solved: .NET Core Doesn't Pass Non ASCII Characters In Response Headers
[Customize Headers for global exception – HttpResponse_AddApplicationError_Extensions.cs]

When I using Postman app (Postman is a tool used to send requests), It seems like there is an issue. Because body and header is empty.

image 2 1024x631 - Solved: .NET Core Doesn't Pass Non ASCII Characters In Response Headers
[Response Body from WEB API – Postman]
image 3 1024x599 - Solved: .NET Core Doesn't Pass Non ASCII Characters In Response Headers
[Response Headers form WEB API – Postman]

Finally, I found the solution. The response body was working, headers not working because of non ascii characters issue. I decided that the message of customize header must be base64 in response header.

It works!

image 5 - Solved: .NET Core Doesn't Pass Non ASCII Characters In Response Headers
[Converting to base64 – Extensions.cs]
image 6 1024x531 - Solved: .NET Core Doesn't Pass Non ASCII Characters In Response Headers
[Response Headers from WEB API – Postman]
image 7 1024x531 - Solved: .NET Core Doesn't Pass Non ASCII Characters In Response Headers
[Response Body from WEB API – Postman]

Ok guys, It’s working and I have to write some code!

Çözüldü: VS 2017’de Test Debug Modunda Çalışmıyor

VS 2017’de Debug modunda testler çalışmıyor.

Dün gece bir proje üzerinde çalıştım. Bazı görevleri, bazı testleri bitirdim ve GitLab’a bütün kodları Git aracılığı ile gönderdim.

Bugün ofise gittim. GitLab’tan bütün projeyi çektim. VS Solution Explorer üzerinde sağ tıkladım, Restored NuGet Packages seçtim. Fakat bütün testleri çalıştıramadım. Ne yeşil tamam, ne de kırmızı hata vardı. Seçilmemiş gibi gözüküyordu. Debug mod çalıştırmayı denedim ama çalışmadı, aşağıdaki hataları aldım

Image 005 1024x785 - Çözüldü: VS 2017'de Test Debug Modunda Çalışmıyor
VS2017 running debug selected tests does not open the debugger

'testhost.x86.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\testhost.x86.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CoreUtilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.PlatformAbstractions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CrossPlatEngine.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CommunicationUtilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.VisualStudio.TestPlatform.Common.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Newtonsoft.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Extensions\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Extensions\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.ComInterfaces.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.Composition\v4.0_4.0.0.0__b77a5c561934e089\System.ComponentModel.Composition.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\System.Collections.Immutable.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.FileSystem\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.FileSystem.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.MemoryMappedFiles\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.MemoryMappedFiles.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Handles\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Handles.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Text.Encoding\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Text.Encoding.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x3ca0 has exited with code 0 (0x0).
The program '[13572] testhost.x86.exe: Program Trace' has exited with code 0 (0x0).
The program '[13572] testhost.x86.exe' has exited with code 0 (0x0).

Belki “VS 2017 Çöktü” diye düşündüm. VS 2017’yi tekrardan başlattım ve yine aynı hatayı aldım.

Sonunda, sağ tıklayıp “Clean Solution” demek aklıma geldi ve çalıştı!

Image 006 1024x720 - Çözüldü: VS 2017'de Test Debug Modunda Çalışmıyor

Solved: VS2017 Running Debug Selected Tests Does Not Open The Debugger

I had an issue that VS2017 Running Debug Selected Tests Does Not Open The Debugger.

Last night, I was working on a project. I finished the some tasks, the some tests and I pushed to GitLab all of the projects, using GIT.

Today, I went to office. I pulled all of the projects from source control to my computer. I clicked Restored NuGet Packages on VS Solution Explorer, But I didn’t run all of the tests. I didn’t get neither green check or red error, and It seems like unselected. I tried to debug but It didn’t work! I was getting the following errors:

Image 005 1024x785 - Solved: VS2017 Running Debug Selected Tests Does Not Open The Debugger
VS2017 running debug selected tests does not open the debugger

'testhost.x86.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\testhost.x86.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CoreUtilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.PlatformAbstractions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CrossPlatEngine.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CommunicationUtilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.VisualStudio.TestPlatform.Common.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Newtonsoft.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Extensions\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.CppUnitTestExtension.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Extensions\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.ComInterfaces.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.Composition\v4.0_4.0.0.0__b77a5c561934e089\System.ComponentModel.Composition.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\System.Collections.Immutable.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.FileSystem\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.FileSystem.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.MemoryMappedFiles\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.MemoryMappedFiles.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Handles\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Handles.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Text.Encoding\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Text.Encoding.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Extensions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x3ca0 has exited with code 0 (0x0).
The program '[13572] testhost.x86.exe: Program Trace' has exited with code 0 (0x0).
The program '[13572] testhost.x86.exe' has exited with code 0 (0x0).

So, I thought that “Maybe VS 2017 crashed”. I restarted VS 2017, I tried again and failed again.

At least, I decided that “Clean Solution” and It worked!

Image 006 1024x720 - Solved: VS2017 Running Debug Selected Tests Does Not Open The Debugger