Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest VS 2022 preview is breaking bolero with _ResolveCssScopes not found #317

Closed
fwaris opened this issue Aug 13, 2023 · 5 comments · Fixed by #322
Closed

Latest VS 2022 preview is breaking bolero with _ResolveCssScopes not found #317

fwaris opened this issue Aug 13, 2023 · 5 comments · Fixed by #322

Comments

@fwaris
Copy link

fwaris commented Aug 13, 2023

I would like to try .Net 8 and blazor web assembly multi-threading so am using VS 2022 preview.

The issue is here:

  <!-- Generate the CSS Scope identifier for *.bolero.css -->
  <Target Name="_BoleroComputeCssScope" DependsOnTargets="_ResolveCssScopes">
    <ComputeCssScope ScopedCssInput="@(BoleroScopedCss)" Targetname="$(TargetName)">
      <Output TaskParameter="ScopedCss" ItemName="_BoleroScopedCss" />
    </ComputeCssScope>
  </Target>

I will appreciate any suggestions you might have for a quick fix. Likely this will have to be addressed anyway, in time.

Below is my VS 2022 configuration:

Microsoft Visual Studio Community 2022
Version 17.8.0 Preview 1.0
VisualStudio.17.Preview/17.8.0-pre.1.0+34004.107
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

Visual C++ 2022   00482-90000-00000-AA574
Microsoft Visual C++ 2022

ASP.NET and Web Tools   17.8.92.59062
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.8.92.59062
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools   17.8.92.59062
Azure Functions and Web Jobs Tools

C# Tools   4.8.0-1.23377.4+692d17e98436dfde74109aefe78f3507ae6c5b36
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus   1.4.36 (main@1d5b5ab)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio   17.8.2 (478da90)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   6.8.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   17.8.1.2337707+b468e7a28394b4ed4bf9faa839eef13389fb4bb8
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.8.1.0
Microsoft SQL Server Data Tools

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools   17.0.20731.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.8.0-1.23377.4+692d17e98436dfde74109aefe78f3507ae6c5b36
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.8.0-beta.23371.1+eb5d11d8baf35672ddc818b63c55a2b7a03b087e
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

VSPackage Extension   1.0
VSPackage Visual Studio Extension Detailed Info

Xamarin   17.8.0.57 (main@01c1a2c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   17.8.0.6 (remotes/origin/d17-8@8ad896476f)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK   13.2.1.2 (d17-5/a8a26c7)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: d9a6e87
    Java.Interop: xamarin/java.interop/d17-5@149d70fe
    SQLite: xamarin/sqlite/3.40.1@68c69d8
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d
@Tarmil
Copy link
Member

Tarmil commented Aug 13, 2023

Ah, it seems the internal target name has changed for the generation of CSS scopes... This will indeed have to be addressed before the release of .NET 8. Meanwhile, as a workaround, if you're not using CSS scopes for your own components then you can just comment out this target.

@fwaris
Copy link
Author

fwaris commented Aug 13, 2023

Thanks. I was able to build but the app does not run with net 8.0 and aspnet 8.0 preview bits. Looks like more fundamental changes are needed.

I see the following exception at startup (even before enabling wasm threads):

System.InvalidOperationException: The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering or component state.
   at Microsoft.AspNetCore.Components.Dispatcher.AssertAccess()
   at Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.WriteComponentHtml(Int32 componentId, TextWriter output)
   at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.WriteComponentHtml(Int32 componentId, TextWriter output, Boolean allowBoundaryMarkers, SequenceAndKey sequenceAndKey)
   at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.WriteComponentHtml(Int32 componentId, TextWriter output)
   at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.PrerenderedComponentHtmlContent.WriteTo(TextWriter writer, HtmlEncoder encoder)
   at Bolero.Server.Components.Rendering.renderCompTo@87-1.Invoke(StringWriter writer)
   at Microsoft.FSharp.Core.Operators.Using[T,TResult](T resource, FSharpFunc`2 action) in D:\a\_work\1\s\src\FSharp.Core\prim-types.fs:line 5214
   at Bolero.Server.Components.Rendering.renderCompTo@81.MoveNext()
   at Bolero.Server.Components.Rendering.renderPage@183.Bolero.Server.Components.Rendering.IRenderComponents.RenderComponent(Type ty, StringBuilder sb, IDictionary`2 attributes, Boolean forceStatic)
   at Bolero.Server.Components.Rendering.render(IRenderComponents renderComp, ReadOnlySpan`1 frames, RenderState state, StringBuilder sb)
   at Bolero.Server.Components.Rendering.render(IRenderComponents renderComp, ReadOnlySpan`1 frames, RenderState state, StringBuilder sb)
   at Bolero.Server.Components.Rendering.render(IRenderComponents renderComp, ReadOnlySpan`1 frames, RenderState state, StringBuilder sb)
   at Bolero.Server.Components.Rendering.render(IRenderComponents renderComp, ReadOnlySpan`1 frames, RenderState state, StringBuilder sb)
   at Bolero.Server.Components.Rendering.renderWith(IRenderComponents renderComp, Node node)
   at Bolero.Server.Components.Rendering.renderPage(Node page, HttpContext httpContext, IHtmlHelper htmlHelper, IBoleroHostConfig boleroConfig)
   at <StartupCode$Bolero-Server>.$Extensions.RenderPage@61.MoveNext()
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

@serdar-
Copy link

serdar- commented Oct 9, 2023

I am using dotnet version 8.0.100-rc.1.23463.5 on Linux and I am still getting a similar error: error MSB4057: The target "_ResolveCssScopes" does not exist in the project.

@Tarmil
Copy link
Member

Tarmil commented Oct 10, 2023

Yes, sorry, I've taken some time to release the next version of Bolero. It should be out by the end of the week.

@Tarmil
Copy link
Member

Tarmil commented Nov 6, 2023

This has now finally been released in v0.23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants