Oren Eini

CEO of RavenDB

a NoSQL Open Source Document Database

Get in touch with me:

oren@ravendb.net +972 52-548-6969

Posts: 7,575
|
Comments: 51,197
Privacy Policy · Terms
filter by tags archive
time to read 1 min | 71 words

Well, I found out exactly how useful the AssemblyResolve approach is.

I can load the assemblies that I need (although I didn't test it for assemblies that references more assemblies, where I think it will fail).

But NHibernate will not load it. The reasoning being that NHibernate load types using the Type.GetType() method, and assemblies that has been loaded with Assembly.LoadFrom() don't get to participate in this. WTF! Can anyone explain why?

Currently I don't have a solution.

time to read 3 min | 421 words

I've been battling with the way the CLR handle AppDomains and loading assemblies for the last two days, and no success seems immanent. I need to load assemblies from two locations, my own ApplicationBase, and another directory, but I keep getting only one of them.

The issue is complicated because I'm trying to make NQA a multi AppDomain application, the reasoning is very simple, you can't unload a single assembly, only AppDomains, and the whole point of NQA is that you can load and unload assemblies and test them.

What I want to achieve is to load my own assembly and NHibernate to the dynamic AppDomain, and then load the user's assemblies. Then I can just call from the UI to the AppDomain and back. When the user recompile his assemblies, I can re-load the assemblies easily.

But I can't make it work!

I can either get the AppDomain to load my assembly and Nhibernate, or I can get it to load the user's assemblies (at least I think that I can, I can't test this until I can get the code to run!)

I've tried toying with ApplicationBase, PrivateBinPath, PrivateBinPathProbe, etc, with no success.

The scenario is really simple, I've the following directory structure:

C:\Directory One\main.exe, C:\Directory One\loader.dll, C:\Directory One\NHibernate.dll
C:\Directory Two\library.dll

What I want to do is, from main.exe, to create a new AppDomain, load loader.dll to it (which references NHibernate.dll) and then load library.dll from Directory Two.

I can't find a way to do this! If I set the ApplicationBase property of the AppDomain to Directory One, then the library.dll fails to load, if otherwise, then the loader.dll fails to load. If I try to use LoadFrom(), it fails because it can't find the referenced assemblies.

I can't assume that I've write access to either of those two directories, so just copying them there wouldn't work.

I'm going to experiment with AssemblyResolver and see if that can help me, but I'm not very optimistic.

Blog Update

time to read 1 min | 80 words

I've updated the blog software from dasBlog's CVS Repository, so now I've a blog statistics on the page. I'm very impressed by this work. It was my own request that caused this to happen, and I'm very glad of that.

So, 249 (including this one) in 1 years, 3 months, and 6 days that I've been blogging.

I also reduced the size of the Google ads, they were too intrusive.

time to read 1 min | 183 words

I read the next couple of books, and they are really good:

Product image for ASIN: 0321228103 Open Source .NET Development : Programming with NAnt, NUnit, NDoc, and More
Product image for ASIN: 1590591046 In Search of Stupidity: Over 20 Years of High-Tech Marketing Disasters

Those two I didn't read yet, but they become more relavant after the recent events.

Product image for ASIN: 1590593308 Cross-Platform .NET Development: Using Mono, Portable.NET,and Microsoft .NET
Product image for ASIN: 0596007922 Mono : A Developer's Notebook (Developer's Notebook) 

time to read 5 min | 970 words

The issue has been debated by people far more experienced than I am (see here, here, here and here for good arguments both pro and against).

