Differences between Microsoft .NET 4.0 full Framework and Client Profile

What’s new in .NET Framework 4 Client Profile RTM explains many of the differences: When to use NET4 Client Profile and when to use NET4 Full Framework? NET4 Client Profile: Always target NET4 Client Profile for all your client desktop applications (including Windows Forms and WPF apps). NET4 Full framework: Target NET4 Full only if … Read more

How to easily initialize a list of Tuples?

c# 7.0 lets you do this: var tupleList = new List<(int, string)> { (1, “cow”), (5, “chickens”), (1, “airplane”) }; If you don’t need a List, but just an array, you can do: var tupleList = new(int, string)[] { (1, “cow”), (5, “chickens”), (1, “airplane”) }; And if you don’t like “Item1” and “Item2”, you … Read more

Microsoft.WebApplication.targets was not found, on the build server. What’s your solution?

To answer the title of the question (but not the question about the output you’re getting): Copying the following folder from your dev machine to your build server fixes this if it’s just web applications C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications Remove x86 according to how your build breaks. If you have other project types you will probably … Read more

What ‘additional configuration’ is necessary to reference a .NET 2.0 mixed mode assembly in a .NET 4.0 project?

In order to use a CLR 2.0 mixed mode assembly, you need to modify your App.Config file to include: <?xml version=”1.0″?><configuration> <startup useLegacyV2RuntimeActivationPolicy=”true”> <supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″/> </startup></configuration> The key is the useLegacyV2RuntimeActivationPolicy flag. This causes the CLR to use the latest version (4.0) to load your mixed mode assembly. Without this, it will not work. … Read more

App.Config Transformation for projects which are not Web Projects in Visual Studio?

I tried several solutions and here is the simplest I personally found. Dan pointed out in the comments that the original post belongs to Oleg Sych—thanks, Oleg! Here are the instructions: 1. Add an XML file for each configuration to the project. Typically you will have Debug and Release configurations so name your files App.Debug.config … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)