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

CSS Isolation still failing builds for target iOS / macOS #4717

Closed
codemonkey85 opened this issue Feb 16, 2022 · 5 comments
Closed

CSS Isolation still failing builds for target iOS / macOS #4717

codemonkey85 opened this issue Feb 16, 2022 · 5 comments
Assignees
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView s/duplicate 2️⃣ This issue or pull request already exists t/bug Something isn't working
Projects

Comments

@codemonkey85
Copy link

Description

Creating a new .NET MAUI Blazor app using the latest Visual Studio 2022 preview, with .NET MAUI Preview 13, still causes the build to fail if Razor scoped CSS files are included in the project. I believe this is related to #2981.

image

Steps to Reproduce

  1. Create a File > New .NET MAUI Blazor App.
  2. Change the build / debug target to an iOS device or simulator (in my case I'm using my iPhone with Hot Restart).
  3. Try to build the app.

Sample repo (although it's just a new app created from the template, unmodified): https://github.com/codemonkey85/CssIsolationIssue

Version with bug

Preview 13

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

iOS / iPadOS 15

Did you find any workaround?

No response

Relevant log output

Rebuild started...
1>------ Rebuild All started: Project: CssIsolationIssue, Configuration: Debug Any CPU ------
Restored C:\Users\mbond\Documents\GitHub\CssIsolationIssue\CssIsolationIssue\CssIsolationIssue.csproj (in 587 ms).
1>Detected signing identity:
1>  Code Signing Key: "Apple Development: Michael Bond (JFM79P3LQP)" (C:\Users\mbond\AppData\Local\Xamarin\iOS\Provisioning\Certificates\0A156EF924EDD8338E81E6C2C60A0B5F.p12)
1>  Provisioning Profile: "VS: WildCard Development" (C:\Users\mbond\AppData\Local\Xamarin\iOS\Provisioning\Profiles\7b92f67e-0cef-474b-b4aa-920afe886653.mobileprovision)
1>CssIsolationIssue -> C:\Users\mbond\Documents\GitHub\CssIsolationIssue\CssIsolationIssue\bin\Debug\net6.0-ios\ios-arm\CssIsolationIssue.dll
1>Shared\MainLayout.razor.css : error : The path '..\..\..\..\..\Documents\GitHub\CssIsolationIssue\CssIsolationIssue\Shared\MainLayout.razor.css' would result in a file outside of the app bundle and cannot be used.
1>Shared\MainLayout.razor.css : error :
1>Shared\NavMenu.razor.css : error : The path '..\..\..\..\..\Documents\GitHub\CssIsolationIssue\CssIsolationIssue\Shared\NavMenu.razor.css' would result in a file outside of the app bundle and cannot be used.
1>Shared\NavMenu.razor.css : error :
1>Done building project "CssIsolationIssue.csproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
@codemonkey85 codemonkey85 added the t/bug Something isn't working label Feb 16, 2022
@codemonkey85
Copy link
Author

By the way, as a workaround, I have been putting my CSS into my .razor files using <style> tags.

@jsuarezruiz jsuarezruiz added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label Feb 16, 2022
@jsuarezruiz jsuarezruiz added this to New in Triage via automation Feb 16, 2022
@javiercn
Copy link
Member

@codemonkey85 I've tried your project and I'm not able to reproduce this issue.

image

For me the app builds and run successfully

@codemonkey85
Copy link
Author

codemonkey85 commented Feb 23, 2022

@javiercn That's utterly bizarre. I just tried it again and I'm still having the issue.
image
image

@javiercn
Copy link
Member

@codemonkey85 I'm not sure what might be going on (I did exactly as you showed in the image).

It could potentially be something on your machine/setup? Maybe clean the bin/obj folders just in case?

I'm using a completely brand new setup alongside with Visual Studio 2022 Preview.

Going to go on a limb here, but try moving the project to a folder without spaces on the path. like c:\scratch or similar. To see if that's the delta.

@SteveSandersonMS
Copy link
Member

This seems to be a duplicate of #4061, so I'll close in favour of that.

Triage automation moved this from New to Done Feb 23, 2022
@SteveSandersonMS SteveSandersonMS added the s/duplicate 2️⃣ This issue or pull request already exists label Feb 23, 2022
@mkArtakMSFT mkArtakMSFT added this to the 6.0.300-preview.14 milestone Mar 24, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView s/duplicate 2️⃣ This issue or pull request already exists t/bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

6 participants