Kevin Castle Dot Net
MyPicture.gif in content/binary
Navigation
RSS 2.0
Calendar View
<September 2008>
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011
Categories
On this page....
Categories
Blogroll

Powered by: newtelligence dasBlog 1.9.6264.0

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008 , Kevin Castle

Send mail to the author(s) E-mail

 Tuesday, October 31, 2006

October 24th and 25th 2006 will go down as the most annoying days that I have had (for the better part of my software development life). Anyone who has seen this CS0433 error after converting a VS2005 website to a Web Application Project will feel my pain.

Here are the following events which had occurred:

  1. A VS2005 website was created and a small number of pages, controls, sitemaps, etc were added.
  2. A decision in the department was made to use the VS2005 Web Application Project for .Net 2.0 websites.
  3. Our group downloaded and installed the WAP Add-In (Download Here)
  4. I removed all of the VSS bindings (we are still waiting to receive our full Team Foundation Server edition)
  5. I followed steps to Upgrade a VS2005 Web Site Project to VS2005 Web Application Project tutorial.
  6. Everything went smoothly except that it was kind of a pain to add the namespaces to all of the source files. Nonetheless, I was happy because I was out of the horrific WebSite method of developing web applications. The application built correctly and I added to a separate project in VSS.

Everything seemed to be going great until I fired up the debugger and ran my application.

This is the error which I would stare in the face for the next 8 hours

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0433: The type 'AgencyPro.UserControl_NavTree' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3f88d5c8\5840425e\assembly\dl3\e396fa14\0b806043_51f8c601\AgencyPro.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3f88d5c8\5840425e\App_Web_navtree.ascx.78d7338a.aftov38w.dll'

Better yet here is the actual screen so that you can have the image burned into your mind.

I did a search on Google and it turned out that tons of people had faced this similar issue. However, I was completely unable to find anything which directly gave me a fix.

Initially I thought this issue was caused for several different reasons.

  1. Maybe I needed to add the default namespace to all of the files in the project? - I did this and the issue continued.
  2. Maybe it was because I had the reserved directory App_Code in the project? - I removed this and the problem was still there.
  3. Maybe I needed to create an entire new project and add all of the files to that again? - I did this and the issue continued.

The obvious answer was that this error was being caused by the new ASP.NET compilation methods where a dll is generated for each of the pages (so lame in my opinion), but it was all a matter of trying to figure out how to override this behavior. After searching around in the web.config documentation, I felt stumped and due to the difficulty with generating a search phase which would turn up any real answers I was lacking documentation.

At this point I was getting a little desperate and frustrated but I knew that if I created the project from scratch and added all of the files from scratch as well, then this issue would go away. In fact, the only solutions that I had found for this issue had been describing doing just this. So, I gave up, and rebuilt everything from scratch (meaning copying and pasting all of the code into brand new files) but I still had to know what the fix was.

A buddy of mine @ work (Bruce Hoang) came over to my desk and told me to check out this article at DevX. Yes! All of my questions were answered.

Solution:

  1. Remove the App_Code directory from the project.
  2. Change the CodeFile attribute to CodeBehind on your .aspx, .ascx, .master, etc. pages.

Main Cause

  1. I followed all of the recommended steps in the VS Web Site to VS WAP conversion but now in hindsite I think that the issue was caused by the fact that my files were still ReadOnly from VSS. Therefore when I ran the conversion, it was not able to change the CodeFile attribute to the CodeBehind  attribute on all of the pages.

Above -  The Attribute that stole my time!

For an in depth article on ASP.NET 2.0 compilation and deployment issues I would recommend this as a must read.


Post Date: Tuesday, October 31, 2006 8:58:24 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [1] | Trackback   #

As I mentioned in one of my previous blog posts, I have been using Windows Live Writer to add/update my blog posts. I recently ran across a new plugin called CodeHTMLer for Live Writer. Its a great way for posting formatted source code. You can read more at Wes' Puzzling's blog.

