Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jul 31, 2017 @ 11:15
    Rasmus Fjord
    0

    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.

    enter image description here

    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.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Jul 31, 2017 @ 11:20
    Dave Woestenborghs
    101

    Hi Rasmus,

    Normally in the you can see in the output window of VS which error occured.

    Dave

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jul 31, 2017 @ 11:21
    Rasmus Fjord
    0

    ARH of course, the output window was closed ... ! thanks will investigate from here:)

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jul 31, 2017 @ 11:34
    Rasmus Fjord
    0

    Apperently i had to add this :

      <add key="Umbraco.ModelsBuilder.LanguageVersion" value="CSharp6" />
    

    No idea why it suddenly changed, the error message was:

    "expression-bodied property not available in csharp5"

  • Harsheet 71 posts 302 karma points
    Aug 08, 2017 @ 06:21
    Harsheet
    0

    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)

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Aug 08, 2017 @ 06:55
    Dave Woestenborghs
    1

    Did you set your username and password correctly in the options in VS ?

    Dave

  • Harsheet 71 posts 302 karma points
    Aug 08, 2017 @ 07:09
    Harsheet
    0

    Yes I did

  • Harsheet 71 posts 302 karma points
    Aug 08, 2017 @ 07:10
    Harsheet
    0

    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.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:

  • Alex Sosa 17 posts 142 karma points
    May 28, 2018 @ 05:16
    Alex Sosa
    0

    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

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    May 28, 2018 @ 06:02
    Rasmus Fjord
    0

    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.

  • Alex Sosa 17 posts 142 karma points
    May 29, 2018 @ 09:53
    Alex Sosa
    0

    Ups! apologies Rasmus, I'll make sure I read the whole thread next time before posting haha! , have a good one

    Cheers

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft