Microsoft SharePointカスタムアプリケーションページからMicrosoft Project Server ProjectServerServices.dll
を呼び出そうとしています。 PWA情報にアクセスするためにPSIを使用したいと思います。'ProjectServerServices.dllを呼び出すと、「厳密な名前のアセンブリが必要です」という結果が表示されます。エラー
は、これは私のサンプルコードです:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using PSLibrary = Microsoft.Office.Project.Server.Library;
using SvcProject;
using SvcQueueSystem;
namespace PWA.PSI.Test1.Layouts
{
public partial class GetProjectList : LayoutsPageBase
{
private const string ENDPOINT_PROJECT = "basicHttp_Project";
private const string ENDPOINT_RESOURCE = "basicHttp_Resource";
private static ProjectClient projectClient;
private static SvcResource.ResourceClient resourceClient;
protected void Page_Load(object sender, EventArgs e)
{
ConfigClientEndpoints(ENDPOINT_PROJECT);
ConfigClientEndpoints(ENDPOINT_RESOURCE);
Guid myUid = resourceClient.GetCurrentUserUid();
lit.Text = "My GUID: " + myUid.ToString();
// Get list of all projects.
SvcProject.ProjectDataSet projectDs = projectClient.ReadProjectStatus(
Guid.Empty, SvcProject.DataStoreEnum.WorkingStore,
string.Empty, (int)PSLibrary.Project.ProjectType.Project);
SvcProject.ProjectDataSet tempProjDs = null;
// Create an empty ProjectDataSet for projects the user owns.
SvcProject.ProjectDataSet myProjectsDs = (SvcProject.ProjectDataSet)projectDs.Clone();
for (int i = 0; i < projectDs.Project.Count; i++)
{
tempProjDs = projectClient.ReadProject(projectDs.Project[i].PROJ_UID,
SvcProject.DataStoreEnum.WorkingStore);
if (tempProjDs.Project[0].ProjectOwnerID == myUid)
{
lit.Text += "</BR>Project -- " + tempProjDs.Project[0].PROJ_NAME ;
myProjectsDs.Project.ImportRow(
(SvcProject.ProjectDataSet.ProjectRow)tempProjDs.Project[0]);
}
}
}
public static void ConfigClientEndpoints(string endpt)
{
if (endpt == ENDPOINT_PROJECT)
projectClient = new SvcProject.ProjectClient(endpt);
else if (endpt == ENDPOINT_RESOURCE)
resourceClient = new SvcResource.ResourceClient(endpt);
}
}
}
私はSharePointの内部にこのカスタムアプリケーションページを開くと、私、次のエラーメッセージを取得
ファイルまたはアセンブリをロードできませんでした「ProjectServerServices、 バージョン= 0.0.0.0、Culture =ニュートラル、PublicKeyToken = null 'またはその のいずれかの依存関係です。厳密な名前のアセンブリが必要です。 ( HRESULTからの例外:0x80131044)
ここで何が間違っていますか?