Skip Navigation Links
MAIN
RESUME
IMAGE GALLERIES
ABOUT ME
OTHER STUFF
  Tuesday, March 09, 2010  
Skip Navigation Links

Maximum file path length - Windows and TFS - Part 2 - error CS0006: Metadata file could not be found

clock May 16, 2009 12:49 by author Troy

I blogged about TFS and the maximum file path length issue a while back, and thought I had covered it pretty well.  However, the issue came back to sting me again, so I thought it deserved another post.

Our issue was, sometimes, but not all the time, we would get this error on our team build on the build server (but the local developer build would always work fine).

[Any CPU/Release] CSC(0,0): error CS0006: Metadata file '..\..\..\..\SharedAssemblies\MSApplicationBlocks\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll' could not be found

It took some time to figure this out... the path was correct on the server and the DLL was there.  Now if you are the intuitive type, you may have already guessed from this blogs title that the problem is related to Windows path length limitation, but why was the problem intermittent?

It turns out that this assembly reference was on a VS.NET Team Test Unit Test project.  When you used the right click "Create Unit Tests" menu to create a new test, the wizard automatically adds assembly references, including a reference to this ExceptionHandling.dll.  This would break the build on our build server.  Our quick solution was to remove the reference from the unit test project, everything still compiled and it didn't seem to be needed.  The builds now worked again on the build server, UNTIL someone added a new unit test and the cycle would start over again.  This explained our intermittent problem.

It still didn't explain why the build failed when this assembly was referenced, until I happened to find this blog entry... the same blog entry I noted in Part 1 of this blog series, but I didn't connect the dots until now. Aaron's blog entry talks about the 260 character path limit, but doesn't mention the error message we were seeing.

It turns out, that for our unit test project,  this ExceptionHandling.dll reference was the longest path of all of them, and was just long enough to be too long, but ONLY on the build server.  The way the build server paths are structured is different than our dev boxes, which was shorter by about 25 characters and this explains why the build would break on our build server but not on our local boxes.

The other severely annoying thing is that the actual error message mentions NOTHING about the path length... just that the file cannot be found.

Using Aaron's tip about these variables ($(BuildDefinitionPath) and $(BuildDefinitionId)) in the properties of the Build Agent I switched to using the $(BuildDefinitionId) which shortened the path on our build server by about 23 characters.  Now the builds always work.

The moral of the story is... if you see the error message above, double-check your path lengths.

 

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


SQL Server Gotcha - Cannot open database requested in login 'dbName'.

clock March 10, 2009 21:12 by author Troy

So I had a good fight today with a SQL Server 2008 connection that would not work.  The error was:

Cannot open database requested in login myDbName. Login fails. Login failed for user 'myDbUserName'

 This was dumbfounding.  Troubleshooting the usual suspects, the following were attempted:

  • check the database server to ensure that the database exists
  • check the user login to ensure it exists, check the permissions for the user for this database
  • try to connect using SQL Server authentication using this username and password from the Enterprise Manager - this works perfectly fine - but the ASP.NET application still gives this error
  • double, triple and quadruple check the connection string for the ASP.NET application - no problems found
  • drop the database and the login, recreate and try again - no difference
  • reboot the database server - no difference
  • check the event log for error messages - only the one displayed above is shown - nothing else out of the ordinary

WTF?

I finally figured out, after a couple hours of head-scratching, from going through some event logs within SQL Server Enterprise Manager that the database name had 6 space characters appended to the name. Therefore what appeared in Enterprise manager and everywhere else as "myDbName" was actually "myDbName      ".  Something is obviously wrong with our MSBuild script which is autogenerating the database for us during the build process... I still have to figure out how it happened, but at least now I know why it would work in Enterprise Manager and not from the application.  The app defines the connection string explicitly (with incorrect name missing spaces), while EntMgr connects and gives you a list of databases to choose from, so you never need to define the database name.

Once I renamed the database to remove the blank spaces, everything worked again.

I confirmed my theory by running this query, which highlights the extra spaces:

SELECT '"' + name + '"' FROM sys.databases

