Archive

Archive for the ‘Visual Studio’ Category

Registered for Microsoft PDC 09

August 26, 2009 Lee Dale Leave a comment

Registered to attend the Microsoft Professional Developers conference in Los Angeles in November. Hoping to learn a lot about programming for Windows 7 and Server R2 and also want to get a lot more knowledge on Visual Studio 2010 and .Net 4.0.

Looking forward to this along with the SharePoint Conference in Las Vegas in October and this is my first time to the big developer’s conferences in the U.S; it should be a good experience.

You can more info at the PDC site.

SharePoint 2010 overview videos

July 13, 2009 Lee Dale Leave a comment

Microsoft have released a site for SharePoint 2010 that has some videos with overviews of the new stuff coming in the next version of SharePoint.

The videos cover both features for I.T. Pros and Developers so head over to the site and check them out asap!

Web.config Transformations with Visual Studio 2010

February 27, 2009 Lee Dale Leave a comment

When deploying a web application across your organizations hosting environments you need to make sure you make the correct modifications to your web.config on each environment. Currently with Visual Studio 2008 this means hand modifying each web.config to make connection strings point to the right database servers, changing the debug compilation attribute to false etc. Doing this for each deployment can be a major pain and can allow bugs to slip into your environments, for instance you may forget to modify your connection string and have your production application pointing to your staging server or have your application underperform because you have left debug compilation on.

Thankfully the Visual Studio team has come up with a great feature to be included in the next release of the IDE that allows you to keep a copy of transformations for each web.config. Your transformations will get applied to your main web.config when the application is deployed to each environment. This should greatly improve the deployment experience and help keep deployment errors down to a minimum.

Channel9 have a video all about it so head over to there and check it out.

http://channel9.msdn.com/shows/10-4/10-4-Episode-10-Making-Web-Deployment-Easier/

Categories: .Net, ASP.Net, Visual Studio Tags: ,

Microsoft release CTP of Visual Studio 2008 extensions for SharePoint

January 14, 2009 Lee Dale Leave a comment

Microsoft announced a new release for the VS 2008 extensions for SharePoint on Monday and finally amongst the new features is x64 support!

I do all my MOSS 2007 development on an x64 box and couldn’t make use of the handy extensions for Visual Studio which has allows you to quickly and consistently create a number SharePoint solutions.

Now it’s possible so go download and check out the new CTP here.

Here is a list of the new features included:

· Can be installed on x64 Server OS machines running SharePoint x64. Previously only x86 Server OS could be used.

· Separate build commands for package, deploy and retract are added

· Command line build, package and retract commands are included enabling continuous integration and build servers. Previously command line build of SharePoint projects was very difficult

· Refactoring support for renaming of Web Parts. Previously renaming a web part required changes in several files in the project

· WSP View improvements for consistency of deleting feature elements, merging features and adding event receivers to features

· Solution Generator can now generate solutions from publishing sites. Previously only regular sites could be generated

· Allowing partial trust BIN deployments of web parts. CAS configuration must still be provided by the developer.

· New project item template for SharePoint RootFiles items

· Deployment will now optionally remove conflicting existing features on the development server prior to redeployment. Previously any feature name conflicts would result in an error

· Ancillary assemblies such as for business logic can now be added to the SharePoint Solution WSP

· Hidden features related to Site Definition projects are now shown in WSP View. They are no longer hidden

· For advanced users a fast deploy is included to update only the compiled assembly on the SharePoint development installation

· The User Guide is now installed with the extensions instead of being a separate download

Categories: SharePoint, Visual Studio

Trying to run the VS 2010 CTP Virtual PC image inside VMWare Fusion on Mac OSX

December 29, 2008 Lee Dale Leave a comment

I wanted to try out the latest CTP of Visual Studio 2010 but the CTP comes in the form of a VPC 2007 image which meant I had to run it inside a virtual machine. Not a problem in most cases but I already run all my Windows applications inside VMWare Fusion and this got me wondering how Virtual PC 2007 would run inside VMWare Fusion if it would run at all.

The answer is sadly no, I got the error message below when trying to boot up the VM. Looks like I’ll have to natively boot Vista to try out the VS 2010 CTP, no big deal but would have been kind of fun to run a VM inside a VM. Oh well.

Visual Studio 2010 will vastly improve Sharepoint development

November 25, 2008 Lee Dale Leave a comment

Microsoft is really improving the tooling support for Sharepoint developers in the next release of Visual Studio including being able to “F5″ debug from inside Visual Studio and VS handling all the package deployment, process attaching, app pool recycling etc which will be really helpful.

Also they will be providing lots of VS templates which give us some nice designers for things like WebParts and Features so we don’t have to worry about GUID matching and hand writing our XML files which should save bundles of time when setting up and new solution.

Channel9 have a cool video screen cast which gives a brief overview of what’s coming in VS 2010 for Sharepoint devs.

Visual Studio 2010 & .Net Framework 4.0

September 30, 2008 Lee Dale Leave a comment

