| Subcribe via RSS

Create/Delete site collection with PowerShell

Februar 6th, 2010 | No Comments | Posted in Uncategorized

Today I played some minutes around with Powershell for SharePoint 2010 and easily created a new site collection and also deleted it.

Create new site collection:

New-SPSite  -url http://mymachine/sites/powershell -template STS#0  -OwnerAlias “mydomain\alexander.bruett“  -Name “Powershell Testsite”

Delete site collection:

Remove-SPSite -Identity http://hbv83025270/sites/powershell -Confirm:$False

If I were an IT-Pro, I’d love this :-)

Tags: , ,

SharePoint 2010 and Visual Studio 2010 Beta 2 target Framework problems

Januar 21st, 2010 | No Comments | Posted in Uncategorized

Today, I tried to add a reference to the assembly Microsoft.Office.Server.Search.dll and got this warning:

The primary reference "Microsoft.Office.Server.Search, Version=14.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c,
processorArchitecture=MSIL" could not be resolved because it has an
indirect dependency on the framework assembly
"System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" which could not be resolved in the
currently targeted framework. ".NETFramework,Version=v3.5". To resolve
this problem, either remove the reference
"Microsoft.Office.Server.Search,Version=14.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL" or
retarget your application to a framework version which contains
"System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35

Solution:

Create a .reg file and add this lines:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\
v2.0.50727\AssemblyFoldersEx\Chart Controls]
@="C:\\Program Files (x86)\\Microsoft Chart Controls\\Assemblies"

Run this file and the entry will be added to the registry. Restart Visual Studio and the warning will be gone.

Tags: , , , ,