<PostBuildEventDependsOn>
$(PostBuildEventDependsOn);
CreatePackage;
</PostBuildEventDependsOn>
Monday, April 11, 2011
Visual Studio & SharePoint: how to create package as part of the build process
In order to build a project and have the package created, this can be added to the project file (csproj, vbproj):
Monday, April 4, 2011
SharePoint 2010: PowerShell to delete a web part from the gallery
param($Identity = "", $Url = "")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.WebPartPages")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Publishing")
$SPSite = New-Object Microsoft.SharePoint.SPSite($Url)
$SPWeb = $SPSite.OpenWeb()
$WebPartGallery = $SPWeb.Lists["Web Part Gallery"]
$gall = $WebPartGallery.Items select Name
$count = $gall.Count
for ($i =0; $i -lt $count;$i++)
{
if ($gall[$i] -match $Identity)
{
$WebPartGallery.Items.Delete($i)
$SPWeb.Update()
Write-Host "$Identity deleted"
$SPWeb.Dispose()
}
}
Wednesday, March 30, 2011
Friday, March 4, 2011
BitLocker: get out of recovery mode
Some changes to BIOS will cause bitlocker to enter recovery mode.
One way to get out of this follows:
- enter the 8 groups of 6 digits
- get into Windows
- type "manage-bde -protectors -disable c:" from a admin command prompt
- reboot
- type "manage-bde -protectors -enable c:" from a admin command prompt
- reboot
It shouldn't prompt now.
See here for details.
One way to get out of this follows:
- enter the 8 groups of 6 digits
- get into Windows
- type "manage-bde -protectors -disable c:" from a admin command prompt
- reboot
- type "manage-bde -protectors -enable c:" from a admin command prompt
- reboot
It shouldn't prompt now.
See here for details.
Thursday, March 3, 2011
SharePoint: list throttling messages
There are two messages that people often get when throttling limits (5K default) is reached.
"Displaying only the newest results below. To view all results, narrow your query by adding a filter.": this is seen when metadata navigation and filtering is enabled for the list.
"This view cannot be displayed because it exceeds the list view threshold (5000 items) enforced by the administrator.": this is seen in all other cases.
"Displaying only the newest results below. To view all results, narrow your query by adding a filter.": this is seen when metadata navigation and filtering is enabled for the list.
"This view cannot be displayed because it exceeds the list view threshold (5000 items) enforced by the administrator.": this is seen in all other cases.
Thursday, February 17, 2011
BI: Technet Intro Articles
Here's a set of articles that are a good intro to the Microsoft BI stack.
Business Intelligence: Planning Your First Microsoft BI Solution
Business Intelligence: Building a Data Foundation for a BI Solution
Business Intelligence: Building Your First Cube
Business Intelligence: Empower Your Users with Business Intelligence
Business Intelligence: Planning Your First Microsoft BI Solution
Business Intelligence: Building a Data Foundation for a BI Solution
Business Intelligence: Building Your First Cube
Business Intelligence: Empower Your Users with Business Intelligence
Wednesday, February 9, 2011
SharePoint 2010: code for dumping a taxonomy tree
Just customize the data you need from each node type (store, group, set, term).
private void DumpTaxonomy(string siteUrl)
{
Stack<string> stack = new Stack<string>();
using (SPSite site = new SPSite(siteUrl))
{
TaxonomySession session = new TaxonomySession(site, false);
int nts = 0;
foreach (TermStore ts in session.TermStores)
{
nts++;
int ng = 0;
foreach (Group g in ts.Groups)
{
ng++;
int ns = 0;
foreach (TermSet s in g.TermSets)
{
ns++;
int nt = 0;
foreach (Term t in s.Terms)
{
nt++;
DumpTerm(t, stack, 4);
}
stack.Push(ReportNode(3, nt));
}
stack.Push(ReportNode(2, ns));
}
stack.Push(ReportNode(1, ng));
}
stack.Push(ReportNode(0, nts));
}
while (stack.Count > 0)
{
Console.WriteLine(stack.Pop());
}
}
private void DumpTerm(Term t, Stack<string> stack, int level)
{
int nt = 0;
foreach (Term children in t.Terms)
{
nt++;
DumpTerm(children, stack, level + 1);
}
stack.Push(ReportNode(level, t.Name + " " + nt.ToString()));
}
private string ReportNode(int level, object children)
{
StringBuilder sb = new StringBuilder();
for(int i = 0; i < level; i++)
{
sb.Append("\t");
}
sb.Append(children);
return (sb.ToString());
}
Subscribe to:
Posts (Atom)