My own thoughts? JetBrains (the creators of ReSharper, which I've been poetic about before :-D) intend (bottom of the page) to create an IDE for .Net, and that most probably mean that I will be leaving VS.Net behind. I've spoken before about moving to VS 2005, but as long as that means leaving ReSharper behind, that ain't gonna happen. I'd recently had been forced to work on VC# Express 2005, which doesn't have ReSharper, but has refactoring tools that does much the same. The experience has been so far beneath what I can do today with VS 2003 + ReShaprer that I came to a near complete halt. (Somewhat aided by some bugs in VC# Express, but that wasn't the main thing.) The amount of manual work that I had to do which ReSharper handled for me was astounding. About the only thing that ReSharper can't do is to reference a dll.

What do you mean I've to compile to see the errors1? And the refactoring support that ReSharper has is far more mature than what VC# Express Beta 1 shows. And code browsing, and variable name suggestions, etc. All of those makes working with VS.Net 2003 a pleasure, and working with VS.Net 2005 a chore.

How does this relate to Team System? Well, Frans was the first to catch on, but when JetBrains release their IDE, it's going to have:

  • Support for Subversion as a Source Control Management System is already promised,
  • Support for unit testing via NUnit (with options to add others, so I can still use MbUnit :-D).
  • Support refactoring all the way to the source control (which mean that I no longer have to remember to svn move files when I rename them.
  • An API to add new languages - So I can get Boo, and maybe even get some JetBrain Magic SauceTM to go along with it.
  • Will use build.xml files as it's native solution/project format - replacing the need of NAnt and still allowing all the goodies.
  • Probably allow me to target different versions of the CLR.

With all of those features, I can't really see much attraction for VS Team System for the ISV or consultant. The only thing that is missing there is a bug tracking that is built in the IDE, and that can be solved as a plug-in or enhancement.

Assuming that the price tag would be similar to IntelliJ IDEA, that would be 499$, compare that to the multi thousands of dollars that you would get the same functionality from VS Team System. On the other hand, VS usually ship with a multitude of helper wizards that make common tasks much easier (database work is one such example). Personally, I don't use this functionality in VS, and don't ever intend to. That is a personal opinion of mine and probably many other developers disagree.

I intended to register to the Empower program, based on Joel's advise, which meant that I could quite a heck of a deal on this. I'll still probably go this route, to save money for the OS and servers. But I'm considering more and more to avoid all this complications and use an IDE that is willing to help me be lazy, and the tools that I'm already familiar with and use daily. And if I get the same tool set that I can get today, with a tighter integration, than it's really no brainer.

Alex Lowe seems to think that most developers don't know JetBrain. He is probably right, but they would search for alternatives when they would find out that they need to pay so much more for everything that Microsoft sell2. And the other ISVs that are familiar with this would make sure that they do know about it. The blogging community isn't that big, if you compare it to the size of the developers community, but they are well connected, usually.

I can't conceive developers moving from tried-and-true tools that they know and love (price tag: $0, limitations: none, source-code: included) to a far more complex beast that may or may not be available in version 2. And I think that this would be a big lose for Microsoft. This is not meant to convince Microsoft to change it's opinion, by the way. As a matter of fact, I don't care much personally. I don't foresee a change in circumstances that make me want to use Team System features.  They want to target the Enterprise market, but they are very weak in this regard right now. And I think that a company with thousands of developers (just the kind that Microsoft is targeting) would want to use something that come from Microsoft and holds their entire future in its innards. Not without solid proof and developers clamouring to get it.. And I can't see people getting excited about it when the price is so high that they can't use it at home or for their own projects.

1Yes VB-ers, you can laugh now, you'd it circa 1995 or so, I know.

2As a matter of fact, I agree with Erik here, most people buy MSDN Universal to get exactly that feeling.

time to read 1 min | 175 words

I'm going crazy, I lost VS.Net 2003, and I reverted to using VS.Net 2005 (yes, I reverted. VS.Net 2005 doesn't have ReSharper, and that is a big minus in itself.).

Then I started getting problems With TestDriven on VS.Net 2005, and couldn't debug or test with debugging. That totally take me down because I refuse to do all the hard work myself. There are tools for that, and I've found out that I'm not nearly as productive as I can be without two of my favorite tools.

I don't have access to the DVDs that I need in order to fix that, and it has been driving me crazy! I'm writing documentation now, so at least something good may happen because of this.

[Update, I just got an email from JetBrains, and they say that there should be an Early Access Program for ReSharper on VS.Net 2005 starting in may! Final release is scheduled to one month after VS.Net 2005 hit the shelves.]

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. RavenDB News (2):
    02 May 2025 - May 2025
  2. Recording (15):
    30 Apr 2025 - Practical AI Integration with RavenDB
  3. Production Postmortem (52):
    07 Apr 2025 - The race condition in the interlock
  4. RavenDB (13):
    02 Apr 2025 - .NET Aspire integration
  5. RavenDB 7.1 (6):
    18 Mar 2025 - One IO Ring to rule them all
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats
}