Category: Uncategorized
7 Mac Startup Options Every OS X User Should Know
Find the best NuGet Packages – NuGet Must Haves
Helps you find the best NuGet packages!
Based on popularity, documentation, votes, analytics, etc
nugetmusthaves.com/
Fluent URL builder and testable HTTP client for .NET – Flurl
Flurl is a modern, fluent, asynchronous, testable, portable, buzzword-laden URL builder and HTTP client library.
tmenier.github.io/Flurl/
Generate C# API Documentation with Wyam – CodeOpinion
5 Security Concepts Every Developer Should Understand – Simple Programmer
C# .NET Convert object to dynamic
public dynamic ToDynamic(object value) { IDictionary<string, object> expando = new ExpandoObject(); foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(value.GetType())) expando.Add(property.Name, property.GetValue(value)); return expando as ExpandoObject; }
GIT – How to ignore local changed file
If you have a config file or something similar you change on your local computer but dont want it to get marked as “modified”.
Use this command:
git update-index --skip-worktree [filename]
If remote repo gets an update on that file you will get notified about this on a pull.
From stackoverflow:
skip-worktree
is useful when you instruct git not to touch a specific file ever. That is useful for an already tracked config file.
Upstream main repository hosts some production-ready config but you would like to change some settings in the config to be able to do some local testing. And you don’t want to accidentally check the changes in such file to affect the production config. In that case skip-worktree
makes perfect scene.
If you have skip-worktree on a file and the upstream changes, you get “please commit or stash” when you try to pull
More info here:
http://stackoverflow.com/questions/13630849/git-difference-between-assume-unchanged-and-skip-worktree/13631525
Visual Studio – Trigger a xUnit test run after project build event
To trigger a xUnit test run after a successful build,
add this to the project “Build Events” / “Post-build event command line:”
"$(SolutionDir)\packages\xunit.runner.console.2.2.0\tools\xunit.console.x86.exe" "$(TargetPath)"
(You need xUnit runner console nuget package installed for this, above is for the 2.2.0 version).
Will produce something similar to this in the Output window “Build”:
xUnit.net Console Runner (32-bit .NET 4.0.30319.42000) Discovering: MyApp.UnitTests Discovered: MyApp.UnitTests Starting: MyApp.UnitTests Finished: MyApp.UnitTests === TEST EXECUTION SUMMARY === MyApp.UnitTests Total: 8, Errors: 0, Failed: 0, Skipped: 0, Time: 1,120s
Docs:
https://xunit.github.io/docs/getting-started-desktop.html#run-tests
Comparing xUnit.net to other frameworks
Simple comparison table for Attributes and Asserts xUnit vs NUnit and MSTest