Posts Tagged “visual-studio”


Silverlight with VS2012 - Microsoft.Silverlight.CSharp.targets was not found


I tried opening a solution with silverlight project in it, and the silverlight project was not loading, complaining that the said targets file is missing. Now this is a machine without VS2010, only VS2012. The usual fix for this is “install the Silverlight tools for VS2010” alas since vs2010 is not present, it tried to install Visual Web Developer 2010 first.

Instead, I downloaded and installed the “Silverlight 5 SDK”, (from here, scroll down a bit)which apparently is not dependent on VS, hence installed correctly and problem is gone.

dotTrace 3.1 64bit would not integrate with Visual Studio and Resharper


Installed dotTrace 3.1

Since I run windows 7 64bit on my laptop, I chose to install the 64bit version of dotTrace. After the the installation, the standalone profiler worked great. It was also showing up in the Visual Studio AddIns menu. However, the purple button (next to the Debug “Play” button”) was greyed out, and the one within the Resharper Unit Testing sessions window was also disabled.


After re-installing, re-booting, and re-filling my cuppa’ coffee, I suddenly remembered that Visual Studio is actually a 32bit application, and that I’d probably want to install the 32bit version of dotTrace if I want them both to play nicely.


Did it.


Problem solved.





VS WTF – two fonts in the text editor




Live, from Vista


My poor old laptop has had a lot of problems lately, priming at ignoring any network connection yesterday and having many problems with svn and git sessions when the network was on, so I decided to re-install.


‘twas 1am, so I thought ‘what the heck - let’s try this vista thing at last’.


It was surprisingly a smooth experience. The initial setup identified almost all of the drivers, but the sound-card and the SD card reader. However, the auto updates (which took over an hour cuz there was apparently a lot to update) took care of the sound, and I got the SD driver from Texas Instrument’s site.


What I had to install to make the machine workable for day-to-day work:

still missing (no time) but essential:


btw, since I’ve installed VS2008 without going 2005 first and without the full SDKs, I ran into a problem with NAnt 0.86b1 - complaining about missing .NET 2.0 stuff.  It appear to be a known bug in NAnt, that has been fixed back on late 2007, so I’ve just switched to a nightly build of 0.86b2 and the problem did go away.  I need to make sure that it won’t affect my Castle build.


Didn’t have much to say here. I consider it a test post (see if Writer will work from Vista) but it beats the crap out of "TEST POST PLEASE IGNORE" …

AspView Intellisense and ReSharper: skip ViewAtDesignTime


Usually I won’t just link to a post, however go and read this post from Andre Loker is is a good one, and the title says it all.

A quote from there, just as appetiser:

if you use ReSharper (and youshould) you can skip the ViewAtDesignTime class altogether and just use the AspViewBase class (or a derived class) in the view. ReSharper will still provide Intellisense. The list of members is much more reliable as those members will definitively be available during compilation.

All in all, Andre’s blog is good reading. Added to my rss-reader of choice.

Cannot explicitly convert System.Boolean to bool VS2008 WTF


I’ve just opened up a VS2005 solution in VS2008.

The conversion wizard popup up, with some bad UI (empty window with “Next”, “Finish”, “Cancel” buttons), but it worked ok, and at the end suggested that no errors occured.

Then I went to the project’s properties and changed the target to .NET 3.5

VS told me that he had to reload the project, so I let him.

then I started to get weird errors in the IDE:


anyway, closing the solution and re-opening made this weird happening go away.

And I thought I’m about to go back to vs2005 …

AgentSmith - Resharper plugin


From the website:

Current version includes following features:

Smart paste.

The coolest thing is the ability to spell check identifiers. I’d love it.

It’s at and I found out about it on Castle’s dev list (thx Victor)

Screen Cast - Creating MonoRail-AspView Web Application From Scratch


Following many requests from users, I’ve created a screen cast in which I show how to setup a new MonoRail/AspView website, from scratch (no wizards).


On that demo, I’ve used Visual Web Developer 2008 Express and Visual C# 2008 Express, both in Beta2, just to show how you can simulate some of the “Web Application Project” experience in the Express editions. Of course it’s much easier to work with a full Visual Studio with Web Application Project as you then have everything in a single application, and it’s easier to handle.

Nothing on the demo is 2008 specific, and it runs on .NET 2.0, so VS2005 would do just fine here.

