문제

I cannot run NCover. I get the error:

NCover couldn't create a coverage report

I'm running it via TestDriven.net. I am using MSTest and also have resharper 4.2 installed. There isnt a problem with the tests, as it works on collegues machines. Any ideas what the problem is?

도움이 되었습니까?

해결책

이 문제가 작동하지만 확실하지는 않지만 이렇게 할 것입니다 :

public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
    //Get webapplication
    SPWebApplication webApplication = properties.Feature.Parent as SPWebApplication;
    //Get current user from any sitecollection and rootweb
    SPUser user = webApplication.Sites[0].RootWeb.CurrentUser;
    //Custom code
 }
.

현재 사용자가 필요하기 때문에, 기존 SiteCollection의 rootweb를 사용하고 현재 사용자를 거기에서 얻을 수있는 위치는 중요하지 않습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top