by Miha Markič
23. February 2006 01:25
dbc17b72-3a17-4ff9-888a-184687c9d2f9|0|.0
Tags:
.net
by Miha Markič
22. February 2006 12:29
12b4ecea-5df3-4959-bae6-7fd7c06e9a2a|0|.0
Tags:
Windows
by Miha Markič
20. February 2006 18:17
Oliver has a nice post on how to nicely format the code on your Community Server blog. Check it out
here.
60e3db94-0ee7-48cb-90ae-265cebfbbbf5|0|.0
Tags:
by Miha Markič
20. February 2006 18:01
Imagine a class with lot of fields.
Now, you would want to build a constructor that initializes all or many of the fields by assigning arguments to coresponding fields so you don’t need to initialize all fields one by one, plus you have the guarantee that all fields are initialized. Makes sense, right. Now, how would you write such a constructor? You might just use all of your 20 fingers and type it. Pretty annoying, isn’t it. Afterall all the information is already there.
So, meet one of the CodeRush‘s feature I love: Smart Constructor. Just move the caret to the point where you want your constuctor created and type cc [SPACE] (assuming default CodeRush settings). A window like this will appear:
You can uncheck fields at will. After you are done just press [ENTER].
Isn’t this feature just lovely? CodeRush just sucks the metadata from the declaration and creates a constructor with all arguments you’ve selected. It certainly saves a lot of annoying typing for me and prevents me to type wrong assignments. And this is just one of the million CodeRush’s features.
by Miha Markič
20. February 2006 17:55
C Sharp
f2bf882d-a634-4757-9bf3-6a2bef4ddbf6|0|.0
Tags:
by Miha Markič
11. February 2006 18:39
This is one of those problems you can’t understand how could it happen.
Some background: In the past Visual Stuidio versions you were able to sign an assembly using a key stored in a file (snk) or in a safe store named key container. There were two assembly scoped attributes named AssemblyKeyFile and AssemblyKeyName respectively. I prefered the later since I didn’t have to deal with file location and the data is stored in a safe place.
Now, here comes Visual Studio 2005 with a project property page for signing assemblies (Signing tab in Project Properties) which has a check box whether to sign assembly or not and a combo box that locates the file being used for signing. And if you wonder how can you sign the assembly using key container you are out of luck – no option there.
Now you say, no problem, I will sign it the old way using assembly scoped attribute. Actually you still can, but you’ll get a warning (AssemblyKey* attributes are deprecated):
Warning 1 Use command line option ‘/keycontainer’ or appropriate project settings instead of ‘AssemblyKeyName’ E:\Visual Studio 2005\Projects\MyProject\Properties\AssemblyInfo.cs 36 12 MyProject
Hmm. Ok, since I don’t like warnings, I will go passing that /keycontainer parameter through one of Project Properties page. But you can’t. Again, no option there.
Fortunately there is a simple workaround which involves modification of csproj file by hand. You should add this node right under the first node:
YourKeyName
(found via this thread).
Happy signing.
2fae5947-1b62-4c19-85a0-b1a50b1daca8|0|.0
Tags:
.net
by Miha Markič
10. February 2006 14:43
Matjaz, a friend of mine, hosts huge
MS Office forum (Slovene language) full of useful answers to common problems (who doesn’t have at least one problem with Office?). There is also
Q&A section there and plenty of developer information plus some freeware applications.
by Miha Markič
10. February 2006 14:38
Sad news for Delphi users. Or not – who knows what’ll happen once the division is sold. Perhas we’ll see it on eBay :-)
http://blogs.borland.com/davidi/archive/2006/02/08/23013.aspx
426cfc5c-38c3-4c93-a0cd-c1a297f37b6c|0|.0
Tags:
by Miha Markič
6. February 2006 01:46
I’ve updated expiration date of
RightHand.DataSet.Visualizer.
Download updated version
here.
4eaa83f3-8516-42e1-8c22-eed0a8ea74ae|0|.0
Tags:
by Miha Markič
5. February 2006 21:40
So you’ve build a template (or using one) for CodeSmith that uses SchemaExplorer.DatabaseSchema class – the one that enables you browsing through database schema with ease (through a nice API) and a killer feature when dealing with databases. There is one catch though:
The first time you run a template it takes a little longer to execute while the next time (if you didn’t change it in between). The reasons for this behaviour are two:
- CodeSmith Professional does template code caching (it compiles the template only once if not closed or changed). This is good for batching – it saves you time.
- Perhaps less know is the fact that it does caching of database schema, too.
The later fact might be a problem. Imagine you run a template that does database modifications (creates a SQL that you run). Now, the second run will produce the exact same script not taking in account that database was meanwhile changed. Don’t worry though as solution is simple. Just invoke this method somewhere at the beginning of the template code and you are fine:
[your instance of DatabaseSchema].Refresh();
bf4b2eaf-630d-4474-bfe7-36082e30bc8e|0|.0
Tags:
.net