The demo is very simple, and I have generally just showed a “Hello World” level of setup. I hope to spare some time to follow up with setting up things like Windsor Integration, the Castle.Tools.CodeGenerator, and other cool stuff.

The links I use on the demo are:

I’ve used Windows Media Encoder to capture the screen, and my SHURE SM58 mic to record the narrating. It’s a great mic, however plugged into my sorry excuse for a sound-card.

It’s my first screen cast, and I’d love to hear comments from you people, both on the content and on the presentation.

Annoying Service (B4F97281-0DBD-4835-9ED8-7DFB966E87FF) in Visual Studio 2005 project files



Your projects in Visual Studio 2005 are behaving strangely, sometimes not building with funny errors, and tend to marked as modified in your source control

When trying to isolate the problem:

you diff your *proj file against a previous version and find this entry:

<Service Include=”{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}” />

Why is it happening?

You probably have installed VS 2005 SDK, with the DSL tools.

It has a bug in the Text Templating service.

Should have been fixed in VS SDK RTM 4.0, but it hadn’t (apparently, as it happened on my machine after installing RTM 4.0)

I saw a promise that the on Orcas SDK it’s fixed. I guess that mean that in VS 2005 SDK it won’t get fixed.

How to solve (dirty - but working):

using your favorite registry editor, locateHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages{a9696de6-e209-414d-bbec-a0506fb0e924} andHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\Packages{a9696de6-e209-414d-bbec-a0506fb0e924}remove (or rename) them, and the Text Templating service won’t start, and your *proj files would stay intact.


If you do need the Text Templating service, then I can’t help ya.

Read also at:

Forget about Reflector-ing the BCL - the real deal is here


Another nice news from Scott Guthrie:

a small excerpt:

Today I’m excited to announce that we’ll be providing this with the .NET 3.5 and VS 2008 release later this year.

VS2005 has lost grip of Resharper 3 Fonts and Color? re-install


I’m using VS2005 (with SP1, like duhh) and have had R# 3.0.1

Now, I’m not a fan of the default font and color scheme, as I like better the slicker mono-fonts, like Consolas. I am also becoming a Black-Background type, not for the WouldSaveTheRainForests==true reason (in LCD the light is static no matter what color it shows) but for the implements IDLikeToKeepMyEyeSightForALongTime reason.

So, started with importing a color scheme from some internet-found-place, don’t remember where, and then tried to change those Resharper coloring options (like, a variable name that is being used an odd amount of times, by internal classes, however not in an explicit-interface implemented method, that returns a struct), just to find out the the Fonts-And-Colors menu miss those lovely Resharper entries).

Okay, so what should I do? Export the settings, edit the xml, and re-import. Not much fun there.

Hmm. Googled it (I may use the term, as I actually use Google as a search engine), and found a post on jetbrains support site, with the same solution though.

However - this is how I solved it eventually:

  1. Export the current settings toa file

  2. Reset all settings

  3. Re-install R# (hey - now it’s 3.0.2 !!)

  4. Import back my settings.

Javascript Debugging in VS2005, VS2003 and InterDev is a no go AFAIC


Regarding my last post on the matter, Justin has commented with:

Javascript debugging has been around since VS2003.It’s not the most obvious or straight forward as in VS2008, but it’s pretty easy.The “Script explorer” window in VS2005 lets you see all the files downloaded for a certain browser process Visual Studio is currently attached to. From those files you can set a break point. So yes, it wasn’t easy, but it isn’t ground breaking either.

Josh took it one step further mentioning Visual InterDev.

I consider myself a rather sophisticated user, especially when it comes to IDE of any kind.

However, I did not use Javascript Debugging in VS2005 and VS2003, for the simple reason that it was not easy enough, and did not give me enough knowledge of the runtime vars etc. while using it.

When I started .NET-ing, I’ve had no VisualStudio license, and no idea about SharpDevelop. So I used notepad + csc.exe + WinDbg.exe . It’s workable, but it sucks. Just like JS debugging in VS.

Since javascript runs in the client, on the generated markup files, and not on the server’s templates (aspx, whatever), it’s not as useful as FireBug’s ability to set a breakpoint on a proper client html file.

Now, quoting from ScottGu’s post:

f you add/remove/update the breakpoint locations in the running HTML document, VS 2008 is also now smart enough to perform the reverse mapping and update the breakpoint in the original .aspx or .master source file on the server. This makes it much easier to get into a nice edit/debug/edit/debug flow as you are iterating on your applications

As I said - my main reason to move to VS2008 is it’s multi-target support, and js intellisense. Sure, I can get js intellisense with a lot of cool non-MS tools, but I want to have a single IDE window per solution.

The easier js debugging IS ground breaking for me, as it seams that I’ll be able to use it for debugging js in IE, a thing I’m not currently doing with VS since I don’t like it so much.

Javascript Debugging Made Easy, Even In Internet Explorer


This is why I’ll be switching to VS2008, if That was not enough.

As Scott keeps reminding us, it (VS2008) will be able to target multiple runtimes, so we can keep using that against .NET 2.0 and .NET 3.0, no need to adapt 3.5 yet. (I wonder about targeting Mono from VS 2008 …)

Until now, the JS debugging in VS was not too nice. Sure, I can use FireBug, and thanks to PrototypeJs I have almost no browser compatibility issues. However, sometime IE behaves strange, and I havn’t found any decent way to breakpoint into js in IE.

VS 2008 Javascript Intellisense + PrototypeJs => isFunToScriptBrowsers == true


Checkout the latest post of Scott Guthrie.

Is the long awaited JS IDE will be VS2008?

Now it’s a matter of adding ///<summery> tags to prototype.js and maybe people would really stop being afraid of developing javascript code.

Now that’s a good reason to switch to VS2008, combined with the fact than you can hold to your current .NET distribution.

Visual Studio 2008 will target multiple .NET runtimes


That’s a big announcement.

After all, even VS2005 was actually calling csc.exe rather that calling some magical inner stuff as in 2002/2003.

I hope that this also means better addin development support, so great projects like CVSI and ActiveWriter, could become even better.

Do you think they’d enable a “Compile for Mono” option?

The "Exec" task needs a command to execute, the poor thing


Here’s a strange error message.

I was trying to build a project in VS2005, and got this instead of a successful build:

The “Exec” task needs a command to execute.

After pooling out a few hairs, I remembers that I recently have edited the pre-build actions for this project.

Looking this up, I found that I left a spare newline at the end of the pre-build script. So VS2005 sent msbuild an order to run an empty command.

Now I wonder,had the VS2005 guys have ever heard of StringSplitOptions.RemoveEmptyEntries?

They could’ve easily ignore empty lines, or better yet, issue a warning for that kinda stuff.

Ruby.NET integration in Visual Studio, plus debugging support


I’ve just got the announcement from the Ruby.NET team at QUT, about the new beta release, numbered 0.7.

The two major things in there:

  1. the compiler now creates pdb files, which means that it can be debugged with the interactive debuggers,

  2. Visual Studio 2005 integration, including Ruby projects.

Can’t wait to check this out.

I’d like to see if I can do some integration into the AspView project, to enable a RubyOnMonoRail thing. I guess it’d have to wait for the BCL integration, promised to be released around the end of this year, but it is quite interesting as it is right now.

ActiveWriter - 2nd preview is out


ActiveWriter is a VS2005 plugin, that adds a new item type for your projects. This item is actually a visual designer for ActiveRecord classes. Quite neat, and hopefully will increase the penetration of Castle’s ActiveRecord to the “If there’s no VS wizard, I do not use it” kinda guys.

You can read about it and download it from

Speed up Visual Studio 2005 SP1 install


The SP1 of Visual Studio 2005 was out, and it was (almost) great.

Why almost? If you have tried to install it, then you must know. It takes a LOT of time to run. And it uses a LOT of resources. If you do not believe me, take a look at what Ayende has been writing while installing it.

Luckily, Jon Gallowai has blogged about a patch to shorten the setup time.

Take a look, if you care for you cpu time.

AspView rev 38 is out


What we have:

  1. Default Helpers are now declared in the AspViewBase. It means that you can use <%=FormHelper.LabelFor(…) %> without the need to declare the helper at the begining of the view.

  2. the compiler was refactored to allow for better testing, and for implementation of further view languages. vurrently I’ve started with VB.NET but it is not working yet, since I have no time to make sure the VB syntax is correct. The tests of the compiler are missing due to some stupidity on my side, of not commiting the TestCase …

I’ve wanted to let svn access but I have some trouble with that. I’ve started a sourceforge project but I cannot upload the repo to the site. I did all they’ve asked on the site but the import process reporting failure no matter what I do. I guess that the best way will be if the Castle team would allow AspView into it’s codebase, maybe on the Contrib repo to begin with …

