Showing posts with label Visual Studio IDE. Show all posts
Showing posts with label Visual Studio IDE. Show all posts

Friday, 16 April 2010

BC30456: 'Title' is not a member of error in ASP.Net

If you get this error when you deploy to a production server but it works ok in development then the cances are you have got a duplicate name issue! This generally occurs when you have a developer that may have copied a web form rather than create a new one.

To resolve the issue simply rename the partial class (name of the underlying .vb or .cs class) and ensure that the inherits from in the aspx matches.

Golden rule is do not copy pages - create anew page and then copy the code! Or look at why you are copying - could you create a re-usable user control for example!?

Wednesday, 25 March 2009

Visual Studio Tutorial

If you are looking for Video Tutorials on how to develop applications on the .Net framework for either Windows Forms, ASP.Net, WPF etc. then I highly recommend Learn Visual Studio.Net.

I have been a member at LearnVisualStudio.net for almost 4 years after I signed up to their lifetime subscription (which to be fair is as cheap as chips)! They are constantly adding new visual studio tutorials in line with the current technology and they have just recently started doing their videos for iPhone also (guess who just got a new iPhone as well! :D ) . Its brilliant stuff and the return Ive had on my tiny investment is fantastic.

I am just currently working through their new videos on Visual Studio 2010, The MVC Framework and Windows Presentation Foundarion. Lots to learn! They have some free starter videos to let you get a feel of the quality they have to offer.

If you looking for a tutorial on the Visual Studio IDE then Keith Elder - a Microsoft MVP, has put together a great video that takes you through the basics of Visual Studio.

The video takes you through what Visual Studio versions are available, its key components, customising its behaviour and also how to change the look and feel using themes.

All in all its a great Visual Studio Tutorial. It looks to be a multi part series so you can subscribe to his videos or visit his blog at keithelder.net to check get further installments.





Wednesday, 14 January 2009

Intellisense for skin files in Visual Studio

I annoyingly discovered that Visual Studio does not support intellisense when editing skin files. To save the hassle of using an aspx page and then copying it back there is a little tweak you can do to visual studio to allow this.

Simply go to the Tools|Options|FileExtension and add

skin, then select User Control Editor from the list and press Add.

Close and re-open any open skin files and voila you will now have intellisense support for skin files. The trick basically tells visual studio to open the skin source in the user control editor.

Cant believe this wasn't a feature out of the box though!

Wednesday, 28 November 2007

Collapsing all items in the Solution Explorer in Visual Studio

I sometimes get fed up up having to go through clicking solution folders to collapse everything to went on the hunt for a macro and came across this script by Scott Kuhl.

Sub CollapseAll()

' Get the the Solution Explorer tree
Dim solutionExplorer As UIHierarchy
solutionExplorer = DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object()

' Check if there is any open solution
If (solutionExplorer.UIHierarchyItems.Count = 0) Then
Return
End If

' Get the top node (the name of the solution)
Dim rootNode As UIHierarchyItem = solutionExplorer.UIHierarchyItems.Item(1)
rootNode.DTE.SuppressUI = True

' Collapse each project node
Collapse(rootNode, solutionExplorer)

' Select the solution node, or else when you click
' on the solution window
' scrollbar, it will synchronize the open document
' with the tree and pop
' out the corresponding node which is probably not what you want.

rootNode.Select(vsUISelectionType.vsUISelectionTypeSelect)
rootNode.DTE.SuppressUI = False

End Sub

Private Sub Collapse(ByVal item As UIHierarchyItem, ByRef solutionExplorer As UIHierarchy)

For Each innerItem As UIHierarchyItem In item.UIHierarchyItems
If innerItem.UIHierarchyItems.Count > 0 Then

' Re-cursive call
Collapse(innerItem, solutionExplorer)

' Collapse
If innerItem.UIHierarchyItems.Expanded Then
innerItem.UIHierarchyItems.Expanded = False
If innerItem.UIHierarchyItems.Expanded = True Then
' Bug in VS 2005
innerItem.Select(vsUISelectionType.vsUISelectionTypeSelect)
solutionExplorer.DoDefaultAction()
End If
End If

End If
Next

End Sub

Simply add a new Macro to visual Studio then paste in the code.

It can be run directly from the MyMacros window or if it is something you use a lot assign a shortcut key to it by doing the follwing:

Tools|Customize|Commands|Press the Keyboard Button|type the namespace path to the new macro and assign the key sequence. Voila.

Here is the link to the blog i got the script from.

Scott Kuhl's Blog