.comment-link {margin-left:.6em;}


.. Hello Earthling .. \o/ :)

Referencing old Threading.Tasks in Visual Studio
Saturday, December 09, 2017

You may get an error "cannot find all types required by the 'async' modifier" even though you are targeting .Net framework 4.5.1, or anything greater then 4.0 basically. Sometimes when we have an old project that we upgraded to higher versions of the .Net framework, some old references remain there and keep on working fine, though they wont get latest features, and for this reason you need to specifically remove them from the project. Goto project properties, in References section you will see a list of external references being used by your project, see if the System.Threading.Tasks is still there and is using something like the version 2 or something. Just remove it, and this error will go away.

Building DevExpress Source Code (for damn dummies)
Saturday, December 02, 2017

So I have been asked to build this source code that contains the source of all third party controls for DevExpress. Since it was kind of time consuming and I have seen some questions on dvexpress forums related to building the source, I am going to document it over here. If it ever helps you, do leave a comment! So here we go:

first you goto the folder \Sources\DevExpress.Key
open Visual Studio command prompt (this command prompt makes available all the .net SDK tools), in this prompt you type the following:

sn -k StrongKey.snk

this will generate file "StrongKey.snk", place this file in the folder "\Sources\DevExpress.Key".

Now open the project "\Sources\DevExpress.Data\DevExpress.Data.csproj" in visual studio, open file AssemblyInfo.cs, there is a public key written in this file, at several places, it starts with "PublicKey=", find it and copy it (dont kill it), this is a key that you need to replace in all of the devexpress code that you have, you have to replace this key with the one that you generated above, the one in StrongKey.snk file, but there is a way of doing it:
in the folder of the StrongKey.snk, type the following 2 commands (staying in the Visual Studio command prompt):

sn -p StrongKey.snk a.txt
sn -tp a.txt

this will output a public key in the console, but its broken in lines, you have to copy all of it, make it into one line (eg in notepad you can do this by opening notepad, set word wrap off, past all, remove line breaks & copy one whole line).
Now you have the public key, back to Visual Studio, press Ctrl+Shift+H (replace all for files), put in the location ("Look in" box) "\Sources" (yes we are replacing these keys in all files they should be in), paste the original long public key in the "Find what" box, and your new key in the "Replace with" box, and click "Replace All", this will take a little time (if your PC got ssd you are in good shape, if not, BUY A DAMN SSD or leave computer programming go do something else).

Now, go ahead and click the BUILD button up in the tool box, or press Ctrl+Shift+B. Now you should have a sweet little file named "DevExpress.Data.v15.2.dll" in "\Bin\Framework" folder, all files will go there you will see it grow.
Open up "\Sources\DevExpress.XtraPrinting\DevExpress.Printing.Core\DevExpress.Printing.Core.csproj", build it, it should build fine.
now I will write down a list of projects in the following lines, thats the order in which you should go on building everything, opening in Visual Studio, one by one:
open folder \Sources\DevExpress.XtraCharts and add all projects into one solution file:
NOTE: before building \Sources\DevExpress.XtraLayout\DevExpress.XtraLayout remove the reference to Microsoft.VisualStudio.DebuggerVisualizers.
now you can build \Sources\DevExpress.XtraLayout\DevExpress.XtraLayout

ok i give up! These are most of what I built, there is a huge amount of source still to be built, lots and lots of project files which I have no use of i think. I may have missed a few projects that I built but you will find them yourself while building. One tip on finding dependencies is this: you keep opening the References node in the solutions explorer and note down anything that has a yellow attention icon with whatever reference, you have to keep on looking till you reach a point that has no yellow signs, its kind of a dependency tree, mainly its what I have listed above, but it depends on what you want to build it will have different projects to be built.

PS: report errors in comments.


MSDN Blogs
Joel Pobar
Don Syme

Muhammad Ali
Lahore Food Blog

Tech Blog



June 2004   July 2004   August 2004   September 2004   October 2004   November 2004   December 2004   February 2005   April 2005   June 2005   July 2005   September 2005   October 2005   November 2005   June 2007   December 2007   January 2008   March 2008   April 2008   June 2008   October 2008   February 2009   May 2009   June 2009   July 2009   August 2009   March 2011   June 2011   July 2011   September 2011   October 2011   November 2011   December 2012   May 2013   October 2013   May 2014   March 2015   July 2015   August 2015   December 2015   March 2016   July 2016   October 2016   November 2016   July 2017   December 2017   May 2018   September 2018  

This page is powered by Blogger. Isn't yours?