Download the plug-in. 

Current supported languages include : C#, C++, Java, JScript, VB.Net, XML, and Powershell

Sample Source CodeHTMLer

/// <summary>
/// Summary description for Main.
/// </summary>
static void Main(string[] args)
{
  // string variable
  string myString = "myString";

  /* integer 
     variable */
  int myInt = 2;
}

Post Date: Tuesday, October 31, 2006 8:08:40 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Monday, October 30, 2006

I recently ran across this really interesting site called Programmable Web. The site offers information on hundreds of different Web API's ranging from Flickr, to Amazon, to Google Maps. 

On a sidenote, my personal favorite Mashup website is HousingMaps. It uses the real estate listings on CraigsList and overlays it onto a GoogleMap. The end result is a really cool way for searching for overpriced housing.


Post Date: Monday, October 30, 2006 8:15:13 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Friday, October 27, 2006

"Changes are not allowed while code is running or if the option 'Break all processes when one process breaks' is disabled. The option can be enabled in Tools, Options, Debugging."

If you're like me and you've had to work with a number of different installs of VS2005 then you have probably seen prompt before. You tend to see this annoying pop-up message while you're in debugger mode and you try and modify any of the source files. All that you will need to do is to uncheck the "Enable Edit and Continue" option in Tools > Options > Debugging > Edit and Continue.

 

If anyone has any more info about this issue please, please leave a comment.


Post Date: Friday, October 27, 2006 7:27:27 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Thursday, October 26, 2006

There is an upcoming MSDN chat for Team System. These chats provide a great platform to ask the members of VSTS and TFS all of those insightful questions (or gripes) which you have been saving up. I joined in on the chat last month and found it to be an informative experience. I recommend it to anyone using TFS or VSTS.

The chat will take place Nov 8, 2006 from 10AM - 11AM Pacific Time

MSDN Chats


Post Date: Thursday, October 26, 2006 8:25:09 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #

Mattias Lindberg recently posted on the advantages of VSS over Team Foundation Version Control. The main idea which Mattias was trying to get across was the fact that TFS Version Control is simply not a viable solution for developers who are running a small operation (1 to 2 developers). In order to get TFS up and running, there are several costs and requirements which make VSS a more viable, affordable option (although it may not actually be a better source control system). The hardware, software/OS costs to install TFS can be tremendous so I completely understand where the author is coming from.

Personally, I view TFS as a software process solution which integrates Version Control into the engineering process. Therefore, personal projects which may not require all of the additional TFS features (process guidance, Office Integration, TFS Build, Work Items, etc.) may benefit more from the lightweight VSS alternative. Afterall, there is a large amount of ramp-up time required just to start to get familier with all of the features (and small issues) with TFS.


Post Date: Thursday, October 26, 2006 7:30:35 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Wednesday, October 25, 2006

Yesterday I decided to sign up for a feedburner account in hopes that I could track the number of subscribers for my blog. As a result my feed URL has changed to http://feeds.feedburner.com/KevinCastleDotNet.


Post Date: Wednesday, October 25, 2006 8:58:33 PM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #

CodeSmith 4.0 Beta 2 was recently released.

