TechEd North America Slides Download Script

So the download script only gets the videos. A quick adjustment and I was able to get the slide decks as well!!!

Here’s the code:

 

[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$rss = (new-object net.webclient)

$a = [xml]($rss.downloadstring(“http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014/RSS/slides”))

$a.rss.channel.item | foreach{
$code = $_.comments.split(“/”) | select -last 1

$url = New-Object System.Uri($_.enclosure.url)

$file = $code + “-” + $_.creator + “-” + $_.title.Replace(“:”, “-“).Replace(“?”, “”).Replace(“/”, “-“).Replace(“<“, “”).Replace(“|”, “”).Replace(“‘”, “”).Replace(“`””, “”).Replace(“*”, “”) + “.pptx”
$file = $file.Replace(“â”, “”);
$file = $file.Replace(“¬”, “”);
$file = $file.Replace(“€”, “”);
$file = $file.Replace(“œ”, “”);
$file = $file.Replace(“‘”, “”);

if (!(test-path $file))
{
$file
$wc = (New-Object System.Net.WebClient)
$wc.DownloadFile($url, $file)
}
}

TechEd North America MP4 Download Script

Here is the download script for TechEd NA. Save it to the directory you want to download the files too. 

I copied this from the SPC14 script, but I modified the URL and the Replace code.

 

[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$rss = (new-object net.webclient)

$a = [xml]($rss.downloadstring(“http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014/RSS/mp4high&#8221;))

$a.rss.channel.item | foreach{
$code = $_.comments.split(“/”) | select -last 1

$url = New-Object System.Uri($_.enclosure.url)

$file = $code + “-” + $_.creator + “-” + $_.title.Replace(“:”, “-“).Replace(“?”, “”).Replace(“/”, “-“).Replace(“<“, “”).Replace(“|”, “”).Replace(“‘”, “”).Replace(“`””, “”).Replace(“*”, “”) + “.mp4″
$file = $file.Replace(“â”, “”);
$file = $file.Replace(“¬”, “”);
$file = $file.Replace(“€”, “”);
$file = $file.Replace(“œ”, “”);
$file = $file.Replace(“‘”, “”);

if (!(test-path $file))
{
$file
$wc = (New-Object System.Net.WebClient)
$wc.DownloadFile($url, $file)
}
}

 

TechEd NA Sessions are on Channel 9 already

TechEd isn’t but a day old and Channel 9 already has the sessions posted!

http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014

An error occurred during the compilation of the requested file, or one of its dependencies. ; expected

On one of my current SharePoint/ASP.NET projects, I started receiving this error:
An error occurred during the compilation of the requested file, or one of its dependencies. ; expected.

To solve this, I started removing chunks from my ASPX page until the exception went away. The cause?
It was a typo. I needed to use and forgot the =.

My faulty code:
javascript1

Working code:
javascript2

SharePoint 2013 training for developers

SharePoint 2013 training for developers

http://msdn.microsoft.com/en-US/sharepoint/fp123633

 

Note: Thanks to Brian Bedard for sending me this link.

SharePoint Server 2013 Download

Some valuable SharePoint 2013 links

SharePoint Server 2013 Download

SharePoint 2013: presentation: IT pro training

SharePoint 2013 Software Requirements

Eric Harlan’s Installation blog post

Downloadable eBook: Deployment guide for SharePoint 2013 Preview

SharePoint 2013 training for developers

Please note: If you’re building a new VM, be sure to check out the requirements. For instance, you’ll need SQL Server 2008 R2 SP1.

And get used to building new machines for your upgrades. The only way to upgrade to SharePoint 2013 is via content database migration. In other words, you need a new 2013 farm. No more in-place upgrades (for those of you who’ve actually done one).

SharePoint 2013 Beta was just announced

If you haven’t already heard, SharePoint 2013 has been announced. If you want to play with it, log on to msdn and download the img file.

I’m looking forward to using the new application deployment model with Windows Azure.

I wonder if MS will have improved upon the Managed Metadata Service. If not, I may just take it upon myself to do so!

Here’s the deal, sometimes when you write SharePoint code on your dev machine, it deploys just fine. When you package it and deploy it on another server, it doesn’t always work so hot. Furthermore, you might sometimes experience this exception on dev box:

Error occurred in deployment step ‘Add Solution': Failed to load receiver assembly “…”.
System.IO.FileNotFoundException: Could not load file or assembly ‘…’ or one of its dependencies. The system cannot find the file specified.
at …
at …
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

So what’s going on here? Well, it’s quite simple, and yet, it is almost haunting. The fact is, Visual Studio doesn’t always pick up your changes when it builds your solution. It seems to think that that if you haven’t changed the code, when you build your solution it shouldn’t compile a new DLL. That annoys me because sometimes I actually need it to rebuild that DLL for me. If I tell VS to build, I’m thinking it’s going to recompile all of the DLLs for me (note to self: build != recompile). As my friend James S. says, “There’s your problem.” In other words, “stop thinking; start doing.”

So, I’ve been paranoid about packaging my code. First, I intend to clean up my dev box and run a test deployment on it as an ITPro would on his/her Test environment. Second, I deploy to a Test farm. So the goal in VS is to get a fully compiled .sln file. To confidently get that, I perform a manual clean, build, package, and then test it.

Here are my steps:
1. Right-click the project and Retract
2. Verify the feature is gone from the filesystem, the DLLs are no longer in the GAC, etc.
3. In Visual Studio’s Solution Explorer window, click Show all files
4. Control-click bin, obj, pkj, pkjobj
5. Delete and confirm delete
6. Right-click the project and Build
7. Right-click the project and Package

Now I know for sure that everything in the package is using the latest code, settings, etc.
And yes, I realize there is a Clean function. I don’t trust it. Do you?

Deploying Custom Help with SharePoint 2010

Custom help in SharePoint 2010 is not difficult to install, once you’ve been through it. I found some helpful blogs for using the SharePoint utility HCInstall. However, I didn’t want to use a command-line utility on a FeatureActivated receiver. So I decided to dig into it and see if I couldn’t just do in code what it does. If you intend to install help thru an install script, use the utility provided by Microsoft. If you intend to install help thru features (ie, install help on demand as needed), then this post is for you.

If you haven’t used HcInstal, no worries. I’d like to walk thru what the HCInstal.exe code does. It’s not a lot, actually. You can use it as a stand-alone utility. Or, you can drop it in your project with a Reference.

By doing so, you’ll need a using declarative, namely Microsoft.SharePoint.Help.HcInstaller.

 

Hcinstall has one public class (HcInstaller_Main) and one internal (HiGovernor). Here’s an adjusted view from Reflector.

The real work is done in ParseArgs and StartIt().

* ParseArgs() does just that, parses the command line arguements, or your arguements if you’ve referenced the EXE in your project and utilized the HcInstaller_Main class’ Main() method.

* StartIt() then uses the SharePoint help object model. Did you know that it existed? In the online SharePoint 2010 SDK, found on MSDN here SharePoint help, there is little reference to it. [Notice it’s found in the Administration section. However, the namespace is not within the Administration namespace, and the dll containing the namespace is not the Admin dll, either, it’s just the Microsoft.SharePoint.dll.  Back to our work…]  So StartIt() then does the work based on the arguments. If you chose to install a help file, then it calls the Microsoft.SharePoint.Help.SPHelpMerge() method. The SDK content is here, SPHelpMerge. Notice there is no SP2010 version of this SDK helpfile, which is a bummer. But that’s okay, it appears that nothing has changed in it.

The SPHelpMerge class has 4 main methods.

  1. InstallOneHelpCollection
  2. InstallAllHelpCollections
  3. UninstallOneHelpCollection
  4. UninstallAllHelpCollections

In my current testing, I have not found UninstallOneHelpCollection to work. So, on my vm, I’m using UninstallAllHelpCollections for removing the help collections. I’ve noticed this carries thru to hcinstal.exe ( hcinstal.exe /act uninstallonehelpcollection) as well. If anyone has any info on this, I’d appreciate it.

For now, however, I’m using the SPHelpMerge.InstallOneHelpCollection() and it’s working great. If you need a sample help collection to install, you can start with this one from Code Project

Using the SPHelpMerge class, you’ll have code like this:

Using the SPHelpMerge class to install an HCCab file. Do NOT include the .HC.cab in the parameter as it is for namespace not filename.

The parameters are hardly documented. Changing most of them did not affect my install.

And there you have it. It only takes a couple of lines of code to install your help content file! Now you can include these lines into a Farm-scoped feature wrapped up in a Visual Studio SharePoint Feature project, and viola!

SharePoint Connections at the SharePoint Conference

Mark Freeman posted an article on the social events at SPC.

http://sharepointmagic.wordpress.com/2011/09/07/sharepoint-2011-conference-connections/

Edit: If you have news of any other events, please post them in the comments and I’ll be sure to update this post and Mark will probably update his as well.

Thanks!

Follow

Get every new post delivered to your Inbox.