So meanwhile you can download the current bits from here.

Keep me posted,


AspView - first release


So I’m releasing AspView.

You can download the source from here.

It was written against the Castle 1.1 from the trunk, build no. 152.

Please note that in order to run the TestCases you’d have to make sure that the latest Castle.MonoRail.TestSupport is in the GAC.

The documentation is poor since I have a little time now. I am working on a website for my employer (that utilizes AspView and AR) and until the first beta release I won’t have time to do anything but major bugfixes. This project isn’t open sourced so I won’t be able to share it’s sources, however since this will be a public site, it would serve as a Proof Of Concept to the MonoRail and AspView.

The views MUST have the following structure: a. Page header - Must be present for intellisense to work:

   1:  &lt;%@ Page Language="C#" Inherits="Castle.MonoRail.Views.AspView.ViewAtDesignTime"%&gt;

b. Directives - Not mandatory:

   1:  &lt;%@ Import Namespace="System.Text"%&gt;   2:  &lt;%@ Import Namespace="System.Drawing"%&gt;

c. Properties decleration - Currently it’s mandatory. If you have no properties you mast have an empty block:

   1:  &lt;%   2:  string[] strings;   3:      DateTime today;   4:  int index;   5:  %&gt;

or just

   1:  &lt;%   2:  %&gt;

d. View body

In a layout view you place the inner view using the ViewContents property, like this:

   1:  blah   2:  blah   3:  &lt;%=ViewContents%&gt;   4:  blah   5:  blah

AspView - Yet another MonoRail ViewEngine


.hlt { background-color:yellow;}
So what is AspView?

It is a Visual Studio 2005 friendly ViewEngine implementation.