Below is a sample list of changes which have been made from the previous version 3.2.X.

  • CodeSmith Project support (.csp files).  This replaces property sets, the custom tool and the batch format.

    • CodeSmith Projects can be run from the command line, inside MSBuild, inside CodeSmith Studio, and inside Windows Explorer.
    • Inside of Visual Studio, any outputs that are generated will automatically be added to your project.
    • If you build your project and you have the "Generate On Build" option on, your outputs will automatically be re-generated even if you generate from the command line using MSBuild.
    • Progress dialog is shown when running from Windows Explorer.
    • GUI dialogs to easily manage your project file.
    • Easily add new outputs where you select a template and specify the property values.
    • You can also specify merge settings through the GUI to enable code merging support.
  • ActiveSnippet support.  This will allow you to type something like:  "tp Petshop.dbo.Orders" inside of Visual Studio and then hit the expand key (CTRL-E, CTRL-E by default) and it will expand out into a list of property getters/setters and member variables based on the fields and data types of the Orders table.
  • CodeSmith Map support (.csmap files).  This feature will allow you to create dictionary style maps of things like SQL to C# data type mappings.
    • Example: <%@ Map Name="CSharpTypeAlias" src="System-CSharpAlias.csmap" Description="Maps system types to C# aliases." %> <%= CSharpTypeAlias["System.String"] %> = "string"
    • Ability to reverse the map and use the values as the map keys.  This is useful for doing reverse lookups.
    • Ability to return the key value if a corresponding map entry is not found.
    • Ability to return a default value if a corresponding map entry is not found.
    • Ability to manage maps inside CodeSmith Studio or from Windows Explorer.
  • Ability to manage database schema extended property values from inside of CodeSmith Studio.
  • XmlProperty support has been enhanced to handle more variations of XSD.
  • Template property values are saved for templates so that each time you run them, you donb_t have to reset the values manually.
  • .netTiers 2.0 templates are included in the install.
  • Added csxsd.exe to allow manually creating shared XmlProperty assemblies.
  • Ton of new system extended properties added to SchemaExplorer objects.
  • Bunch of performance improvements here and there throughout CodeSmith.
  • Bunch of bug fixes.

For further detail for Beta 1 and 2 changes please check out this entry on the CodeSmith Community Blog.

In addition, I also found these screenshots and specific feature explanations to be really insightful.


Post Date: Wednesday, October 25, 2006 11:42:54 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Tuesday, October 24, 2006

Eteinne Tremblay has created Team Foundation Server install scripts for both Dual and Single server installations. As everyone who has installed TFS knows, it is not exactly a fun process to manually install all of the prerequisites including IIS, SQL Dev + SP1, Sharpoint Services, additional service packs and then the TFS application itself. Now I wish that at this point I could comment more on how much time that this had saved me, but unfortunately all 3 of the TFS installations which I have undergone at this point have all be done manually. If this really is as easy as it sounds (dropping the installation executables in the folder and letting the scripts do the rest) then I would recommend to anyone.

Read Etienne's blog post on his v2 TFS install scripts.

Click here to read Accient Blog's post which originally had posted the updated scripts. (note: The zip download for the scripts can be found at the bottom of the weblog post)

Download the TFS Install Scripts.


Post Date: Tuesday, October 24, 2006 5:58:23 PM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Sunday, October 22, 2006

Everyone in the industry understands that when it comes to interviews, we usually make a few Google searches either to get ready to GIVE an interview and also TAKE an interview. Having been on both sides of the table this last month I found a few blog posts which really helped out.

The one that stood out the most to me was this great post from Riley's Blog @ gigadotnet.com. The questions and answers provided seemed to hit on most important topics, and ultimately I think it is a great starting point for preparing for .NET interviews.


Post Date: Sunday, October 22, 2006 3:15:04 PM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Monday, October 16, 2006

This may appear to be somewhat late news, but it is still worth noting for importance. The Microsoft Solutions Framework Process Guidance which shipped with TFS has been updated. When initially released there were some issues which may have been encountered, but Rob Caron has re-released the zip files to alleviate any of the issues. You can download the process guidance updates for both Agile and CMMI in the links in Rob's Blog post.

Randy Miller has recently published a post discussing the changes which have been made to the newly released guidance files.


Post Date: Monday, October 16, 2006 6:09:31 PM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Thursday, October 12, 2006

The installation guide has been updated for Team Foundation Server. Make sure to download the latest Compiled Help file. Check out Rob Caron's weblog post to see the changes which have been made.


Post Date: Thursday, October 12, 2006 12:45:28 PM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #

Looks like IE7 is going to be released on November 1st via Windows Automatic Updates. I personally haven't installed any of the beta's or release candidates yet, but from what ive heard its going to be "teh awesome". I'm actually really excited for the new version and am thinking about switching back from Firefox.

As an ASP.NET developer I have always tested my projects with IE, but then I browse the internet using Firefox. There's nothing really wrong with that, it would just be nice to actually build sites and test them using the same browser which I use to browse the internet. Of course I realize that I can easily test/debug my apps using Firefox as my other colleagues do, but its usually a corporate initiative that the our sites must support IE so I usually choose it to debug with.

That being said, I have had a number of recent issues with Firefox (start up times, freezing, updates and restarted automatically, etc.) and will probably try to use IE7 as my default browser. The only thing I think ill miss in Firefox will be my cherished Mouse Gestures plug-in.

If you don't to adopt you can install the Toolkit to disable the Automatic update for IE7.

Check out the IE blog for the latest and great info. I would at least recommend that you check out this post for more info about IE7 readiness and adoption.


Post Date: Thursday, October 12, 2006 8:11:18 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Wednesday, October 11, 2006

I recently read an interesting post on Rob Caron's blog which referenced the importance of static code analysis. I agree with both Rob Caron and David Falkenstein that taking the extra time to run tools like this can help ensure the quality of the software product.

Recently, I have submitted my proposal for my Software Engineering Master's Project at California State University of Fullerton. The project in brief, will discuss how Team Foundation Server can be used/customized to promote quality control within a project such that it can remain within statistical control. One of the sub-points in my proposal summary was the fact that Team System could support static code analysis and that with each project (or each iteration if one were that ambitious), that rules could be modified based upon the possible issues which may been found responsible during root cause analysis on the Bugs which QA found. As a result there is a need to easily customize rules and deploy them to client machines. At last, I found a great resource on how to build custom rules with the Team System Static Code Analysis tool (FxCop). The FxCop Blog is a great resource.

While searching the weblog I found this great post in the FAQ section. It is a great reference for creating new rules and registering them with the Static Code Analysis tool in VSTS. Simply follow the steps listed and make sure to read some of the information which I have provided below.

The post contains an zip file containing the sample source required to build a custom rule which checks member prefixes. The entry is a little outdated, thus you should take the following into consideration.

  • The directory where the rule dlls should be dropped has changed since the post was written and is now located at C:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\Rules
  • You only need to copy the .dll into the directory listed above. The other files are not required to register the rule. (The xml file is an embedded resource)
  • More FxCop FAQ can be found on this Microsoft Forums post
  • Screenshots 

Screenshot: Drop the built dll into the following directory.

Screenshot: Code Analysis enabled with Samples rules enabled

Screenshot: Code Analysis warnings when Building the Solution


Post Date: Wednesday, October 11, 2006 1:58:23 PM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [1] | Trackback   #
 Tuesday, October 10, 2006

I recently updated the layout and features of my blog. Initially when I downloaded dasBlog I was sort of dissapointed with the themes which it had to offer. After searching around for about a month for a theme that I really liked, I decided to go ahead and make my own. I understand that most people would rather subscribe to your blog feed rather than actually visit your site, but I figured it would be a good idea to have something which was customized for my appreciation (even if nobody pays a visit to it).

In addition to a my theme, I created a Macro footer for my blog posts which will hopefully give my site more visability. (I know that this is not a new idea but I wanted to learn how to create dasBlog Macros most of all). For more information on how to create dasBlog Macros check out Kris' Blog post.

