CodersBarn.com
The ASP.NET Community Blog

Visual Studio 2010 Beta 1 Arrives!

May 20, 2009 20:47 by agrace

The entire blogosphere is buzzing over this release. I got to try it out for the first time last week while working though some of the hands-on labs at TechEd 2009 in Los Angeles. I was so engrossed in the lab content that I didn't pay it a lot of attention. BTW, Scott Hanselmann gave a great session entitled "Whirlwind Tour around .NET 4 (and Visual Studio) Beta 1 - check it out.

I decided to try it out this evening on a Windows Server 2008 VM, which had SQL Server 2005 installed. Everything went smoothly until after the first reboot when it bombed out. Then I remembered that there is a new Windows 4.5 Installer out so I downloaded that and tried again. Success! It only took about thirty minutes on a fairly fast machine.

VS 2010 Beta 1

I'm using VMWare Workstation, but if you are using Microsoft VMs then there is a really helpful video on Channel 9 which describes the download and installation of VS 2010 in depth. Either way, be sure to grab the installer first.

  * Visual Studio 2010 and .NET Framework 4 Beta 1Downloads

  * Visual Studio 2010 Product Information

What's in the works for the SharePoint Development IDE

Many months ago, the MVPs were invited to Redmond and shown the next generation of SharePoint development tools. Needless to say they were bound to a secrecy agreement and ever since have remained as tight-lipped as a duck's arse and that's watertight. So I was really dying to check out what SharePoint project templates might appear - unfortunately all I got was a blank box. However, it looks like the red-suspendered marketing folks have revealed some information on this in a VS 2010 marketing "overview" brochure (link at end of post). SharePoint goodies include:

"Project templates for list definitions, list instances, site definitions, workflows, event receivers, Business Data Catalog models, and content types"

So, it looks like the extensions are finally baked in where they belong. This is good news considering the the latest CTP of VSeWSS 1.3 has some problems with the 64-bit architecture.

"The feature and package designers in Visual Studio 2010 allow you to determine how your SharePoint application packages are assembled and deployed... without having to manually write the XML for the .wsp deployment packages."

Some further research revealed that much of this info was already out there if you knew where to look. So why were the SharePoint presenters at TechEd acting like they held the secrets of the universe? There was an announcement on some aspects of this last February on Somesegar's Blog - here you will find a link to a video interview with Reza Chitsaz, Senior Program Manager working on Office and Sharepoint tooling - this came out last November!

VS 2010 Beta 1

All hype aside, the new WPF-based IDE is really slick and I'm really looking forward to trying out some of the new Ajax 4.0 client controls :-)

The new SharePoint 2007 Marketing Website

VisualStudio2010_ProductOverview.pdf (1.03 mb)

kick it on DotNetKicks.com   vote it on Web Development Community


How to Install VSeWSS 1.3

January 27, 2009 17:40 by agrace

Download the 1.3 extensions to your C:/ drive from here:

https://connect.microsoft.com/Downloads/Downloads.aspx?SiteID=428

Start the msi from an elevated command prompt - that is, right click Command Prompt icon in Start menu and select 'Run as Administrator'. Issue this command:

C:\msiexec /i VSeWSSv13_x86_Build_307_CTP.msi

This will prevent the UAC from causing the VSeWSS 1.3 to "fail prematurely".

Update 02-19-20009:

sn.exe meant for 32-bit OS runs without error on 64-bit OS and incorrectly shows message indicating success.

Update 03-31-2009:

Latest release is a .exe file, so this shouldn't cause problems.


SQL Server 2005 on Windows Server 2008

August 9, 2008 14:09 by agrace

I've covered the setting up of a SharePoint development machine in the past but I thought I might just add a few notes on setting it up on the new Windows Server 2008.

The main difference you'll notice is in the configuration of IIS7. You will need to enable the correct set of features before installing anthing else. You will install the tools in a specific order. The VM I built is a Workgroup machine for development and learning at home, so I can get away with using my MACHINENAME\Administrator account for everything. I am using VMWare Workstation version 6. I use NAT to access the Internet via my host machine.

SharePoint Server 2007 on IIS7

When installing SQL Server 2005, you can ignore VS 2005-related compatibility errors. However, there is one serious gotcha: you must install the KB 950636 hotfix before installing SQL Server 2005. If you do not do this, the install will not work on Windows Server 2008. For more details, check Bill Staples' IIS blog.

I created a base VM with just the OS and latest patches. I configured IIS7 and relaxed the browser security settings. I set a maximum size for the VM to grow to dynamically and configured it in 2GB chunks. Then I defragged and ran the VMWare shrink.

At this point, I created a full clone on which I installed the following, in this order:

KB 950636
* SQL Server 2005
* SQL Server 2005 SP2
* Windows Updates
* VS 2008
* Windows Updates
* Office 2007 Enterprise
* Windows Updates

Finally, install SharePoint Server 2007 with SP1 and you should be good to go :-)

kick it on DotNetKicks.com   411ASP.NET


Are you Missing an Assembly Reference?

June 12, 2008 19:44 by agrace

You've checked your namespaces and references a hundred times but you're still getting this annoying error when accessing code files in a sub-folder?

Are you Missing an Assembly Reference?