The scripting is done using VisualStudio languages (c# and VB.NET). The views are precompiled, (or can be compiled on-demand, but anyway not interpreted).

The project was inspired by the Brail ViewEngine, but since it doesn’t use Boo it is more Management-Friendly, since they need not worry about getting out of the “safe” microsoft world.

I tend to like Boo as a language very much, and I like Brail a lot, too (since it allows for less code in the view thanks to the Boo magic) but I lack the tight Visual Studio integration (opening .boo files in #Develop messes up my desktop), and the intellisense is quite important, at least for the developers I worl with.

So I will post in the next few days about it, and I’ll make it available to be downloaded (source and binary) as soon as I’ll test it a little more. I hope to have a public svn repository soon.

A little demo view:

   1:  &lt;%@ Page Language="C#" Inherits="Castle.MonoRail.Views.AspView.ViewAtDesignTime"%&gt;   2:  &lt;%   3:  string[] strings;   4:  %&gt;   5:     6:     7:  hello from index&lt;br /&gt;   8:  This are the strings:&lt;br /&gt;   9:  &lt;%foreach (string s in strings) { %&gt;  10:  &lt;%=s %&gt;&lt;br /&gt;  11:  &lt;%  } %&gt;  12:    13:  &lt;br /&gt;  14:  End of normal view  15:  &lt;br /&gt;  16:  &lt;% OutputSubView("Home/SubViewSample"); %&gt;

Visual Studio for Database Professionals


Scott Guthrie has posted about the new CTP of the VS for DB Profs. I haven’t used this tool until now, but it looks as if I’m going to … I was looking for a better and easier solution for keeping an eye over the changes of DB schemas in projects I’m involved with, and I’m definitly going to check this one out.

Allowing XHTML tags intellisense in Monorail documents


PROBLEM:When editing Monorail views, you are losing the XHTML intellisense that normal webforms have in Visual Studio.

SOLUTION:Add a proper xmlns to the html tag.My layouts start with this:

   1:  &lt;?brail 
   2:      output '<'
   3:      output '?xml version="1.0" encoding="utf-8"?'
   4:      output '&gt;'
   5:  ?>
   6:  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"""&gt;
   7:  &lt;html xmlns="" xml:lang="he-il" lang="he" &gt;

This applies to brail, but can of course be used on any other view engine, with the needed adjustments.

Lines 1-5 is needed due to a bug(?) in some versions of brail. brail used to recognize a script by ‘<? ?>’, ‘<?brail ?>’ and ‘<% %>’ signs. therefore, using a <?xml ?> declaration caused the boo compiler to say that he knows nothing about ‘xml’. I think that Ayende has solved the problem now, by allowing only ‘<?brail ?>’, but I think it’s not yet on the main trunk, so I still use the listed method.

Line 6 is the DOCTYPE, I use XHTML 1.0 transitional.

Line 7 is the magic part. Visual Studio parses this line, reads the xmlns, and can hint you with intellisense forhtml tags and attributes. The xml:lang and lang attributes are of course changeable.

It works in layouts, or in views that are a full html document (with <html> tag) but not with VieComponents or views that uses layouts.

If someone has a way to do that, please share it.

ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas - By Scott Guthrie


Scott Guthrie has recently posted this. He is pointing out to a few dozens of posts about ASP.NET 2.0.

The stuff there ranges from UI tweaks, security, performance, VS2005 tips and more.

A “must be in the favorites or even as a desktop shortcut preferably with keyboard shortcut too” for everyone who deals with ASP.NET developing.

WinFx Whoops Messages


I’ve came across a funny post at Paul Stovell’s Blog, about the evolotion of error messages in the Visual Studio Family Products.

Give it a shot, and read the tech stuff there, too. Quite a good one and I recommend it.

Thanks to Oren for pointing that out for me.

Debug vs Release - Unabridged


In a lecture I’ve recently gave in our company, I’ve discussed aboutthe differences between Debug and Release builds, and ways to change the standard VS.NET configurations to better suit our build needs.

I’ll post the important stuff hereduring the next few days, including some links, diagrams and other things that will make the things as clearer as can be.

Please visit here again in the next days to see the post, and comment me for any mistakes I may have, or any other suggestions in that area.

Crash all the bugs (was that your auntie?)

VS 2005 adding web project's pdb files to vss, why is that and how to fix it


Well, Here’s my first hopfully useful post in my blog.

The problem:

pdb files of projects and assemblies being referenced by a web application, somtimes become “source controlled” when using VS 2005 and VSS. This is leading to the pdbs and even dlls to become readonly, and therefore the break of a succesful post-build events, such as copying newly compiled dlls to the web application’s Bin directory, hence unexpected behavior of the application.

The “Why the heck this is happening”:

Using VS 2005 to develop ASP.NET 2.0 applications is somewhat different than in the good old VS 2003.

The main difference is caused by the missing project file.

As opposed to VS 2003, which compiled the cs (and vb) files of a web project using csc.exe (and vbc.exe), as with regular (not web) projects, things are different with VS 2005 web projects.

In order to allow on the fly compile of source files (codebehinds and App_Code files), and on the other hand, to allow a precompilation ofthe whole project (including aspx, ascxand other “non code” files), the framework has provided us with a special compiler, named aspnet_compiler.exe

allowing a full “automated” compiled outside of any IDE, requires disrelying on an IDE specific file, such as the csproj/vbproj files, therefore, everything in (and under) the application’s directory considered to be a part of the project.

In VS 2003 the compiler knew about referenced dlls and projects from the csproj/vbproj file. Now referenced dlls are known throuh a .refresh file in the Bin directory, that points to the location of the dll, and referenced project files are written to a special section in the web.config.

Controlling the source manually using VSS interface is possible, yet you have to manually remember not to check in items from the Bin directory, except the .refresh files.

The VSS integretion in VS 2005 is trying to outsmart the problem. it assumes that if a .refrsh file exists in the Bin directory, then the file it references is not to be source controlled. For example: if the Bin directory contains a file names MyAssembly.dll.refresh, then if it also contains a file names MyAssembly.dll (and it will, after a succesfull build), it won’t treat it as source controlled.

It also understands that if a file is there, due to a build action, it is also marked so it won’t besource controlled.

But, if you build you solution in Debug configuration,now you have pdb files in the Bin directory. let’s say that you do a Release Build, that does not create and copy pdb files. now the existing pdb files in the Bin directory are not marked, and the VSS integration will sense that there are new files in the Bin, that have no .refresh file, andwas not created during the last Build event, so it will mark them as Check InPending files !!!

The “Gosh it’s Ugly solution”:

You need to:1.Rebuild the solution in Debug configuration2. Close and Reopen the project.

If you’ve already accidently Checked In the pdb files, you need to:1. Manually delete them from the VSS.2. Manually set their readonly attribute to false.3.Rebuild the solution in Debug configuration4. Close and Reopen the project.

The place where i’ve found this solution:

So until next time, keep on with the good coding thing you’ve beendoing while you’ve start reading this post.


Follow @kenegozi