Thursday, October 11, 2012

SharePoint Designer "Error Reading File" - Bulk Blank Lines Fix

Getting "Error Reading File" when trying to open a page in SharePoint Designer? Well, its a bug! SharePoint designer inserts Blank lines in the aspx file when you edit!!

Open the page as text in SPD (or any other Text editor), Remove Blank Lines (Careful! Don't delete the code. Delete only blank lines). You can select few blank rows, and use Find & Replace!
Error Reading File
Here is the screenshot:
sharepoint designer inserting blank lines

Find the blank lines SharePoint designer adds, Remove Empty rows from the file.
sharepoint designer adding blank lines

There is a utility in codeplex:

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

1 comment :

  1. A detailed explanation of the cause of the issue can be found here:

    Basically - SharePoint Designer is inserting blank lines. This behavior occurs around lines of literal-text within tag-blocks. In Designer every "SharePoint:ScriptBlock" and "SharePoint:StyleBlock" tag will experience this issue.

    The solution is to decorate the literal-text with the HTML Script (or Style) tags. (More often than not these opening and closing tags are missing) It is crucial that the opening HTML tag is on the same line as the "SharePoint:...block" tag. If you put it on it's own line the problem will persist. The above text changes are necessary for every "SharePoint:...block" tag on the page.

    Now the issue is fixed. Save as many times as you want - no more blank lines are inserted.


Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...