Fixing CS1668: Invalid Search path in LIB environment variable

When trying to run msbuild.exe against .sln file it results in error message

"error CS1668: Warning as error: Invalid search path 
'C:Program Files\Microsoft SDKs\Windows\v6.0A\common\lib' 
specified in 'LIB environment variable'.

If you take a look at this folder, there is actually no "common\lib" sub folder.

Solution: Simply create "common\lib" sub folders and rerun MSbuild. MSbuild doesn't  actually need anything from this folder but it's set as input variable anyways during Visual Studio setup.

VS 11 Suggestion: Breakpoint groups, enable / disable breakpoints on group level

In my opinion this peace of the puzzle is still missing in Visual Studio. I submitted this idea to Visual Studio User Voice web site.

 

 

Here is the original text:

Give user ability to mark defined breakpoint as part of the group or set.

Let’s say you are working on specific bug and you spent hours of debugging and setting breakpoints but still didn’t solve the bug. You still need those break points but you are waiting for something else to continue working on this so you move on to something else.

Now you work on different bug, new breakpoints are needed but your debugger keeps hitting the old ones.

Do you disable or delete old breakpoints, maybe. You can always export them to XML and import later, but that’s not so convenient. What if you are working on several bugs?

This is something similar what happens with tabs in older VS’s. You step into code , go to definition , go to definition and so on, tabs keep piling up and as Scott Hanselman says “you declare tab bankruptcy” and just close them all. This was very nicely solved by VS 11 and I would like to have something similar for breakpoints.

It would be very nice just to mark your breakpoints as part of the set or group. That way user could name the group “DAL timeout bug” and enable or disable breakpoints on group level when needed.

I could easily move from debugging one issue to another without losing time on searching place in code to set or enable again breakpoint.

Nice to have would be to link breakpoint set to specific TFS work item. Whenever I open work item, I could again restore my breakpoints.

Here is the link to my suggestion. Vote for it.

How to fix Gravatar problem in BlogEngine 2.5

As part of polishing my new blog design I noticed that Gravatar images are not showing up in post comments. Quick glance at themes folder and CommentsView.ascx, no problem there.

Next step, download Blog Engine latest source code from CodePlex to see what happens in code behind.

 

Code for handling Gravtar images is in BlogEngine.Core project in Avatar.cs file.

 Code snippet bellow shows current implementation. 

var gravatar = string.Format("http://www.gravatar.com/avatar/{0}.jpg?s={1}&d=", hash, size);

            string link;
            switch (BlogSettings.Instance.Avatar)
            {
                case "identicon":
                    link = string.Format("{0}identicon", gravatar);
                    break;

                case "wavatar":
                    link = string.Format("{0}wavatar", gravatar);
                    break;

                default:
                    link = string.Format("{0}monsterid", gravatar);
                    break;
            }

            imageTag = string.Format(
                CultureInfo.InvariantCulture, AvatarImage, link, HttpUtility.HtmlEncode(description));

            return new Avatar { Url = new Uri(link), ImageTag = imageTag };

Here is the problem. Gravatar.com no longer supports this kind of URLs.

http://en.gravatar.com/site/implement/images/

The most basic image request URL looks like this:

http://www.gravatar.com/avatar/HASH

where HASH is replaced with the calculated hash for the specific email address you are requesting. For example, here is my base URL:

http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50

When wrapped in an IMG tag, that URL will produce:

<img src="http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50" />

If you require a file-type extension (some places do) then you may also add an (optional) .jpg extension to that URL:

http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50.jpg

Size

By default, images are presented at 80px by 80px if no size parameter is supplied. You may request a specific image size, which will be dynamically delivered from Gravatar by using the s= or size= parameter and passing a single pixel dimension (since the images are square):

http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=200

 

Here is my code snippet which follows current Gravatar API and fix for this problem.

 

var gravatar = string.Format("http://www.gravatar.com/avatar/{0}?s={1}", hash, size);

            string link;
            switch (BlogSettings.Instance.Avatar)
            {
                case "identicon":
                    link = string.Format("{0}identicon", gravatar);
                    break;

                case "wavatar":
                    link = string.Format("{0}wavatar", gravatar);
                    break;

                default:
                    //link = string.Format("{0}monsterid", gravatar);
                    link = gravatar;
                    break;
            }

You can download BlogEngine source code and edit it manually, rebuild and redeploy BlogEngine.Core.dll or you can you download my already compiled version from here: Bin.zip

Fresh new look for my blog

It’s Thursday 2:37 AM and I’m so happy to write this post on my new freshly looking blog page. For months I’ve tried to do something with my old design which was bit tacky, gray and really related to content in this blog.

OldBlog

newBlog

 

 

 

 

I was thinking about adopting some free html templates to suite my blog ,create my own design from scratch or even hire pro designer to do it for me. None these were really solution for me. Free templates are either to simple or to general or in most cases to ugly. Pro designers are bit expensive for me atm and let’s be real I’m developer, even though I know every HTML and CSS tag I’m not designer.

Then, just about time when I gave up BlogEngine gallery offered me great solution. Just what I was looking for, nice, simple, Microsoft Metro looking design. I just moved some things around. Little bit of css editing, little bit of master page editing and it’s done.

It’s still not perfect but I will move some things around as time goes by. Most importantly it’s nice , it’s new. 

About me

Bizic Bojan is Freelance Software Development Consultant with focus on C++, Qt and .NET based software solutions development. 

 

Disclaimer:

The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.