Value of type 'Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer' cannot be converted to 'System.Type - vb.net

I'm working on a custom TFS Build workflow based on the code found in two blogs:
http://www.theringworx.com/blog/?p=494
https://lajak.wordpress.com/2011/08/30/tfs2010-retrieve-associated-workitems-to-changesets-tfs-api/
When I implement the VB.Net code within my XAML workflow, I'm currently getting the following errors on build runtime:
The build process failed validation. Details:
Validation Error: The private implementation of activity '1:
DynamicActivity' has the following validation error: Compiler
error(s) encountered processing expression "TFSService".
Value of type
'Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer'
cannot be converted to 'System.Type'.
Validation Error: The private implementation of activity '1:
DynamicActivity' has the following validation error: Compiler
error(s) encountered processing expression "TFS.GetService(Of
VersionControlServer)();".
End of expression expected.
I've traced the error down to this section of code (Simplified from XAML):
TFS=Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory.GetTeamProjectCollectionFactory(New Uri("MyTeamsTFSServer"))
TFSService = TFS.GetService(Of VersionControlServer)()
I've tried changing the type of TFSService from both Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer and System.Type without success.
From what I can tell the error is occurring in the "Of VersionControlServer".
Has anyone ever encountered this? And if so how did you resolve it?

Turns out the issue was the URL I was using, I made a typo when I was entering it in. Yay for descriptive error messages...
I found this while I was checking my authentication using the two methods:
TFS.HasAuthenticated
TFS.Authenticate();
My code blew out when I was running the Authenticate() method.

Related

NettyApplicationEngine is given but ApplicationEngine is expected

Hey I maked my Projekt on the Ktor Project Creator but i got Errors that in embeddedServer() an ApplicationEngine is expectet but an NettyApplicationEngine is given:
Type mismatch.
Required:
io.ktor.server.engine.ApplicationEngine.Configuration
Found:
io.ktor.server.netty.NettyApplicationEngine.Configuration
But i got unresolved errors too by install{} inside of the embeddedServer{} (and bcs that i think jwt is an unresolved reference too)
Does anyone know how to fix this error (or the errors)
Here can you see the whole thing in one

Error override for successul fail

I'm trying to override and error thrown by one of my command in my script.
I run a simple setup, which returns an error code of '1', which means it failed but I know that it was successful, so I would like for my script to return an exit code of '0' instead when this error is thrown.
THks in advance and don't hesitate if you have any questions.

TFS 2013 - Default Build Definition Template Throwing This Error on "Queue new Build

Below is the error description what seeing once tried to Queue my build definition. Any clue would be appreciated.
2 error(s), 0 warning(s) The build process failed validation.
Details: Validation Error: The private implementation of activity
'1: DynamicActivity' has the following validation error: Compiler
error(s) encountered processing expression "logFileDropLocation".
'logFileDropLocation' is not declared. It may be inaccessible due to
its protection level.
Validation Error: The private implementation of activity '1:
DynamicActivity' has the following validation error: Compiler
error(s) encountered processing expression "If
(platformConfiguration.IsEmpty Or
BuildSettings.PlatformConfigurations.Count = 1,
BuildDropProvider.CombinePaths(DropLocation, "logs"), If
(platformConfiguration.IsPlatformEmptyOrAnyCpu,
BuildDropProvider.CombinePaths(DropLocation, "logs",
platformConfiguration.Configuration),
BuildDropProvider.CombinePaths(DropLocation, "logs",
platformConfiguration.Platform,
platformConfiguration.Configuration)))". Reference to a non-shared
member requires an object reference. Reference to a non-shared member
requires an object reference. 'DropLocation' is not declared. It may
be inaccessible due to its protection level. Reference to a
non-shared member requires an object reference. 'DropLocation' is not
declared. It may be inaccessible due to its protection level.
'DropLocation' is not declared. It may be inaccessible due to its
protection level.
An error occurred while copying diagnostic activity logs to the drop
location. Details: Internal Server Error
Below is the Workflow view
It seems I may need to add a "logFileDropLocation" inside my build template. My template XAML has something like
<Assign x:TypeArguments="x:String" DisplayName="Initialize LogFile Drop Location" To="[logFileDropLocation]"
But not sure how to add logFileDropLocation value here and how to get rid of this error

DBNull error - 'System.InvalidCastException'

Using Visual Studio 2008 and generating .net 2.0 framework with VB.net for a web application.
I encountered a very strange problem currently. After I build a solution and click a link in a web page, I got an error message as following. The same thing happened when I tried to run in debug mode.
*************************************** ERROR Message ******************************************************
"An exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll but was not handled in user code"
"Additional information: Operator '=' is not defined for type 'DBNull' and string "". "
*******************************************************************************************************************
The problem part is simply as below in a vb file. The value of dataview(0)(“name”) is NULL and my_name is a variable string. The strange is thing I didn't change any code in this vb file. This vb file was built previously and used for a long time ago without any problem. It just suddenly happened today. I have this syntax all over the program without causing any problem. I have tried to restore the whole solution back to original but still have the problem.
Can anyone please advise why all the sudden and how to fix?
If dataview(0)(“name”) = my_name then …
Try to determine NULL value first ..
If NOT IsDBNull(dataview(0)(“name”)) Then
If dataview(0)(“name”) = my_name then
'codes here
End If
End If

can't set portTypeName in axistools-maven-plugin

It seems that the portTypeName parameter of the axistools-maven-plugin (version 1.3) cannot be set.
The classOfPortType parameter is a required parameter and cannot be omitted but when setting it alongside portTypeName the following error appear:
Embedded error: Java2WSDL execution failed
invalid parameters, can not use portTypeName and classOfPortType together
I see there is Jira issue here. Is there a workaround?
Ronen.