.NET

Custom code with SharePoint Online and Windows Azure

When I first heard about SharePoint Online at the PDC 2008 I was a bit disappointed that you could not use custom code but had to rely on the built-in functionality and the things you could do with SharePoint Designer (which is quite powerful anyway, especially with jQuery). To read more about SharePoint online, head over to Tobias Zimmergrens blog. But with some clever techniques you can take advantage of the Windows Azure Hosted Services and create your custom code. I will show you how to create some custom code, which normally is done by SharePoint event receivers or timer jobs, using a Worker Role in Windows Azure.

SharePoint 2013

Announcing new Visual Studio 2012 tool for JavaScript Localization in SharePoint 2013

In SharePoint 2013 JavaScript is the new default language and all our (at least mine) solutions and projects are using JavaScript more and more, even though everything is not built as SharePoint Apps. Farm or Full-trust solutions built using JavaScript will in many situations create a better user interface and an improved perceived performance. The more we build user interfaces using JavaScript we cannot just forget about some of the basic UX rules, such as using localization. End-users really hate when they see mixed content in different languages. We’ve known for quite some time how to do localization server-side, but how do we do it in a smart way in JavaScript?

Visual Studio

Visual Studio 11 Developer Preview with the new SharePoint Developer tools

Visual Studio 11 Developer Preview is now available for download für alles and it does not only include the Windows 8 stuff like the previous preview did - this one contains the thing we all want - the SharePoint Developer tools. Overall the performance of Visual Studio 11 is blazingly fast! I regret I tested it - since I will go back to 2010 tomorrow (or even tonight). They team has done a great job and included a lot of the PowerTools natively; such as the new Solution Explorer, the improved search feature etc.

Visual Studio

CKSDev version 2.0 is released - includes Contextual Web Part SPI

The by far best utility for SharePoint 2010 developers is the CKSDev extension (Community Kit for SharePoint - Developer extensions). It’s an extension to Visual Studio 2010, available through the built-in Extension Manager. To install it, just hit Tools > Extension Manager and then search for “CKSDEV” in the Online Gallery. Version 2.0 of CKSDev was released yesterday, and if you already have it installed you should have been notified about the update.

Visual Studio

Making every site in SharePoint 2010 into a BI Center

The other day I had an interesting and great workshop with a customer about the BI features in SharePoint 2010. SharePoint Insights is one thing that really gets me going - so much great stuff can be unleashed using Excel, Visio and PerformancePoint Services. One thing that annoys me with the default settings in SharePoint 2010 is the BI Center. A BI Center does not support the “BI for everyone” mantra - that center only turns numbers and KPI fans on. What you should do is enable BI features on all of your sites; your Intranet home page, your department sites or even on project sites etc. But it isn’t as easy as you could imagine. So here’s some tips for you all to BI-enable all your sites. Oh wait, don’t say to your end-users that you BI-enabled their site - tell them that you have Insight enabled their site instead so you don’t scare them off.

Visual Studio

Understanding folders and namespaces in Visual Studio 2010 SharePoint Solutions, Packages and Features - part 2

This is a follow-up post to the Understanding folders and namespaces in Visual Studio 2010 SharePoint Solutions, Packages and Features (probably my longest blog post title, except this one…). In that post I discussed how folders and namespaces are handled in Visual Studio 2010 SharePoint projects. I will continue to show some details and tips on how you can affect the outcome of your project/packages. Long feature folder names As the previous post showed the features generated by Visual Studio ends up as a subfolder in the {SharePoint Root}\TEMPLATE\FEATURES folder. The feature folder will get the name as the concatenation of the project and the feature - which possibly can be quite long.

Visual Studio

Understanding folders and namespaces in Visual Studio 2010 SharePoint Solutions, Packages and Features