So Microsoft has officially announced the next version of Visual Studio and the .Net Framework over on the MSDN site at http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx .

I’m sure all us developers can’t wait to see what the next version of our beloved IDE has in store and what will be included in the .Net framework for version 4.0. Channel9 have a special area for Visual Studio over at http://channel9.msdn.com/VisualStudio/ and they will be running videos all this week focused on VS 2010.

Here is a link to the first video posted:

Norman Guadagno: Announcing Visual Studio Team System 2010

So go check out the site, watch the videos and get up to speed with what will be included in VS 2010.

Categories: .Net, Visual Studio Tags: ,

Visual Studio 2008 UK Launch Event

January 23, 2008 Lee Dale Leave a comment

I’m now registered to attened the UK launch event for Visual Studio 2008 which is happening at the ICC in Birmingham on the 19th March.

There are two tracks for this event the IT pro track and the developer track, make sure you register the right track as you cannot change this after.

You can read more about the events over at http://www.microsoft.com/uk/heroeshappenhere/default.mspx

And you can register yourself here https://msevents.microsoft.com/cui/EventDetail.aspx?culture=en-GB&eventid=1032366502

Should be a good event, will definately feed back on how it went.

DDD5 at Microsoft TVP Reading

July 1, 2007 Lee Dale Leave a comment

Yesterday I traveled to Microsoft’s campus in Reading for the fifth Developer Day event and I must say I was very impressed with the presentations and the organisation of the whole thing.

The first presentation I attended was IIS7 for ASP.Net developers. IIS7 as the presenter Andrew Westgarth said is definitely the most significant release since version 1.0 and really puts the power of the Microsoft web server in the .Net developers hands. It’s highly customizable with .Net, gets rid of the need for writing ISAPI filters and falls in line with the .Net configuration model utilizing XML configuration files extensively. Also as Andrew pointed out it’s the first time the version of IIS is the same on the desktop as it is on the server, so you get the same features on Vista as you would on Server 2008. The only restriction on Vista is a maximum of 10 simultaneous requests, which nobody doing development should ever notice.

The second presentation I attended was Visual Studio 2005 IDE Tips and Tricks presented by Guy Smith-Ferrier. I wanted to attended this because I always say to myself I’m going to learn the short cuts in VS and never get round to actually doing it so this presentation gave me alot of pointers that I could go away and use in my daily work and hopefully improve my productivity. There was alot stuff that I already knew which was inevitable but I got a good few gems out of it which is what I was looking for.

Now the third presentation was An Appraisal of Object Thinking which was presented by Alan Dean. The presentation was essentially talking about the concepts outlined in the MS Press book Object Thinking. The author of the book is basically saying that our formalized perception of Object Oriented Programming is not how the founders of the term OOP intended for it to be used. I won’t go into detail of the concept as you can always buy the book or check Alan’s blog for the presentation slides but I did eventually come round to the new way of thinking and can actually see the benefits it would bring. The only thing is that everyone you are collaborating with on a programming project would also have to buy into the concept and that wouldn’t be an easy thing to do, as it’s hard to change people ways but none the less it was good to get another perspective on OOP as we all nowdays take the concept for granted and we all conform to the standard way of developing objects.

The last presentation I attended was Agile Methods for ISV’s presented by Gary Short. Gary’s presentation was very good and he has a good way of getting his point accross and was very humorous so I did actually enjoy the presentation alot. Gary basically outlined the pro’s and con’s of implementing an agile methodology in ISV’s and Enterprise’s.

I didn’t attained the last presentation as I had to shoot off but would just like to say thanks to the organizers and the presenters on the day who did a fantastic job and can’t wait for the next installment keep up the good work.

Categories: .Net, ASP.Net, Visual Studio

Refactoring with Visual Studio 2005 – Encapsulate Field

One of the basic principles of object oriented programming is ‘Encapsulation’, and to me one of the fundamental ways to acheive encapsulation when creating classes is to only allow access to it’s private members through public accessor methods.

For example using C# I create the following class:

public class LeeClass

    {

        public String _name;

    }

 

 

The problem with this code is it directly exposes the classes data to the outside world and this breaks the encapsulation rules of OOP.

What we need to do to allow the outside world access to this variable is define a public accessor method which effectively ‘encapsulates’ the variable.

We can code this by hand but Visual Studio provides you with a handy refactoring function that handles all the work for you.

Do the following

Right click on the _name variable and select Refactor -> Encapsulate Field as show below.

Refactoring - Encapsulate Field

You will now be presented with a dialog box which allows you to give your new method a name.  You can also from here select the ‘External’ option in the ‘Update References’ option group which will update all references to your variable to point to your new accessor method.

You show now have a class that looks like this

public class LeeClass

    {

        private String _name;

 

        public String Name

        {

            get { return _name; }

            set { _name = value; }

        }

    }

 

 

Notice how Visual Studio changes your publicly exposed variable to private and inserts get/set methods to access it.

 

You now have a class that conforms to the encapsulation principle of object oriented programming.

Categories: .Net, C#, Visual Studio