My list of Visual Studio extensions which make developing easier and more comfortable. Tool Description ILSpy Integrates the ILSpy decompiler into Visual Studio. ILSpy is the open-source .NET assembly browser and decompiler. Milti Language Spell Checker An editor extension that checks the spelling of comments, strings, and plaintext as you type. T4 Toolbox for Visual Studio […]
- June 26, 2015
#MSTest, #NUnit, #TDD, ...
Is xUnit is a modern and future proof solution for unit testing? I’m measuring pros and cons of xUnit and NUnit for the big and old legacy application. At the first go I thrown away MsTest because the more efforts are required to do the same things. Also it is not as extendible as others. […]
This issue is experienced while opening the test explorer or running all tests in VS. To resolve the issue try the following steps: Close all instances of Visual Studio. Delete all files in AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache (Note that directory is located in Local.) Restart, if that doesn’t work then start over with step 4. From a Visual Studio Command […]
When an editor template is overridden with custom one you lose automatic scaffolding of client-side validation which uses data annotation rules. In such a case they should be added manually to your templates. In the beginning of HTML form you should add @Html.ValidationSummary(true). The parameter excludePropertyErrors = true because I don’t want to mix up error for […]
If you’d like to hide WCF implementation class behind an interface to simplify future changes you should deal with some IoC. I use Autofac and have several times struggled upon the same point when trying to configure WCF to work with it. This trouble begins when you end up with failed service and message “The […]
The approach to specify DLLs in MSTest build step in TeamCity with a string pattern to be easily adopted for specific project.
The most used commands in Git console which are used by me in projects. The reference is often overwhelmed with information which hinders me to use it in practice. This text is the place to keep working examples for quick reference instead of looking them up from somewhere in the internet.
The best practice is that all POST request has AntiForgeryToken to prevent XSS attack. If you don’t know what it is, please, read materials in the bottom of the article. From MVC 3.5 there is a special attribute which can be applied to controller actions ValidateAntiForgeryTokenAttribute. It works in pair with HtmlHelper method Html.AntiForgeryToken(). The value […]
- April 17, 2014
From time to time it’s required to clean up log file, but Managment Studio does not offer straightforward command to do that. This script will help in cleaning up.
- January 6, 2014
You might get the following message when trying to serialize a JSON response from a REST service with
End element 'XXX' from namespace 'XXX' is expected. Found element 'XXX' from namespace 'XXX'
If your message looks similar to this example you should check your data contract classes. It’s possible that some property has an invalid type association. For example, the REST service could return complex type Person with […]