Yesterday Todd Bleeker (SharePoint MVP) wrote a post about the SharePoint Project SPI’s where he explains how SPI effectively are folders within a SharePoint solution. I thought that I should continue that discussion a bit and looking at how these folders and other things such as packages and features affects the actual deployed artifacts. Packages A package (#3 in the figure to the right) is the actual WSP file that will be created containing all your objects from your solution that will deployed to the SharePoint application servers. The project can only contain one package.

Visual Studio

How to create a SharePoint 2010 application using Visual Studio 2010 LightSwitch

Visual Studio 2010 LightSwitch is a new kid on the block in the Visual Studio suburbs. Basically it is a rich client application editor for Visual Studio that allows you to develop (or should I say “click-through”) an application very easy without any programming skills at all. You can create a custom database, attach to an external data source or WCF RIA service and last but not least hook it up to SharePoint. And this is what I’m going to give you a quick peek at.

Visual Studio

Minifying custom JavaScript files in SharePoint 2010

As you know the usage of JavaScript has been more and more used in web applications over the past years for technologies such as AJAX. JavaScript can accomplish really cool stuff on the client side and make the user interface more interactive and responsive. Just take a look at SharePoint 2010 - that’s some heavy JavaScripts there (a bit to heavy IMHO). So lets assume that you are building some new cool stuff, in SharePoint of course, and why not a Page Component for a contextual Web Part. That’s a lot of JavaScript (apart from the server side XML chunks)! So now you are making your web page payload even heavier. This is when minifying comes in. Minifying is a way to minimize the payload of a resource such as removing unnecessary comments and whitespace, shortening function and variable names etc - all to make the payload as small as possible. The only problem with these minified scripts are that they are virtually impossible to debug (and believe me if you are building a Page Component for SharePoint - you need to debug).

Visual Studio

Nifty trick with Visual Studio 2010 replaceable parameters for SharePoint 2010 Web Parts

If you have been working with SharePoint 2010 development using Visual Studio 2010 you have most certainly stumbled upon the new replaceable parameters that replaces data in your solution files during the packaging process. For instance Visual Studio uses $SharePoint.Project.AssemblyFullName$ in the Web Part control description (.webpart) files and this is replaced with the assembly full name (strong name) during packaging. By default it looks like this when you create a new Web Part:

Visual Studio

Local SharePoint 2010 development on Windows 7 - awesome experience

I thought I should share my experience on working with SharePoint 2010 development on Windows 7. My previous posts on installing SharePoint 2007 on Vista and Windows 7 are posts that are quite popular. The downside with the “old” SharePoint version is that it was not officially supported to install it on a client machine, but SharePoint 2010 is supported for installation on Windows 7 and Windows Vista SP1 for development purposes. There are many opinions on having SharePoint 2010 installed on your client OS. Some thinks it is despicable, but I think it is great and I’ve used local installations for years now. It’s perfect for rapid development, testing and demos. In seconds you can spin up a site and show some basic stuff for a client. Of course I use virtualization when testing my final bits etc.

Visual Studio

SharePoint 2010 tools in Visual Studio 2010 violates basic naming conventions

The SharePoint 2010 Development Tools for Visual Studio 2010 is great and I really like the way that the project is built using the different artifacts. One thing really annoys me though and that is the way that the code is generated and named when you add items. For example if you create a project and then add a Web Part item to that project then Visual Studio will create a Web Part class with a namespace and class name like this:

Visual Studio

Visual Web Parts in SharePoint 2010 cannot be Sandboxed

Visual Web Parts are a nice addition for SharePoint 2010 developers. A Visual Web Part is essentially SmartPart revisited and is one of the project types of the new SharePoint extensions for Visual Studio 2010. Sandboxing is one of the most interesting features of SharePoint 2010, especially for large scale implementations and hosting providers. The Sandboxing feature, or User Code Solution, allows you to easily upload a SharePoint feature into your farm into a special controlled environment – called a Sandbox. These Sandboxed features can be controlled by the SharePoint administrators so that they do not consume to much resources and automatically disable them if the exceed their limits. Sandboxed solutions also have severe security restrictions – you cannot access all objects or resources that you would like.

Visual Studio

Virtualizing XP applications using Windows 7

Windows 7 has an upgrade to Virtual PC which allows you to run Windows XP applications virtualized on your Windows 7, without having to run the whole desktop running. I still have to use Visual Studio 2003 to support some old good applications including SharePoint 2003 apps. So I have used a Windows XP virtual machine to run it, but now I can fire up Visual Studio 2003 directly from my Start menu in Windows 7. As most of you know, you can’t install VS2003 on a Vista or Windows 7 machine, and I don’t even want it there either.

SharePoint

Licensing your servers when developing for SharePoint

A recent discussion about how the licenses of Windows, SQL and SharePoint Servers should be handled when we are developing solutions using Virtual Machines made me throw away a mail to Emma Explains Licensing. The concern was that; do we have to pay licenses for every VM or test server? That would have been insane! But I wanted to have this explained how this licensing works - a lot of you perhaps already know but I always have a hard time getting all the different licensing options and rules.

Microsoft

PDC 2008: Day 4, wrapping it up

So the last day of PDC 2008 is over. The brain has been cooked for a few days… This very day did not have any keynote and I kicked off with a session on the Visual Studio Extensions for SharePoint. I have note used this add-in since the first releases of it since I didn’t like it that much but had instead relied on manual packaging and deployment as well as STSDev. But after this I might think about moving over and try it out once again. During the session a basic site was built with some lists, event handlers and a Silverlight application using the new Charting controls.

.NET

Visual Studio 2008 Service Pack 1 available with new devenv.exe icon

Microsoft has now released the final bits of Visual Studio 2008 Service Pack 1 and the .NET Framework 3.5 Service Pack 1, download here. A lot of stuff has been improved such as stability and performance, no need for me to repeat all this since you can find it a gazillion of blogs as well as in the Microsoft Knowledge Base. One improvement I did not read about is that they have fixed/updated the icon of the devenv.exe so you can distinguish VS 2008 and VS 2005 if you are running them simultaneously. The VS 2008 SP1 icon contains a 9 in the lower right corner.

Visual Studio

Visual Studio 2008 not responding when you are checking in files to SourceSafe

I have repeatedly had Visual Studio 2008 hang or stop responding when I’m checking in files to Visual SourceSafe, especially when checking in large amount of files. It just stays there and eventually dims out (as non responding application does in Windows Vista). The ultimate solution is to kill the devenv.exe process and start over. But I have discovered that it is not just hanging, it’s just the main application window that stops responding. If you hover the application in the task bar on Windows Vista you see the preview window showing the check-in SourceSafe dialog. So you just have to wait it out.

SharePoint

How to get Remote Debugging work properly

Remote Debugging is a great feature to use, especially when you work with virtual machines. It allows you to develop and debug locally but have the code running on another machine, virtual or physical. Microsoft SharePoint can’t be installed on a Windows Vista or XP workstation, but needs to be installed on Windows Server 2003 or 2008, so the general recommendations has been for developers to have either Windows Server as their main OS or have a virtual machine with Windows Server. None of these work that well; either you have problems debugging your components and you have to rely on traces or message boxes or you have to have a virtual machine with a full development environment, which will not resemble a production machine.

.NET

.NET Framework Source Code available

The news that Microsoft will be releasing the .NET 3.5 framework libraries source code for everyone. The code is under the Microsoft Reference License (MS-RL) which means that the code is available for you to use as a reference or for debugging, not to modify or extend (if you simplify it…a lot), i.e. it’s not open source. What’s in it for us? Scott Guthrie has all the goodies in his post, where he explains how this release of source code integrates into Visual Studio 2008, and how you can debug into (for example) the ASP.NET framework. Whenever you decide to step in to a .NET Core library or ASP.NET method Visual Studio will download the appropriate source code and allow you to dig in to it deeper.

.NET

A Cheat sheet of Cheat sheets

Here is a list of cheat sheets for the Windows and .NET platform that I frequently use and I think are of great interest. Visual Studio 2005 Keyboard Shortcut References Visual C# 2005 - PDF grayscale | PDF color Visual C++ 2005 - PDF grayscale | PDF color Visual Basic 2005 - PDF grayscale | PDF color SharePoint and Office stuff CSS Reference Chart for SharePoint 2007 (Microsoft Office SharePoint Server 2007 and Windows SharePoint Services v3) CSS Reference Chart for SharePoint 2003 New Office 2007 User Interface - Word | PDF Web and ASP.NET stuff Microsoft AJAX ClientScript Cheat Sheet - ZIP JavaScript Cheat Sheet - PNG | PDF Other stuff

.NET

XSLT 2.0 in Microsoft.NET?

As you probably already have read by now is that the XSLT 2.0 and XPath 2.0 are now W3C Recommendations. XSLT 2.0 is a really nice step forward in the XML transformation technology, a technique that we base our software on to enable us to produce content for different devices, platforms and targets. XPath 2.0 and XSLT 2.0, in specific, could help us making these transformations much easier without having to use XSLT Extension Objects for some tasks. 

Microsoft Expression

The year of constant betas

Today I start my two weeks vacation and I thought I should summarize this year. The year of 2006 has been characterized, for me, as the year of Betas and Technology Previews. I have been trying to involve myself as much as possible in the all the goodies flowing out of Redmond. Microsoft has released numerous amount of new applications and upgrades. Internet Explorer 7 The new version of Internet Explorer is the application this year that will have most impact in the short run on users. More standardized and a slicker interface with support of for example blogs.

Visual Studio

Visual Studio 2005 Service Pack1 released

Microsoft has now released the first Service Pack for Visual Studio 2005 and the Team Foundation Server. The Service Pack comes in several versions, depending on which version of Visual Studio 2005 you have. Here are the downloads: Visual Studio 2005 Team Suite SP1, this updates Standard, Professional and the Team Editions Visual Studio 2005 Team Foundation Server SP1 Visual Studio 2005 Express Editions SP1 What I look forward is that the Service Pack addresses theses issues:

Visual Studio

Visual Studio support on Windows Vista

Aaron Brethorst, Program Manager for the Visual Studio - IDE team informed me about a new article on MSDN that explains the Visual Studio Support on Windows Vista. The FAQ contains good answers to the common questions on why there is no Visual Studio.NET 2003 support and how to run Visual Studio 2005 with elevated privileges. There are several questions and workarounds worth reading. I’m still considering wating for the non-beta version of the Visual Studio 2005 SP1 before migrating to Windows Vista.

Microsoft

Microsoft.NET Framework 3.0 released

The Microsoft.NET Framework 3.0, or just .NET 3.0, has been released by Microsoft as well as the Visual Studio 2005 extensions for .NET 3.0 and the .NET 3.0 SDK. The downloads are available for Windows XP, Windows Server 2003 and Windows Vista where applicable. The .NET 3.0 is .NET 2.0 extended with new technologies such as Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation and Windows CardSpace.

.NET

Reset the experimental hive of Visual Studio 2005

When developing applications and/or integrations for Visual Studio 2005 with the Visual Studio 2005 SDK, for example using the DSL Tools, the testing and debugging is done using a Visual Studio Instance that are running with a special registry hive, instead of the normal so you don’t mess up your normal Visual Studio operations. After a while, when you have created a lot of testing applications the Visual Studio interface is bloated with messed up toolbars, menus and templates you will need clear this experimental hive. Fortunatley the VS SDK comes with a utility called VsRegEx.exe which will reset the hive to the original state or to the Last Known Good state.

Microsoft

No Visual Studio support in Windows Vista...

Windows Vista will be released later this year to partners and volume license customers and in the beginning of 2007 to the masses. A successful release of a software product such as Windows Vista requires that a lot of consultants use it and can recommend it to the companies. The last few days it has come out in the open that Windows Vista will not support Microsoft Visual Studio 2005 until the first service pack is released, during the first half of 2007, and even then it will be compatibility issues. Visual Studio.NET 2002 and 2003 will definitley not be supported on the Windows Vista platform!

.NET

XML Notepad 2006 - what's the fuzz about?

There seems to be some kind of software release frenzy at Redmond right now. Microsoft are spitting out application after application and I don’t mean the two huge ones; MIcrosoft Windows Vista and Microsoft Office (Server) System. Applications, small and big, like Internet Explorer 7, Windows Live Writer, XNA Game Studios, different Microsoft Live applications, Windows Desktop Search and now XML Notepad 2006 are dropping out from the software factory. It’s fun, but it takes me so much time reading and catching up on the releases.

Microsoft Expression

Summary of Q2 2006 Microsoft betas

For me this second quarter of 2006 has been so interesting with all these beta and CTP products from Microsoft. The summer will be a long wait for the Release Candidates and the autumn a huge and shaky wait for the gold products. Here is a short summary of what i think so far; **Microsoft Expression Graphics Designer**An interesting product which I have big hopes for, I really like, and have just adjusted, to the vector way of doing my graphics.

Personal

Great hosting site - DotNetPark

I have moved this blog to my own domain, http://www.wictorwilen.se/ and I decided to have it hosted at DotNetPark. DotNetPark has an excellent service at great prices. For me it was important to have ASP.NET and Microsoft SQL Server where I hosted my site and they have all that and more. I can easily publish the site using FTP from Visual Studio and connect to the SQL Server using the Enterprise Manager or Visual Studio. Their interface, called DotNetPanel, provides you with everything you need to host your site.You can also have a number of services installed at your request, for example how about Windows SharePoint Services!

WiX

Microsoft Windows Installer Xml - WIX

I have for a few interesting weeks been using Microsoft Windows Installer Xml, aka WIX, to create an MSI installer for our software solution (finally the number of installation has increased so it was worth it :-).Our software is higly configurable and modularized so I needed to use a tool more advanced that the built-in installers in Visual Studio.Net - and the choice was to use WIX. For you out there who doesn’t know what WIX is then the short story is that; WIX is toolset that builds Windows installation packages from XML source code. The source code and binaries to WIX can be found on SourceForge.To create an MSI you just tap in some XML code and use the provided compilers and linkers and you are up and running in a few minutes - with a simple installation package.Bur, when making a more complex installer you will probably run into trouble due to the lack of documentation on the subject, even if it contains a nice help file I found out that Google was the best source of documentation.I ran into some troubles when I was creating CustomActions and I thought I would write a more thorough article about that in a near future. I found out that making CustomActions using scripts (VB and JavaScript) was really successfull.Are you interested in reading more about WIX check out the blog of Rob Mensching or this great tutorial by Gábor Deák Jahn. What do you think about WIX?And finally: congratulations to the WIX project which celebrates two year anniversary today.

Visual Studio

Package Load Failure in Visual Studio 2005 (RTM)

Today, after installing the RTM version of VS.NET 2005, I got some errors due to previous installs of the Betas. One of the was a Package Load Failure for the Class Designer. After a quick search on MSDN Product Feedback Center I found a case (FDBK39168, now closed) with a really nice tool that scans and fixes a number of known issues in Visual Studio.NET. You can download it here: http://astebner.sts.winisp.net/Tools/ttool.zip if you have the same or similar errors.