Great Blog on Power Shell for SharePoint

29. April 2010

 

http://stsadm.blogspot.com/2009/10/sharepoint-2010-stsadm-and-powershell.html

Awesome work, now onwards to some Heavy Shelling ;)

A practical example of adding test or configuration data to a list :

Start-SPAssignment -Global

$Website = Get-SPweb "http://localhost/Test003"
$LeverandoerTyper =  $Website.Lists["LeverandoerType"]
$NewItem = $LeverandoerTyper.Items.Add()
$NewItem["leverandoerType"] = "Øvrig"
$NewItem.Update()

Stop-SPAssignment -Global

/Michael Høtoft 


Michael Høtoft  

BizTalk 2009 Fails to Configure SSO if Visual Studio 2010 is installed

16. April 2010

 

Symptom is that you can not connect to your SQL database under SSO configuration.

Solution :

  • Open a VST command promt
  • Navigation to Program Files->Common Files-> Enterprise Single Sign On
  • Run regasm SSOSQL.dll

Rerun configuration and you are now able to configure your SSO database.

64bit systems need to take special caution :

In this case you need to call the 64bit .net regasm explicit :

 

C:\Windows\Microsoft.NET\Framework64\v2.0.50727>regasm "C:\Program Files\Common F

iles\Enterprise Single Sign-On\SSOSQL.dll"

 


Michael Høtoft  

BizTalk Server ,

With VS2010 it is time for the Dark Side..

15. April 2010

Some time ago i stumbled upon Scott Hanselman’s page about color themes and ever since I have been using a dark theme based on Nightingale. It takes some time to get used to, but once you do, I find it way more easy to look at.

And actually it goes very well with the new layout in VS2010 and uses many of the same base colors, so I thought would upload it. I might not have tweeked it 100% yet, but feel free to use and modify it.

It can be downloaded from http://www.nebular.dk/files/Nebular_Dark.zip

image


Christian Staerk  

.Net

Great SPMetal ressource

14. April 2010

 

Stephane Eyskens has created a very detailed and extensive article regarding SPMetal and very importantly also the reason behind some of the build-inn limitations.

http://stephaneey.developpez.com/tutoriel/sharepoint/sp2010linqen/

A must read for any who is using or considering using SPMetal for SharePoint 2010


Michael Høtoft  

Sharepoint Server

Disover IIS 7.0 Asp.Net Processes

13. April 2010

 

Just a reminder ;). It can be done in windows. But i prefer the faster and no click way in a CMD promt.:

%windir%\system32\inetsrv\appcmd.exe list wp


Michael Høtoft  

Writing Unit Tests with SPMetal in VST2010 RC for SharePoint 2010

12. April 2010

 

I really hope today’s release of VST2010 will solve this issue. In my current setup, VST2010 RC and SharePoint 2010 beta its not really possible building Unit Test against SPMetal.

I have a simple DomainModel and DomainModelTest project.

The DomainModel project contains the SPMetal autogenerated MySystem.cs file.

The DomainModelTest project contains a unit test to test the DomainModel as expected.

 

The test :

[TestMethod()]
       public void DataleverandoerTest()
       {
           ResourceManager resMgr = new ResourceManager("DomainModelTest.TestSettings", Assembly.GetExecutingAssembly());

           string requestUrl = resMgr.GetString("weburl"); // TODO: Initialize to an appropriate value
           IUSystemDataContext target = new IUSystemDataContext(requestUrl); // TODO: Initialize to an appropriate value
           EntityList<Item> actual;
           actual = target.Dataleverandoer;
           Assert.Inconclusive("Verify the correctness of this test method.");

 

The immidiate error :

Test method DomainModelTest.IUSystemDataContextTest.DataleverandoerTest threw exception:
System.IO.FileNotFoundException:

 

Srini Sistla's Blog

 

Srini Sistla found out that this happens because the test project is running under .net Framework 4.0. Thanks Srini it could have had me blocked for hours ;)

http://codename-srini.blogspot.com/2010/03/error-systemiofilenotfoundexception-was.html

 

The simple solution: #FAIL

Change the framework to 3.5… FAIL.  IT CANT BE DONE IN VST2010 RC !! And its a well know bug : https://connect.microsoft.com/VisualStudio/feedback/details/483939/unable-to-change-target-framework-version-on-unit-test-projects

 

Today is 2010 release day. I really hope it’s fixed and will get back to Y’all. Otherwise its back to the good old NUnit or similar.


Michael Høtoft  

Sharepoint Server, Visual Studio 2010