Ahhhh, the world makes sense again.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


New Computer - Time for a major upgrade

clock December 15, 2008 20:44 by author Troy

This story actually starts over a year ago when I decided that I might like to upgrade my computer.  I used to be an avid gamer... that dried up a little, but partly because my hardware was a little deficient for the latest titles.  I don't play XBox or any of the other consoles... I just never got into them.  When I do play video games, they are on the computer.  These days, it is probably more like 85% power user and 15% gamer.  I don't need the latest and greatest hardware, but it is a nice indulgence once in a while.

As I said, I started doing my research for new hardware over a year ago.  I got about half way through picking components, and got sidetracked by something else.  By the time I got back to it a couple weeks ago, I had to start all over again.

For this upgrade I would be replacing almost the entire box and its contents.  First a look at what I am replacing:

  • AMD Athlon 64 3400+ CPU @ 2.2GHz (socket 754)
  • ABIT KV8 Pro v1.1 motherboard
  • 1GB RAM Kingston Value RAM PC3200
  • 200 GB Western Digital Caviar SATA WD2000JD Hard Drive (Configured with a 12GB System partition and a 188GB Data partition)
  • DVD-RW - NEC ND-3500A
  • ATI All-In-Wonder X800XT Video Card
  • Cambridge Soundworks 4 Point Surround speakers
  • Windows XP SP2

It is a bit funny to look back now.  I first got the CPU in November 2004.  Back then, 64-bit computing was going to be all the rage, and I thought my purchase would help to future-proof my machine.  Well, here we are 4 years later, and the machine never did see a 64 bit operating system.  Only now are 64 bits becoming more adopted and stable/supported enough to make the switch.

During this round of research, I was surprised to discover that SLI (Scalable Link Interface for the semi-techs - "hooking up multiple graphics cards together so they work as one" for the non-techs) had made a comeback.  However, I was disappointed to find out that NVidia had held exclusive licensing rights which meant the only chipset that supported SLI was the NVidia nForce chipsets.  Based on what I read, these chipsets are generally of lesser quality than their Intel based competition.  So it seems that choosing a motherboard/chipset now required you to choose which video card manufacturer would get your business (ATI or NVidia), because if you wanted to support SLI (or CrossFireX) then support from the motherboard was required.

This powerplay by NVidia has finally come to an end with the X58 chipset from Intel.  This is the latest chipset that supports the latest socket 1366 Core i7 CPU's recently released from Intel.  These processors are quad core and represent the first round in some fundamental changes to CPU architecture, compared with their predacessors.

Now normally, I am an analytical, common sense kinda guy.  I don't buy brand new cars... I buy 1 year old with 30,000 KM on them.  The same goes for computer hardware, don't buy the latest, greatest model of anything otherwise you pay through the nose now, and in 6 months, the same item can be had for 1/2 the price.  I would much rather buy the 2nd generation product and save money.

<beginJustification>
This time, I couldn't get over the NVidia chipset thing.  I wanted to try NVidia video card(s) this time, because I had seen first hand some of the low quality drivers/software created by ATI over the years.  To be fair, my research indicated that ATI has gotten better in the last year or two... but I still wanted to try walking on the green grass on the other side of the fence this time.  Choosing NVidia meant wanting to support SLI (just in case I ever move to 2 cards).  Supporting SLI meant being forcefed the nForce chipset, or bite the expensive bullet and jump to the top of price mountain and go for the X58 chipset that supports both SLI and CrossFireX.  Guess what I did.
</beginJustification>

Edit: Well, about 2 or 3 weeks after buying my nVidia GTX280 based video card, they mothballed that model in favour of the GTX285.  I guess I won't be going SLI anytime soon.  I do still like the versatility of supporting both ATI and nVidia though.

Now, for a look at what I upgraded to:

  • Intel Core i7 920
  • ASUS P6T Deluxe motherboard
  • 6GB RAM G.Skill PC10666 triple channel
  • 150GB Western Digital VelociRaptor WD1500HLFS (10,000 RPM for System Drive)
  • 1TB Western Digital Caviar Black (Data Drive)
  • DVD-RW - NEC ND-3500A
  • XFX GTX280 1024MB Video Card
  • Coolermaster Stacker 830 Evolution case
  • Logitech X-540 5.1 Speakers
  • Windows Vista Business x64

