OYIon / LiveSharp

Public repository for the LiveSharp project
96 stars 4 forks source link

Serializing document failed #98

Open MattChique opened 3 years ago

MattChique commented 3 years ago

I get this exceptions after load of the project. And livesharp does not respond any more. But project is running fine.


15:03:48.429: The type or namespace name 'Shared' does not exist in the namespace 'x' (are you missing an assembly reference?)
15:03:48.430: The type or namespace name 'x' could not be found (are you missing a using directive or an assembly reference?)
15:03:48.430: The type or namespace name 'x' could not be found (are you missing a using directive or an assembly reference?)
15:03:48.431: The type or namespace name 'x' could not be found (are you missing a using directive or an assembly reference?)
15:03:48.431: The type or namespace name 'x' could not be found (are you missing a using directive or an assembly reference?)
15:03:48.432: The type or namespace name 'x' could not be found (are you missing a using directive or an assembly reference?)
15:03:48.434: The type or namespace name 'x' could not be found (are you missing a using directive or an assembly reference?)
15:03:48.440: FileSaved handler failed
System.Exception: Serializing document failed
   at LiveSharp.VisualStudio.Services.LiveSharpHandler.CreateDynamicAssembly(Compilation compilation, Project project, ILogger logger)
   at LiveSharp.VisualStudio.Services.LiveSharpHandler.PrepareUpdatesAsync(Project project, SemanticModel semanticModel, String documentName, Boolean isDryRun)
15:03:49.849: Ended job: Dry run for x (2686)
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint '/livesharp'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 182772.5555ms 101```
ChristianWeyer commented 3 years ago

This is quite a roadblock now @ionoy - any idea what could be done here? Thanks!

ionoy commented 3 years ago

Do you have x.Shared namespace defined somewhere? Where can this error come from?

MattChique commented 3 years ago

Yes, there are some libraries.

ionoy commented 3 years ago

You can try the following.

1) Go to the global NuGet packages directory (something like c:\Users\{user}\.nuget\packages\) 2) Remove livesharp directory 3) Rebuild the project and run again