none
14 Warnings and 1 error by using Microsoft.Office.Project.Server.Library with .net 4.0 RRS feed

  • Question

  • Dear all,

    currently I am working on an add-in for Microsoft Projects Professional 2010 Client on my Windows Server 2008 R2 System.

    In order to create a filter for a SvcLookUpTables Project Server request, I added a reference to the Microsoft.Office.Project.Server.Library assembly in C:\Program Files (x86)\Microsoft SDKs\Project 2010\Documentation\REDIST.TXT\Microsoft.Office.Project.Server.Library.dll accordingly to http://msdn.microsoft.com/en-us/library/office/ms453399%28v=office.12%29.asp.

    Here are relevant parts of my code:

    Imports PSLibrary = Microsoft.Office.Project.Server.Library
    
    Sub someSub()
     Dim filter As PSLibrary.Filter = New PSLibrary.Filter()
    End Sub

    As soon as I compile it with the reference to Microsoft.Office.Project.Server.Library.dll the compiler returns 14 warnings similar to

    "Warning    1    The referenced assembly "Microsoft.Office.Project.Server.Library, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Workflow.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.  "

    and 1 Error

    Error    15    The "ResolveAssemblyReference" task failed unexpectedly.System.NullReferenceException: Object reference not set to an instance of an object.   at Microsoft.Build.Tasks.ReferenceTable.GetReference(AssemblyNameExtension assemblyName)   at Microsoft.Build.Tasks.Reference.SetFinalCopyLocalState(AssemblyNameExtension assemblyName, String[] frameworkPaths, ProcessorArchitecture targetProcessorArchitecture, GetAssemblyRuntimeVersion getRuntimeVersion, Version targetedRuntimeVersion, FileExists fileExists, Boolean copyLocalDependenciesWhenParentReferenceInGac, ReferenceTable referenceTable, CheckIfAssemblyInGac checkIfAssemblyInGac)   at Microsoft.Build.Tasks.ReferenceTable.GetReferenceItems(ITaskItem[]& primaryFiles, ITaskItem[]& dependencyFiles, ITaskItem[]& relatedFiles, ITaskItem[]& satelliteFiles, ITaskItem[]& serializationAssemblyFiles, ITaskItem[]& scatterFiles, ITaskItem[]& copyLocalFiles)   at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute(FileExists fileExists, DirectoryExists directoryExists, GetDirectories getDirectories, GetAssemblyName getAssemblyName, GetAssemblyMetadata getAssemblyMetadata, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, GetLastWriteTime getLastWriteTime, GetAssemblyRuntimeVersion getRuntimeVersion, OpenBaseKey openBaseKey, CheckIfAssemblyInGac checkIfAssemblyIsInGac)   at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute()   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)    BISHDProjectClientAddIn

    Since I really have no idea how to solve this problem I hope somebody can helt me soon.

    Kind regards,

    Sven

    Tuesday, September 11, 2012 12:19 AM

All replies