There is more than one cause of this error, for example, you will sometimes see it when attempting to use the App_Code folder within an ASP.NET 2.0 Web Application project.

On this particular occassion, we are building an ASP.NET 2.0 Web Application project in C# using VS 2005. The folder containing the code file is just a regular folder, but the same error message appears.

Here's a fix that might work for you. Right-click the file you are trying to access in Solution Explorer.

File Properties in Solution Explorer

Select Properties which will open the Properties window. Go to the Build Action DropDown menu.

File Build Action

Select 'Compile' for the build action. In this case, it had been to be set to 'Content'. Now compile as normal and you should be able to reference the file.

kick it on DotNetKicks.com   PHP, ASP, .NET, JSP Resources, Reviews


Tags: ,
Categories: Visual Studio
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

ASP.NET: Web Site versus Web Application Project

June 1, 2008 18:58 by agrace

Cool Dude Programmer I have just begun working on an application, a website which offers people paid subscriptions via PayPal to a weekly message, which they can view on the site after logging in. I had the site designed, including the CSS and two separate master pages. The site was up on staging as an ASP.NET 2.0 Web Application Project written in C#, and I had just started looking to the required functionality when I got an unexpected lesson in the differences between the two ASP.NET development models; that is, the "Web Site" and the "Web Application Project" models.

Quick note on naming conventions: I always use the single-word version, "website"; personal choice. Microsoft refers to the ASP.NET template as "Web Site", as in FILE -> New Web Site. Still, if you look at the Drop Down Menu names in Visual Studio after opting to go with a "Web Site", you will see "Website". Worse still, try googling this! Consistency aside, this is one dumb-ass naming choice which is right up there with MOSS "Features", another joy to Google... end of rant ;-)

I normally use the Web Application Project model because it is what I am used to and it makes sense to me. I have always viewed the Web Site model as something to use for demonstration purposes and the like. Truthfully, when Microsoft initially brought out only the Web Site template with VS 2005 and then did the turnaround to also include the Web Application Project template in SP1, I believe that at this point they should have dropped the Web Site model completely. To this day, it leads to nothing but confusion among developers of all levels.

The differences between the two models have been pretty well covered, or at least so I thought. This article is not going to delve into the details of these templates, so for the benefit of those new to ASP.NET, here are some informative references on the two models:

* Comparing Web Site Projects and Web Application Projects
* Visual Studio 2005 Web Application Project Option
* ASP.NET 2.0 - Web Site vs Web Application
* Converting a Web Site Project to a Web Application Project
* Add a Reference to a Visual Studio Project in a Web Site

 With a two-week deadline, I wanted as much out-of-the-box functionality as I could leverage from ASP.NET.

Surprise #1: Profiles only Work Out-of-the-Box with the Web Site Template
In order to implement the logic for the application described above, I planned on using User Profiles to store some extra information for each subscriber such as the date they subscribed along with the type of subscription. Profiles allow you to store some extra information per user when using the ASP.NET membership system. In this case, I was using SQL Server 2005 to store membership details. Profiles are stored in the database automatically and all we have to do is add this extra information to our web.config file. We don't need to know anything about how this data is stored or retrieved.

What they don't tell you is that Profiles only work out-of-the-box with the Web Site option. I discovered this while reading the comments on Scott Guthrie's great blog posting on this topic. There is a workaround available and you can find out more about that here. The problem stems from the fact the Web Application Project does not have the Profile object automatically added to each page as with the Web Site project, so we cannot get strongly-typed programmatic access to the profile properties defined in our web.config file.

The Web Project workaround did not appeal to me because this is an E-Commerce site for a client and I did not like the idea of having to resort to an add-in. I had no way of knowing how stable this was or what other issues might have arisen within my short project time-frame. You can code your own custom profile class if you choose.

The real kicker here is that Profiles are still not available out-of-the-box with the VS 2008 ASP.NET 3.5 Web Application Project template. A mysterious ommission...

Surprise #2: Where is the Web Content Form in the Web Site Project?
As already mentioned, I was using two separate master pages and every page in my site is based off one of these master pages. When I went to add a Web Content Form in the Web Site "project", there was none! At first I hand-coded the page tag, then I noticed the "Select master page" checkbox. The images below show the Web Content Form when using a Web Application Project and the lack of one when using the Web Site "Project".

Web Application Project - Web Content Form

Web Site Project - No Web Content Form

Surprise #3: Where have all the Namespaces Gone?
No namespaces are used for classes anywhere in the App_Code folder. Now, most of us already know that the application automagically finds classes placed in this folder. But, for someone like me who is so used to working with the project model, this didn't strike me right off the bat! So, presumably name conflicts are not a cause for concern here? This is confirmation that Microsoft never intended the Web Site "Project" template for enterprise work, if anyone was ever in any doubt.

My own project will have a user control which is referenced from a master page. On reading this post by Rick Strahl, I see that there are all kinds of difficulties when accessing user controls with the Web Site model - read through the comments. Now I'm thinking that I may revert to the Web Application Project and use the Web Profile Builder to solve my Profile issues after all! At least I won't have grapple with trying to dynamically load a user control from a different assembly... are you getting the bad code smell yet?

kick it on DotNetKicks.com   PHP, ASP, .NET, JSP Resources, Reviews   vote it on Web Development Community