Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    JohnHDev
    @JohnHDev
    actually scratch that, the iOS project doesn't have LiveSharp installed
    installed, and it still works
    Mihhail Maslakov
    @ionoy
    so it works now, right?
    JohnHDev
    @JohnHDev
    in your solution, yes. not in mine unfortunately
    Mihhail Maslakov
    @ionoy
    oh
    hm, we need to figure out what's the difference then
    what do you have in your XF livesharp.dashboard.cs? is it default code?
    JohnHDev
    @JohnHDev
    yup default
    just trying again now (I have to undo LiveSharp changes before I commit to git etc)
    JohnHDev
    @JohnHDev
    still the same, adding LiveSharp nuget to the iOS project stops updates in the XF project from working. nothing LiveSharp related appears in the output window when making a change
    Mihhail Maslakov
    @ionoy
    so you don't even get a "Received code update" message?
    JohnHDev
    @JohnHDev
    correct I don't
    if I remove LiveSharp from the iOS project, the updates work (until I clean and then the original problem occurs)
    Mihhail Maslakov
    @ionoy
    please PM me your Output window contents
    right from the application start
    JohnHDev
    @JohnHDev
    sure 2 ticks
    done
    David Rettenbacher
    @warappa
    @ionoy Your LiveSharp.Support.BlazorWASM as None fix worked instantly! Thank you! 👌👍
    Issue closed.
    Mihhail Maslakov
    @ionoy
    awesome!
    JohnHDev
    @JohnHDev
    fyi, my issue is solved too with 2.0.12, I needed to update the old iOS project to use the newer nuget package reference mechanism (its a very old app). my thanks to @ionoy !
    David Rettenbacher
    @warappa

    @ionoy I just found a bug caused by a single character in source code: '\0'. If it is in the source file, at LiveSharp side an Xml-serialization exception is thrown. Removing the character from source code fixes it.

    Sample code:

    string line = ...;
    if (line == "\0")
    { ... }

    Exception:

    13:55:33.807: FileSaved handler failed
    System.ArgumentException: '.', hexadecimal value 0x00, is an invalid character.
       at System.Xml.XmlEncodedRawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd)
       at System.Xml.XmlEncodedRawTextWriter.WriteString(String text)
       at System.Xml.XmlWellFormedWriter.WriteString(String text)
       at System.Xml.Linq.XText.WriteTo(XmlWriter writer)
       at System.Xml.Linq.ElementWriter.WriteElement(XElement e)
       at System.Xml.Linq.XElement.WriteTo(XmlWriter writer)
       at System.Xml.Linq.XNode.GetXmlString(SaveOptions o)
       at System.Xml.Linq.XNode.ToString(SaveOptions options)
       at LiveSharp.CSharp.LiveSharpHandler.SendDocumentElement(XElement document)
       at LiveSharp.CSharp.LiveSharpHandler.MainUpdate(Project project, String documentName, AssemblyContainer assemblyContainer)
       at LiveSharp.CSharp.LiveSharpHandler.PrepareUpdatesAsync(Project project, SemanticModel semanticModel, String documentName, Boolean isDryRun)
    13:55:33.811: Finished: Handling C# update: <some solution path>\Pages\MainViewBase.cs (226608)
    Mihhail Maslakov
    @ionoy
    @warappa thanks, I'll take a look
    Lakoun
    @Lakoun
    Hi, Can sombody help me? "LiveSharp: Warning: The license has expired. Hot-reload will not work."
    Mihhail Maslakov
    @ionoy
    @Lakoun please PM me your subscription email
    Lakoun
    @Lakoun
    @ionoy
    Mihhail Maslakov
    @ionoy
    @Lakoun I checked your license. You should be able to activate it in the LiveSharp Server UI
    the screen that you see after running livesharp command
    Lakoun
    @Lakoun
    image.png
    Still nothing :(
    Mihhail Maslakov
    @ionoy
    do you see browser window opening after starting livesharp?
    Lakoun
    @Lakoun
    Yes I do
    Mihhail Maslakov
    @ionoy
    you should see "license" in the top right
    click that, enter your license email and click load
    Lakoun
    @Lakoun
    Hi, Thank you. Licence is actually Ok, but when I open some project LiveSharp wont work.
    image.png
    Mihhail Maslakov
    @ionoy
    @Lakoun this seems ok
    check "watcher created at" messages. are project paths correct?
    yasserss
    @yasserss
    @ionoy The last update is amazing ;) everything works great , i only have i small problem when i create a new blazor WASM project backed with an asp.net web api ( default template ) only stuff in the wasm project get updated but not the web api project ( the startup project ) and in livesharp dashboad i only see the wasm project
    Mihhail Maslakov
    @ionoy
    @yasserss did you install LiveSharp into the web api project?
    yasserss
    @yasserss
    @ionoy Yep
    idimkk
    @idimkk
    Hi @ionoy
    I have a problem with Blazor app (.NET Core 3.1)
    My specs:
    2.0.13 for projects and 2.0.6 for livesharp.server
    System.ArgumentException: Version string portion was too short or too long. (Parameter 'input')
    at System.Version.ParseVersion(ReadOnlySpan 1 input, Boolean throwOnFailure)
    at System.Version.Parse(String input)
    at LiveSharp.Dashboard.WorkspaceInitializer.CheckForNuGetUpdates()
    Mihhail Maslakov
    @ionoy
    @idimkk that will be fixed in the next version. it shouldn't interfere with the hot reload
    NeilN1
    @NeilN1
    Does LiveSharp work properly with Blazor Server apps with C# in code-behind files? Changes to methods don't seem to take effect. Not sure if it's the code-behind or if a shared project has Xamarin dependencies as I see this in the log:
    13:17:52.720: error: System.InvalidOperationException: You must call Xamarin.Forms.Forms.Init(); prior to using this property. at Xamarin.Forms.Device.get_PlatformServices() at Xamarin.Forms.Device.BeginInvokeOnMainThread(Action action) at LiveSharp.XamarinFormsViewHandler.HandleUpdate(IReadOnlyList`1 updatedMethods) at LiveSharp.Runtime.LiveSharpRuntimeProxy.CodeUpdateReceived(List`1 updatedMethods) at LiveSharp.Runtime.LiveSharpRuntime.UpdateDocument(XElement element, Func`2 methodFilter, Boolean debuggingEnabled) at LiveSharp.Runtime.LiveSharpRuntime.LiveSharpMessageReceived(ServerMessage serverMessage, Byte contentType, Int32 groupId) (L183 Member Portal Blazor)
    13:17:52.660: Finished: Handling C# update: C:\Repos\Member Portal Blazor\Member Portal Blazor\Components\Member\DuesHistory.razor.cs (225) (L183 Member Portal Blazor)
    NeilN1
    @NeilN1
    I removed the Xamarin dependency to test but still get an error:
    15:36:56.728: error: IlCompilationException: System.InvalidOperationException: Couldn't find field: 'Member_Portal_Blazor.Components.Member.DuesHistory+<OnParametersSetAsync>d__28.<>s__2'
       at LiveSharp.Runtime.IL.VirtualMethodInfoBodyDeserializer.ResolveFieldMember(Type type, String memberName, Type fieldType)
       at LiveSharp.Runtime.IL.VirtualMethodInfoBodyDeserializer.DeserializeMembers(IEnumerable`1 memberElements)
       at LiveSharp.Runtime.IL.VirtualMethodInfoBodyDeserializer.DeserializeMethodBody(XElement methodElement, ILogger logger)
       at LiveSharp.Runtime.LiveSharpAssemblyContext.<>c__DisplayClass45_0.<CreateVirtualMethodInfo>b__0()
       at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
       at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
       at System.Lazy`1.CreateValue()
       at LiveSharp.Runtime.Virtual.VirtualMethodInfo.GetMethodBody()
       at LiveSharp.Runtime.IL.DelegateBuilder.CreateDelegate(Type delegateType)
    15:36:56.702: error: UpdateDocument failed:
    Mihhail Maslakov
    @ionoy
    hey @NeilN1
    the first one seems to be caused by LiveSharp incorrectly detecting your project as Xamarin.Forms
    the second one is a bug
    could you PM me the code that you are trying to update when this happens?
    idimkk
    @idimkk

    @idimkk that will be fixed in the next version. it shouldn't interfere with the hot reload

    Bad news for me
    Thanks

    NeilN1
    @NeilN1

    Hi Mihhail. I tried again today and the error disappeared. I don't know why, but I will keep an eye out. I do have three questions:

    1) If I change code, I can no longer add new debug breakpoints until the app is restarted. Is that correct?
    2) I have the LIVESHARP_DISABLE symbol set for the release config but is there a way to check if LiveSharp is truly disabled when deployed?
    3) "Now you can add Debug.WriteLine() anywhere you want and just hit Save." What exactly does this do?