Skip to main content


 

Symptoms


Exception has been thrown by the target of an invocation. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Build.BuildEngine.InvalidProjectFileException: The expression ""Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries(.NETFramework, v$targetframeworkversion$, '', '')" cannot be evaluated.

Version string portion was too short or too long.

Error log is also enclosed.
Please refer ticket no. Ticket _94788
 

Diagnoses


change the .net foucs from framework 4 to framework 2 as per the following KB
http://help.k2.com/en/kb000686.aspx
 

Resolution

Resolution:
"
We suspect there’s a .NET configuration problem on that machine.

Do you get the same problem on any other machine?

From MS: http://msdn.microsoft.com/en-us/library/microsoft.build.utilities.toollocationhelper.aspx

GetPathToStandardLibraries(String, String, String)
Returns the path to the reference assemblies location for the given target framework's standard libraries (i.e. mscorlib). This method will assume the requested ReferenceAssemblyRoot path will be the ProgramFiles directory specified by Environment.SpecialFolder.ProgramFiles In additon when the .NETFramework or .NET Framework targetFrameworkIdentifiers are seen and targetFrameworkVersion is 2.0, 3.0, 3.5 or 4.0 we will return the correctly chained reference assembly paths for the legacy .NET Framework versions. This chaining will use the existing GetPathToDotNetFrameworkReferenceAssemblies to build up the list of reference assembly paths.

GetPathToStandardLibraries(String, String, String, String)
Returns the path to mscorlib and system.dll

we think it is looking for some Registry Key which does not exist in that environment

kindly change the .net foucs from framework 4 to framework 2 as per the following KB
http://help.k2.com/en/kb000686.aspx

--------------------------------------------

The customer response:
we identified out of the provide three files (K2HostServer.exe.config ,K2Server.config and K2Server.setup) one of them file was having framework 4.0 and two of them were having framework 2.0. We changed all three mentioned files to framework 2.0, and then compiled our k2 workflows into 3.5 framework which is ultimately using 2.0.

I hope this solution will work because we tried this for our test workflow.
"




 
Be the first to reply!

Reply