Best practices/guidance for maintaining assembly version numbers

Versioning is something that I am very passionate about and have spent a long time trying to come up with an easy to use versioning system. From what you have already said in your question it is clear that you have understood one important point, the assembly version numbers are not synonymous with the product … Read more

‘AssemblyTitle’ attribute in the .NET Framework

[AssemblyTitle] is a pretty big deal, it is directly visible when you right-click on the assembly and use Properties + Details. An example to make it more visible. Let’s start with this AssemblyInfo.cs file: [assembly: AssemblyTitle(“AssemblyTitle”)] [assembly: AssemblyDescription(“AssemblyDescription”)] [assembly: AssemblyConfiguration(“AssemblyConfiguration”)] [assembly: AssemblyCompany(“AssemblyCompany”)] [assembly: AssemblyProduct(“AssemblyProduct”)] [assembly: AssemblyCopyright(“AssemblyCopyright”)] [assembly: AssemblyTrademark(“AssemblyTrademark”)] [assembly: AssemblyCulture(“”)] [assembly: Guid(“7da36bdf-39fb-4a4d-b98c-ecefd99b155a”)] [assembly: AssemblyVersion(“1.2.3.4”)] [assembly: … Read more

How to add a reference to System.Numerics.dll

http://msdn.microsoft.com/en-us/library/7314433t(v=vs.80).aspx From MSDN: In Solution Explorer, select the project. On the Project menu, choose Add Reference. The Add Reference dialog box opens. Select the tab indicating the type of component you want to reference. In the top pane, select the component you want to reference, and then click the Select button. Press CTRL while clicking … Read more

Working with AppDomain.AssemblyResolve event

You can define a dictionary of the assemblies from your directory, like this: private readonly IDictionary<string,Assembly> additional = new Dictionary<string,Assembly>(); Load this dictionary with the assemblies from your known directory, like this: foreach ( var assemblyName … corresponding to DLL names in your directory… ) { var assembly = Assembly.Load(assemblyName); additional.Add(assembly.FullName, assembly); } Provide an … Read more

Practical uses for the “internal” keyword in C#

Utility or helper classes/methods that you would like to access from many other classes within the same assembly, but that you want to ensure code in other assemblies can’t access. From MSDN (via archive.org): A common use of internal access is in component-based development because it enables a group of components to cooperate in a … Read more

Could not load file or assembly ‘Newtonsoft.Json’ or one of its dependencies. Manifest definition does not match the assembly reference

To solve this, I ensured all my projects used the same version by running the following command and checking the results: update-package Newtonsoft.Json -reinstall And, lastly I removed the following from my web.config: <dependentAssembly> <assemblyIdentity name=”Newtonsoft.Json” publicKeyToken=”30ad4fe6b2a6aeed” culture=”neutral” /> <bindingRedirect oldVersion=”0.0.0.0-6.0.0.0″ newVersion=”6.0.0.0″ /> </dependentAssembly> If you want to ensure all your Newtonsoft.Json packages are the … Read more

Why AppDomain.CurrentDomain.BaseDirectory not contains “bin” in asp.net app?

Per MSDN, an App Domain “Represents an application domain, which is an isolated environment where applications execute.” When you think about an ASP.Net application the root where the app resides is not the bin folder. It is totally possible, and in some cases reasonable, to have no files in your bin folder, and possibly no … Read more