Lastly, I added the Categories Tag Cloud to the sidebar. This was a new feature in dasBlog version 1.9 but was extremely difficult to find documentation on. After search around for quite a while, I sent Mr. Scott Hanselman an email and he so kindly explained the intricate details for adding the Tag Cloud. Just add : <%drawtagcloud() %> . (Its always good to send one of the most famous .NET developers in the country the stupidest questions. Make a note of that if you're an aspiring developer:) )

If you are going to add the Tag Cloud Macro on your blog, make sure that you define the necessary styles so that it doesnt look like crap.

.tagCloud { }

.smallestTag, .smallestTag A { font-size:xx-small; }

.smallerTag , .smallerTag A{ font-size:xx-small; font-weight:bold; }

.smallTag,.smallTag a{ font-size: x-small; }

.mediumTag, .mediumTag A{ font-size: x-small; font-weight:bold;}

.largeTag, .largeTag A{ font-size: small; }

.largerTag, .largerTag A{ font-size: small; font-weight:bold;}

.largestTag, .largestTag A{ font-size: medium; }

Caching Issue : In order to see the blog layout changes you will need to clear out your cache for my page. I know this sounds really lame but I had to enable output caching on the main page so that it wouldn't allow visitors to change their theme for my blog. Sorry.

You should see a page which looks like this if your cache is cleared. (The pic is from my honeymoon in Fiji)


Post Date: Tuesday, October 10, 2006 5:20:11 PM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [2] | Trackback   #
 Monday, October 09, 2006

Brian Harry recently posted more information about TFS installation expirations and upgrades. I must admit that this applied to us since we installed the workgroup edition and figured out what had happened while adding our sixth registered user, ugghhh. It was not an exciting time. We are currently in the process of upgrading from TFS workgroup version to the full TFS version, and I'm really hoping that this will work out ok. From the description in Brian's blog post I doubt that we will have any issues (although he was talking about moving from the TFS trial install to the full TFS version).

Also included in the post was an attached application which, when ran on the TFS server, will display that TFS installation Version. Also, you can detect your version without this application by looking opening your Registry Editor. You can find more information on what to look for at Rob Caron's Blog post.

Team Foundation Server Version Detection Screenshot:

Click here to download TFSVersionDetection or you can visit Brian Harry's blog post to download.


Post Date: Monday, October 09, 2006 10:05:14 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback   #
 Sunday, October 08, 2006

There was a recent TFS Version Control Blog post which asked the community for feedback regarding TFS Version Control Check-In policies. The feedback questions were as follows:

  1. Would you like us to release a check-in policy pack together with some best practices and ship that out of band?
  2. If we do decide to do this then the next question becomes which policies are customers writing themselves that we can standardize and put in the pack?
  3. Which policies would customers like to see as examples?

Please visit reply to the post so that we can hopefully convince the TFS Version Control team to release a some standard check-in policies.

The TFS Version Control Blog is ran by Mario Rodriguez who is a program manager on TFS Version Control. Keep that in mind when you post your feedback comments. I know that I would personally love to see a standard check-in policy pack which would handle the most common policies. Due to the fact that these policies are assigned on the server, but need to be enforced on the client, has been somewhat of an issue for myself. Out of curiosity...Is there any standard approach to making these policies. I do understand that we need to override the methods from the PolicyBase class, but is there a recommended way to deploy these policies to all of the clients?


Post Date: Sunday, October 08, 2006 8:43:50 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [2] | Trackback   #

It appears the channel9 will be adding an additional VSTS tag for all Visual Studio Team System releated content.

We recently started tagging new Visual Studio Team System-related content on Channel 9 with a VSTS tag to make them easier to discover. I also just finished tagging all of the older Team System-related content as well. There were several great videos out there, including some that I had never even seen before!

Brian Keller's blog post provides some examples of some videos which can already be found on Channel9. Samples included Application Designer Videos, Code Profiler and Source Control Management. Also there are a few videos which are related to TFS third parties and Microsoft Research Project tools.

View all VSTS tagged content @ channel9.msdn.com


Post Date: Sunday, October 08, 2006 7:22:02 AM (Pacific Standard Time, UTC-08:00)
Disclaimer | Comments [0] | Trackback