So im trying to get modelsbuilder to work with our setup, and i got it working, using the apimode, and the VS extension, so i could right click and run the "UmbracoModelsBuilder" tool.
Then i added a new property which has no ipropertyvalueconverter, but should just get out as a string, and when i run it now it just says:
The custom tool 'UmbracoModelsBuilder' failed. One or more errors occured.
How can i debug this, or get any kind of better error handling, logging on this? Because i dont know if it acutally is the property i added or something completly different.
UmbracoModelsBuilder: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task1.get_Result()
at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion()
at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)
UmbracoModelsBuilder: Inner: HttpRequestException: An error occurred while sending the request.
UmbracoModelsBuilder:
UmbracoModelsBuilder: Inner: WebException: Unable to connect to the remote server
UmbracoModelsBuilder: at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
UmbracoModelsBuilder: Inner: SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:60968
UmbracoModelsBuilder: at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
UmbracoModelsBuilder: AggregateInner: HttpRequestException: An error occurred while sending the request.
UmbracoModelsBuilder:
I was having the same issues and I notice that the port the local instance was using was different to the one I had setup on the Umbraco ModelsBuilder Options, hope this helps and if it is a complete different issues my apologies I havent got a chance to read the whole thread
Thx for answering :) Ive already tagged a post as an answer because it got me what i needed :) Just didnt know where to get the error log from the debug window.
Debug Umbraco models builder custom tool in VS
Hey there :)
So im trying to get modelsbuilder to work with our setup, and i got it working, using the apimode, and the VS extension, so i could right click and run the "UmbracoModelsBuilder" tool.
Then i added a new property which has no ipropertyvalueconverter, but should just get out as a string, and when i run it now it just says:
The custom tool 'UmbracoModelsBuilder' failed. One or more errors occured.
How can i debug this, or get any kind of better error handling, logging on this? Because i dont know if it acutally is the property i added or something completly different.
Hi Rasmus,
Normally in the you can see in the output window of VS which error occured.
Dave
ARH of course, the output window was closed ... ! thanks will investigate from here:)
Apperently i had to add this :
No idea why it suddenly changed, the error message was:
"expression-bodied property not available in csharp5"
Hey, I am getting this exception while running - Run Custom Tool.
I have created a seperate project for models
UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result) at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion() at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg) UmbracoModelsBuilder: Starting v3.0.6.97 8/08/2017 4:21:04 PM. UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Unauthorized)
UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result) at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion() at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)
Did you set your username and password correctly in the options in VS ?
Dave
Yes I did
And if I add a site url as http://localhost:60968/, then I get this exception
UmbracoModelsBuilder: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task
1.get_Result() at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion() at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg) UmbracoModelsBuilder: Inner: HttpRequestException: An error occurred while sending the request. UmbracoModelsBuilder: UmbracoModelsBuilder: Inner: WebException: Unable to connect to the remote server UmbracoModelsBuilder: at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar) UmbracoModelsBuilder: Inner: SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:60968 UmbracoModelsBuilder: at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) UmbracoModelsBuilder: AggregateInner: HttpRequestException: An error occurred while sending the request. UmbracoModelsBuilder:Hi there Rasmus,
I was having the same issues and I notice that the port the local instance was using was different to the one I had setup on the Umbraco ModelsBuilder Options, hope this helps and if it is a complete different issues my apologies I havent got a chance to read the whole thread
kind regards
Alex
Hey Alex
Thx for answering :) Ive already tagged a post as an answer because it got me what i needed :) Just didnt know where to get the error log from the debug window.
Ups! apologies Rasmus, I'll make sure I read the whole thread next time before posting haha! , have a good one
Cheers
Alex
is working on a reply...