Nickztar / BlazorDevtools

MIT License
3 stars 1 forks source link

Build fails after installing from NuGet #1

Open andrew-gaston opened 1 year ago

andrew-gaston commented 1 year ago

Hi! Thanks for building this project. I'd love to collaborate on it when I wrap my head around the code. I'm not familiar with the React DevTools, but I have used the Vue dev tools extension in the past and would be very interested in having a similar tool for Blazor.

I have a fresh project created from the Blazor WASM (standalone, not hosted) .NET 6 Template. I have confirmed that the file does exist where it should: C:\Users\andrew\.nuget\packages\blazordevtools\0.0.2\tasks\BlazorDevtools.Tasks.dll

MSB4062 The "BlazorDevtools.Tasks.UpdateBlazorScript" task could not be loaded from the assembly C:\Users\andrew\.nuget\packages\blazordevtools\0.0.2\build\net6.0..\..\tasks\BlazorDevtools.Tasks.dll. Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. BlazorDevToolsTest C:\Users\andrew\.nuget\packages\blazordevtools\0.0.2\build\net6.0\BlazorDevtools.targets 7

Any ideas?

Nickztar commented 1 year ago

Hi Andrew! Lovely to see someone actually using this. I have not used it in a while but will try to check whats going on here.

There is still much I would love to do with this project. Just started with the rendering parts since I need a tool for testing performance for work. 👍🏼

Nickztar commented 1 year ago

This should be fixed now. Also support for NET 7 added.

andrew-gaston commented 1 year ago

Hi Nick,

Sorry to have fallen off the face of the earth for 6 months! I appreciate you taking the time to look into this and working on the fix. I am unfortunately receiving the same build error with the 0.0.4 version - I tried with .NET 6 and 7 projects. I will try on a different PC soon and see if it's just a local issue. I still can't wait to see it in action!

I am still rolling around ideas to tackle the Blazor dev tools problem in the general sense. My component registry proof-of-concept project was... definitely something, but nothing that should be used in production code. I just had to get the idea out because it was driving me mad over the holidays. A good bit of the data needed to make the end result sort of possible is available if you wire up all your components to report information about themselves and their relationships to one another to an appropriately scoped data store (my interpretation/implementation of this Steve Sanderson comment), but I have no idea how to do this in a way that requires zero to minimal setup from the end user, doesn't clutter a code base, works with custom and packaged components, and emits this information to the client for retrieval for external js interactions (potentially the browser extension proof-of-concept PR https://github.com/Nickztar/BlazorDevtools/pull/2). It needs to be plug-n-play and my project certainly is not.

I think your approach is the right one for a serious attempt at making this happen. In your experience, how detailed is the information available by modding the blazor.webassembly.js file and intercepting the renderer? Could the following be accessed in a similar fashion: component names, hierarchy information, public properties/parameters/etc? The solution could be an amalgamation of ideas from this project, my component registry proof-of-concept project, PR https://github.com/Nickztar/BlazorDevtools/pull/2, and potentially https://github.com/jsakamoto/FindRazorSourceFile. But I definitely want to build the real project with you in this repo. It's an unfilled niche! We can do this, it's got to be possible! I will keep chipping away at it and tinkering, hopefully at a better pace going forward.

We might be able to get more folks involved if we mention this repo in aspnetcore issue #44825. That's your call and I wasn't sure if linking to it would show a reference to this thread on that issue.

andrew-gaston commented 1 year ago

Following up, it didn't work on the other PC I tried either - I got the same error.