edandersen / blazor-desktop-crossplatform-sample

Example of an actual cross platform web and desktop hybrid Blazor app using the .NET 6 Blazor Desktop implementation
170 stars 46 forks source link

Avoid copypaste of wwwroot content in all projects #8

Closed janseris closed 2 years ago

janseris commented 2 years ago

Hello. I found your project at first hoping that it solves the issue with wwwroot folder having to be copy-pasted in every project but it does not. Is there any way to avoid this? Thank you

edandersen commented 2 years ago

Probably some way of doing it with msbuild steps. Not sure.


From: janseris @.> Sent: Thursday, March 3, 2022 12:07:54 PM To: edandersen/blazor-desktop-crossplatform-sample @.> Cc: Subscribed @.***> Subject: [edandersen/blazor-desktop-crossplatform-sample] Avoid copypaste of wwwroot content in all projects (Issue #8)

Hello. I found your project at first hoping that it solves the issue with wwwroot folder having to be copy-pasted in every project but it does not. Is there any way to avoid this? Thank you

— Reply to this email directly, view it on GitHubhttps://github.com/edandersen/blazor-desktop-crossplatform-sample/issues/8, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEF6HC36M67VOTO6KKWPUTU6CTRVANCNFSM5P2I6YTQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.***>

janseris commented 2 years ago

I have discovered that the solution is using the _content/WebviewAppShared/ path prefix for every resource linked in index.html in every project so that the resources don't have to be copypasted from WebviewAppShared/wwwroot folder to every project wwwroot folder. Using this, only index.html and some project-specific resources need to be present in every project using the WebviewAppShared resources.

btw thanks for this great example, makes much less pain to try out BlazorWebView in a real solution with multiple projects!

edandersen commented 2 years ago

Niiice


From: janseris @.> Sent: Friday, March 4, 2022 1:23:03 PM To: edandersen/blazor-desktop-crossplatform-sample @.> Cc: Ed Andersen @.>; Comment @.> Subject: Re: [edandersen/blazor-desktop-crossplatform-sample] Avoid copypaste of wwwroot content in all projects (Issue #8)

I have discovered that the solution is using the path _content/WebviewAppShared/ prefix for every resource linked in index.html in every project so that it doesn't have to be copypasted from WebviewAppShared/wwwroot folder. Using this, only index.html and some project-specific resources need to be present in every project.

— Reply to this email directly, view it on GitHubhttps://github.com/edandersen/blazor-desktop-crossplatform-sample/issues/8#issuecomment-1059158316, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEF6HC2ABMBJ7WW66L6CLTU6IFDPANCNFSM5P2I6YTQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>

edandersen commented 2 years ago

Fantastic, this has now been implemented. Thank you!