So far, things are running great, and I am happy with the upgrade.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


PDC 2008 Scott Guthrie @ Open Space

clock November 9, 2008 13:27 by author Troy

After returning from PDC 2008, I've finally had a chance to process some video that I recorded of Scott Guthrie who participated in an Open Space meeting for about an hour.  Unfortunately, I only recorded about 15 minutes of the action before my memory card filled up, but I guess that is better than nothing.

I did my best to clean up the audio, which had alot of ambient room noise.  I wish it could be better, but I think it is clear enough now to be understandable, if not somewhat enjoyable.

The video is hosted on YouTube and due to time restrictions on uploaded video, the content is split into 2 parts. 

In the first part,  Scott talks about:

  • ASP.NET and MVC Framework - the future of both and them co-existing with each other
  • Data Access - LINQ and the Entity Framework

In the second part, he discusses:

  • Functional Programming - programming WHAT you want done, versus the more typical HOW to do something, citing LINQ as a simple example
  • Moore's Law - gradually being replaced by new rules where the number of machine cores will begin doubling
  • Parallelism - efforts to make it easier for developers to take advantage of multiple cores through explicit APIs and implicitly through improvements to the CLR
  • F# and .NET 4.0
  • Dynamic Languages
  • WPF and Silverlight

Part 1
http://www.youtube.com/watch?v=9-62sSDTIMY

Part 2
http://www.youtube.com/watch?v=lXm60VnyZwo

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Azure manages to avoid a Hailstorm of criticism -- extended

clock November 2, 2008 14:42 by author Troy

I just got back from the PDC 2008 in Los Angeles where Microsoft unveiled their plans for Windows Azure.  Azure is their answer to computing in the cloud.

After having spent nearly an hour at the Azure desk, speaking with a Group Program Manager from Microsoft, I was approached by a CNET news reporter and asked if I would be willing to comment on Azure.  They were looking for developer reaction to the announcement.  Of course I said yes.

The questions (and subsequent article) seemed like they were looking to find a negative angle to explore, but I don't think they were able to find one.  In the end, I think the article came out reasonably fair.

Azure has some challenges ahead, as were conceded by Ray Ozzie.  There will be companies who will not adopt computing in the cloud and trusting Microsoft is an issue for some.  However, I think that like many other technologies, it is right for some and not others.  Azure offers some definite benefits, and I for one, welcome the choice, regardless of whether or not it is right for my projects.

Not all of my comments were included in the article of course.  We chatted for probably 5 or 10 minutes, and only a soundbite quote made it into the article.  The quote is ok... it is neither overly positive or negative.  The intent of the quote was meant to be positive.  Prior to the quote that was used, I indicated that I would be evaluating Azure with an open mind for our projects.  I said that there were lots of third party hosting companies located in North America, and it was common for companies to pay for hosting, thereby placing their intellectual property into the hands of others and that requires a degree of trust.

The quote that made it into the article followed this, which basically said that I don't see much difference between paying for hosting with another company and paying for hosting within the Microsoft Windows Azure platform.  In fact, it appears that there would be additional benefits to the Azure platform than just simple hosting, including a number of open standards based framework services.

Overall, I was glad to be interviewed.  It was fun.  You can read the full article here:

http://news.cnet.com/8301-13860_3-10078496-56.html

  View from keynote where Azure was announed.
               View from my chair at the keynote where Ray Ozzie announced Windows Azure.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


blog.TroyFarrell

About the author

Troy Farrell

E-mail me Send mail
Troy Farrell
I am a software architect and computer programmer living in Peterborough, Ontario, Canada.

Search

Calendar

<<  March 2010  >>
SuMoTuWeThFrSa
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Archive

Tags

Categories


Blogroll

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway. In fact, if I was agitated at the time, they may not reflect my own personal opinions.

© Copyright 2010

Sign in

© Copyright Troy Farrell 2010