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

Publishing on GitHub breaks with .Net 6 preview7 sdk #35274

Closed
MarkStega opened this issue Aug 11, 2021 · 15 comments
Closed

Publishing on GitHub breaks with .Net 6 preview7 sdk #35274

MarkStega opened this issue Aug 11, 2021 · 15 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components Docs This issue tracks updating documentation Done This issue has been fixed feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-static-web-assets

Comments

@MarkStega
Copy link

MarkStega commented Aug 11, 2021

Describe the bug

I have a repository that produces a static website using github pages. It is based upon .net 6 P6; When I build and publish using the p6 sdk everything works; However, if I let the sdk 'float' to the p7 sdk the publish step does not move all of the content to the appropriate locations. Look at the content of wwwroot in each case. The only difference is the sdk specified in the yml action file. The directory listings are from artifacts produced during the build and moved to my local machine.

The build steps are

dotnet build --configuration Release --version-suffix P6 Material.Blazor.Website.WebAssembly/Material.Blazor.WebSite.WebAssembly.csproj
dotnet publish --no-build --output ./siteWeb --configuration Release --version-suffix P6 Material.Blazor.Website.WebAssembly/Material.Blazor.WebSite.WebAssembly.csproj -p:BlazorEnableCompression=false

Content produced with the p6 sdk:

Removed, see additional comments

Content produced by the p7 sdk:

Removed, see additional comments

What is very odd is that when I run the same commands locally on my Windows10 system they work as expected with the P7 SDK. Something in the Github actions environment using a windows job step is different and trips the P7 SDK during publish.

To Reproduce

Exceptions (if any)

Further technical details

VS2022 P3

C:\Downloads\Microsoft\VisualStudio2022>dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.7.21379.14
 Commit:    22d70b47bc

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100-preview.7.21379.14\

Host (useful for support):
  Version: 6.0.0-preview.7.21377.19
  Commit:  91ba01788d

.NET SDKs installed:
  3.1.412 [C:\Program Files\dotnet\sdk]
  5.0.303 [C:\Program Files\dotnet\sdk]
  6.0.100-preview.7.21379.14 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0-preview.7.21378.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-preview.7.21377.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0-preview.7.21378.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

C:\Downloads\Microsoft\VisualStudio2022>
@mkArtakMSFT mkArtakMSFT added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Aug 11, 2021
@javiercn
Copy link
Member

@MarkStega thanks for contacting us.

Can you produce a flat list of the files? Is incredibly hard to spot the differences like that get-childitem -recurse -file | select -ExpandProperty FullName should do the trick

@MarkStega
Copy link
Author

MarkStega commented Aug 12, 2021

Here are the files as properly published using the P6 SDK:

C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\web.config
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\.nojekyll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\404.html
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\index.html
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\manifest.json
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\service-worker-assets.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\service-worker.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor\Material.css
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor\Material.min.css
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor\MaterialBlazor.css
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor\MaterialBlazor.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor\MaterialBlazor.min.css
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor\MaterialBlazor.min.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\.nojekyll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\404.html
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\android-chrome-192x192.png
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\android-chrome-512x512.png
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\apple-touch-icon.png
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\background.png
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\favicon-16x16.png
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\favicon-32x32.png
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\favicon.ico
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\favicon.png
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\icon-512.png
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\css\asymmetric-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\css\dark-square-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\css\light-square-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\css\material-default-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\css\rounded-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\images\architecture-book-shelves-books-commercial-eatablishment-244134.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\images\book-shelves.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\images\mac.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\images\notebook-and-pen-beside-red-mug-on-gray-surface-3774057.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\images\person-using-macbook-pro-3804775.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\images\person-using-tablet-computer-3740722.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\images\tablet.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\js\app.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\videos\coverr-a-girl-finishes-to-work-and-goes-away-7516.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\videos\coverr-a-girl-finishes-to-work-and-goes-away-7516.mp4
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\videos\coverr-a-girl-is-typing-on-the-laptop-and-drinking-coffee-9927.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\videos\coverr-a-girl-is-typing-on-the-laptop-and-drinking-coffee-9927.mp4
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typing-on-a-keyboard-9692.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typing-on-a-keyboard-9692.mp4
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.jpg
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.mp4
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\binding_support.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\blazor.boot.json
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\blazor.webassembly.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\corebindings.c
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\dotnet.6.0.0-preview.6.21352.12.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\dotnet.timezones.blat
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\dotnet.wasm
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\dotnet_support.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\driver.c
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\emcc-default.rsp
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Emcc.props
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\icudt.dat
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\icudt_CJK.dat
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\icudt_EFIGS.dat
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\icudt_no_CJK.dat
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\library_mono.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Material.Blazor.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Material.Blazor.Website.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Material.Blazor.Website.WebAssembly.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.AspNetCore.Components.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.AspNetCore.Components.Forms.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.AspNetCore.Components.Web.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.AspNetCore.Components.WebAssembly.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.Extensions.Configuration.Abstractions.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.Extensions.Configuration.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.Extensions.Configuration.Json.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.Extensions.DependencyInjection.Abstractions.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.Extensions.DependencyInjection.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.Extensions.Logging.Abstractions.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.Extensions.Logging.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.Extensions.Options.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.Extensions.Primitives.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.JSInterop.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Microsoft.JSInterop.WebAssembly.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\Nager.Date.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\package-lock.json
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\pal_random.js
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\pinvoke.c
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\pinvoke.h
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Collections.Concurrent.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Collections.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Collections.Immutable.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Collections.NonGeneric.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Collections.Specialized.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.ComponentModel.Annotations.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.ComponentModel.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.ComponentModel.Primitives.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.ComponentModel.TypeConverter.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Drawing.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Drawing.Primitives.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Linq.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Linq.Expressions.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Memory.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Net.Http.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Net.Primitives.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.ObjectModel.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Private.CoreLib.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Private.Runtime.InteropServices.JavaScript.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Private.Uri.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Runtime.CompilerServices.Unsafe.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Runtime.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Runtime.InteropServices.RuntimeInformation.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Text.Encodings.Web.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Text.Json.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Text.RegularExpressions.dll
C:\Downloads\Microsoft\VisualStudio2022\siteOKwithP6SDK\wwwroot\_framework\System.Threading.dll

@MarkStega
Copy link
Author

And here are the files improperly published by the P7 SDK:

C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\package-lock.json
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\web.config
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\.nojekyll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\404.html
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\index.html
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\manifest.json
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\Material.css
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\Material.min.css
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\MaterialBlazor.css
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\MaterialBlazor.js
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\MaterialBlazor.min.css
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\MaterialBlazor.min.js
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\service-worker-assets.js
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\service-worker.js
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\css\asymmetric-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\css\dark-square-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\css\light-square-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\css\material-default-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\css\rounded-theme.min.css
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\.nojekyll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\404.html
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\android-chrome-192x192.png
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\android-chrome-512x512.png
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\apple-touch-icon.png
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\background.png
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\favicon-16x16.png
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\favicon-32x32.png
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\favicon.ico
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\favicon.png
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\icon-512.png
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\images\architecture-book-shelves-books-commercial-eatablishment-244134.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\images\book-shelves.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\images\mac.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\images\notebook-and-pen-beside-red-mug-on-gray-surface-3774057.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\images\person-using-macbook-pro-3804775.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\images\person-using-tablet-computer-3740722.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\images\tablet.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\js\app.js
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\videos\coverr-a-girl-finishes-to-work-and-goes-away-7516.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\videos\coverr-a-girl-finishes-to-work-and-goes-away-7516.mp4
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\videos\coverr-a-girl-is-typing-on-the-laptop-and-drinking-coffee-9927.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\videos\coverr-a-girl-is-typing-on-the-laptop-and-drinking-coffee-9927.mp4
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typing-on-a-keyboard-9692.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typing-on-a-keyboard-9692.mp4
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.jpg
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.mp4
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\blazor.boot.json
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\blazor.webassembly.js
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\blazor.webassembly.js.gz
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js.gz
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\dotnet.timezones.blat
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\dotnet.wasm
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\dotnet.wasm.gz
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\icudt.dat
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\icudt_CJK.dat
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\icudt_EFIGS.dat
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\icudt_no_CJK.dat
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Material.Blazor.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Material.Blazor.pdb.gz
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Material.Blazor.Website.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Material.Blazor.Website.pdb.gz
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Material.Blazor.Website.WebAssembly.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Material.Blazor.Website.WebAssembly.pdb.gz
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.AspNetCore.Components.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.AspNetCore.Components.Forms.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.AspNetCore.Components.Web.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.AspNetCore.Components.WebAssembly.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.Extensions.Configuration.Abstractions.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.Extensions.Configuration.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.Extensions.Configuration.Json.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.Extensions.DependencyInjection.Abstractions.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.Extensions.DependencyInjection.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.Extensions.Logging.Abstractions.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.Extensions.Logging.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.Extensions.Options.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.Extensions.Primitives.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.JSInterop.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Microsoft.JSInterop.WebAssembly.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\Nager.Date.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Collections.Concurrent.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Collections.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Collections.Immutable.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Collections.NonGeneric.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Collections.Specialized.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.ComponentModel.Annotations.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.ComponentModel.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.ComponentModel.Primitives.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.ComponentModel.TypeConverter.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Drawing.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Drawing.Primitives.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Linq.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Linq.Expressions.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Memory.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Net.Http.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Net.Primitives.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.ObjectModel.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Private.CoreLib.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Private.Runtime.InteropServices.JavaScript.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Private.Uri.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Runtime.CompilerServices.Unsafe.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Runtime.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Runtime.InteropServices.RuntimeInformation.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Text.Encodings.Web.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Text.Json.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Text.RegularExpressions.dll
C:\Downloads\Microsoft\VisualStudio2022\sitebrokenbyp7sdk\wwwroot\_framework\System.Threading.dll

@MarkStega
Copy link
Author

I want to stress that the only difference between these two artifacts is that one is produced using the P6 SDK & the other the P7 SDK during a github actions build.

The repository is available at https://github.com/Material-Blazor/Material.Blazor

@javiercn
Copy link
Member

@MarkStega the P6 files seem to be missing, i'm trying to do a diff of the two and see what's going on.

@javiercn
Copy link
Member

javiercn commented Aug 12, 2021

Here is the diff between preview6 and preview7

diff --git "a/.\\p6.txt" "b/.\\p7.txt"
index ba2b3c2..f82a0f3 100644
--- "a/.\\p6.txt"
+++ "b/.\\p7.txt"
@@ -1,16 +1,22 @@
+package-lock.json
 web.config
 wwwroot\.nojekyll
 wwwroot\404.html
 wwwroot\index.html
 wwwroot\manifest.json
+wwwroot\Material.css
+wwwroot\Material.min.css
+wwwroot\MaterialBlazor.css
+wwwroot\MaterialBlazor.js
+wwwroot\MaterialBlazor.min.css
+wwwroot\MaterialBlazor.min.js
 wwwroot\service-worker-assets.js
 wwwroot\service-worker.js
-wwwroot\_content\Material.Blazor\Material.css
-wwwroot\_content\Material.Blazor\Material.min.css
-wwwroot\_content\Material.Blazor\MaterialBlazor.css
-wwwroot\_content\Material.Blazor\MaterialBlazor.js
-wwwroot\_content\Material.Blazor\MaterialBlazor.min.css
-wwwroot\_content\Material.Blazor\MaterialBlazor.min.js
+wwwroot\css\asymmetric-theme.min.css
+wwwroot\css\dark-square-theme.min.css
+wwwroot\css\light-square-theme.min.css
+wwwroot\css\material-default-theme.min.css
+wwwroot\css\rounded-theme.min.css
 wwwroot\_content\Material.Blazor.Website\.nojekyll
 wwwroot\_content\Material.Blazor.Website\404.html
 wwwroot\_content\Material.Blazor.Website\android-chrome-192x192.png
@@ -22,11 +28,6 @@ wwwroot\_content\Material.Blazor.Website\favicon-32x32.png
 wwwroot\_content\Material.Blazor.Website\favicon.ico
 wwwroot\_content\Material.Blazor.Website\favicon.png
 wwwroot\_content\Material.Blazor.Website\icon-512.png
-wwwroot\_content\Material.Blazor.Website\css\asymmetric-theme.min.css
-wwwroot\_content\Material.Blazor.Website\css\dark-square-theme.min.css
-wwwroot\_content\Material.Blazor.Website\css\light-square-theme.min.css
-wwwroot\_content\Material.Blazor.Website\css\material-default-theme.min.css
-wwwroot\_content\Material.Blazor.Website\css\rounded-theme.min.css
 wwwroot\_content\Material.Blazor.Website\images\architecture-book-shelves-books-commercial-eatablishment-244134.jpg
 wwwroot\_content\Material.Blazor.Website\images\book-shelves.jpg
 wwwroot\_content\Material.Blazor.Website\images\mac.jpg
@@ -43,25 +44,24 @@ wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typ
 wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typing-on-a-keyboard-9692.mp4
 wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.jpg
 wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.mp4
-wwwroot\_framework\binding_support.js
 wwwroot\_framework\blazor.boot.json
 wwwroot\_framework\blazor.webassembly.js
-wwwroot\_framework\corebindings.c
-wwwroot\_framework\dotnet.6.0.0-preview.6.21352.12.js
+wwwroot\_framework\blazor.webassembly.js.gz
+wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js
+wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js.gz
 wwwroot\_framework\dotnet.timezones.blat
 wwwroot\_framework\dotnet.wasm
-wwwroot\_framework\dotnet_support.js
-wwwroot\_framework\driver.c
-wwwroot\_framework\emcc-default.rsp
-wwwroot\_framework\Emcc.props
+wwwroot\_framework\dotnet.wasm.gz
 wwwroot\_framework\icudt.dat
 wwwroot\_framework\icudt_CJK.dat
 wwwroot\_framework\icudt_EFIGS.dat
 wwwroot\_framework\icudt_no_CJK.dat
-wwwroot\_framework\library_mono.js
 wwwroot\_framework\Material.Blazor.dll
+wwwroot\_framework\Material.Blazor.pdb.gz
 wwwroot\_framework\Material.Blazor.Website.dll
+wwwroot\_framework\Material.Blazor.Website.pdb.gz
 wwwroot\_framework\Material.Blazor.Website.WebAssembly.dll
+wwwroot\_framework\Material.Blazor.Website.WebAssembly.pdb.gz
 wwwroot\_framework\Microsoft.AspNetCore.Components.dll
 wwwroot\_framework\Microsoft.AspNetCore.Components.Forms.dll
 wwwroot\_framework\Microsoft.AspNetCore.Components.Web.dll
@@ -78,10 +78,6 @@ wwwroot\_framework\Microsoft.Extensions.Primitives.dll
 wwwroot\_framework\Microsoft.JSInterop.dll
 wwwroot\_framework\Microsoft.JSInterop.WebAssembly.dll
 wwwroot\_framework\Nager.Date.dll
-wwwroot\_framework\package-lock.json
-wwwroot\_framework\pal_random.js
-wwwroot\_framework\pinvoke.c
-wwwroot\_framework\pinvoke.h
 wwwroot\_framework\System.Collections.Concurrent.dll
 wwwroot\_framework\System.Collections.dll
 wwwroot\_framework\System.Collections.Immutable.dll

@stefanloerwald
Copy link

Seems like the prefix _content\<project.id>\ is missing for project dependencies.

@stefanloerwald
Copy link

Could it actually be related to dotnet/sdk#19665? Seems like there is some handling of static assets depending on source type (is that file type?). That's broken entirely for net5, but maybe it's broken here too, because it seems that mostly js/css is affected, but not images.

@javiercn
Copy link
Member

Figured out what's going on:

The way the assets were being included in the project is not the way we recommend doing this and it was working thanks to an implementation detail, we've changed this on preview7 and as a side-effect the assets were not being picked up.

The issue is that you are bundling CSS and JS and not declaring those as Content. The reason why that works is because static web assets before p7 did two evaluations, one during build (where your assets got generated) and another one when we called the project to collect the static web assets.

What happened, is that we would see the results of the first build during this second evaluation and we would then include those.

What we've changed is that the assets get produced during build and recorded into a manifest, and that's what we use to indicate referencing projects what assets are part of the project. That's more inline with what MSBuild does and what you would expect (you don't want different results between builds).

The proper way to solve this is to hook in to static web assets to define the content. This can be done in two ways:

<ResolveStaticWebAssetsInputsDependsOn>
  _DefineMyAssets;
  $(ResolveStaticWebAssetInputsDependsOn)
</ResolveStaticWebAssetInputsDependsOn>
   <Target Name="_MyStuff" BeforeTargets="ResolveProjectStaticWebAssets">
       <ItemGroup>
           <Content Include="..." />
       </ItemGroup>
   <Target>

You can also add them to the content item group directly and we'll pick them up (they don't have to exist) so long as you don't include them twice (see below).

    <ItemGroup>
        <InputStaticAssetsScripts Include="components\**\*.ts;scripts\**\*.ts" />
        <OutputStaticAssetsScripts Include="wwwroot\materialblazor.js;wwwroot\materialblazor.min.js" />
        <Content Include="@(OutputStaticAssetsScripts)" />
    </ItemGroup>

    <ItemGroup>
        <InputStaticAssetsStyles Include="components\**\*.scss;styles\**\*.scss;" />
        <OutputStaticAssetsStyles Include="wwwroot\materialblazor.css;wwwroot\materialblazor.min.css;wwwroot\material.css;wwwroot\material.min.css" />
        <Content Include="@(OutputStaticAssetsStyles)" />
    </ItemGroup>

With that, this is the diff that I get now

diff --git "a/..\\diff\\p6.txt" "b/..\\diff\\p7WithFix.txt"
index ba2b3c2d..0c936084 100644
--- "a/..\\diff\\p6.txt"
+++ "b/..\\diff\\p7WithFix.txt"
@@ -1,4 +1,3 @@
-web.config
 wwwroot\.nojekyll
 wwwroot\404.html
 wwwroot\index.html
@@ -43,25 +42,24 @@ wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typ
 wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typing-on-a-keyboard-9692.mp4
 wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.jpg
 wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.mp4
-wwwroot\_framework\binding_support.js
 wwwroot\_framework\blazor.boot.json
 wwwroot\_framework\blazor.webassembly.js
-wwwroot\_framework\corebindings.c
-wwwroot\_framework\dotnet.6.0.0-preview.6.21352.12.js
+wwwroot\_framework\blazor.webassembly.js.gz
+wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js
+wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js.gz
 wwwroot\_framework\dotnet.timezones.blat
 wwwroot\_framework\dotnet.wasm
-wwwroot\_framework\dotnet_support.js
-wwwroot\_framework\driver.c
-wwwroot\_framework\emcc-default.rsp
-wwwroot\_framework\Emcc.props
-wwwroot\_framework\icudt.dat
+wwwroot\_framework\dotnet.wasm.gz
 wwwroot\_framework\icudt_CJK.dat
 wwwroot\_framework\icudt_EFIGS.dat
 wwwroot\_framework\icudt_no_CJK.dat
-wwwroot\_framework\library_mono.js
+wwwroot\_framework\icudt.dat
 wwwroot\_framework\Material.Blazor.dll
+wwwroot\_framework\Material.Blazor.pdb.gz
 wwwroot\_framework\Material.Blazor.Website.dll
-wwwroot\_framework\Material.Blazor.Website.WebAssembly.dll
+wwwroot\_framework\Material.Blazor.Website.pdb.gz
+wwwroot\_framework\Material.Blazor.WebSite.WebAssembly.dll
+wwwroot\_framework\Material.Blazor.WebSite.WebAssembly.pdb.gz
 wwwroot\_framework\Microsoft.AspNetCore.Components.dll
 wwwroot\_framework\Microsoft.AspNetCore.Components.Forms.dll
 wwwroot\_framework\Microsoft.AspNetCore.Components.Web.dll
@@ -78,10 +76,6 @@ wwwroot\_framework\Microsoft.Extensions.Primitives.dll
 wwwroot\_framework\Microsoft.JSInterop.dll
 wwwroot\_framework\Microsoft.JSInterop.WebAssembly.dll
 wwwroot\_framework\Nager.Date.dll
-wwwroot\_framework\package-lock.json
-wwwroot\_framework\pal_random.js
-wwwroot\_framework\pinvoke.c
-wwwroot\_framework\pinvoke.h
 wwwroot\_framework\System.Collections.Concurrent.dll
 wwwroot\_framework\System.Collections.dll
 wwwroot\_framework\System.Collections.Immutable.dll
diff --git "a/..\\diff\\p6.txt" "b/..\\diff\\p7WithFix.txt"
index ba2b3c2d..0c936084 100644
--- "a/..\\diff\\p6.txt"
+++ "b/..\\diff\\p7WithFix.txt"
@@ -1,4 +1,3 @@
-web.config
 wwwroot\.nojekyll
 wwwroot\404.html
 wwwroot\index.html
@@ -43,25 +42,24 @@ wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typ
 wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typing-on-a-keyboard-9692.mp4
 wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.jpg
 wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.mp4
-wwwroot\_framework\binding_support.js
 wwwroot\_framework\blazor.boot.json
 wwwroot\_framework\blazor.webassembly.js
-wwwroot\_framework\corebindings.c
-wwwroot\_framework\dotnet.6.0.0-preview.6.21352.12.js
+wwwroot\_framework\blazor.webassembly.js.gz
+wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js
+wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js.gz
 wwwroot\_framework\dotnet.timezones.blat
 wwwroot\_framework\dotnet.wasm
-wwwroot\_framework\dotnet_support.js
-wwwroot\_framework\driver.c
-wwwroot\_framework\emcc-default.rsp
-wwwroot\_framework\Emcc.props
-wwwroot\_framework\icudt.dat
+wwwroot\_framework\dotnet.wasm.gz
 wwwroot\_framework\icudt_CJK.dat
 wwwroot\_framework\icudt_EFIGS.dat
 wwwroot\_framework\icudt_no_CJK.dat
-wwwroot\_framework\library_mono.js
+wwwroot\_framework\icudt.dat
 wwwroot\_framework\Material.Blazor.dll
+wwwroot\_framework\Material.Blazor.pdb.gz
 wwwroot\_framework\Material.Blazor.Website.dll
-wwwroot\_framework\Material.Blazor.Website.WebAssembly.dll
+wwwroot\_framework\Material.Blazor.Website.pdb.gz
+wwwroot\_framework\Material.Blazor.WebSite.WebAssembly.dll
+wwwroot\_framework\Material.Blazor.WebSite.WebAssembly.pdb.gz
 wwwroot\_framework\Microsoft.AspNetCore.Components.dll
 wwwroot\_framework\Microsoft.AspNetCore.Components.Forms.dll
 wwwroot\_framework\Microsoft.AspNetCore.Components.Web.dll
@@ -78,10 +76,6 @@ wwwroot\_framework\Microsoft.Extensions.Primitives.dll
 wwwroot\_framework\Microsoft.JSInterop.dll
 wwwroot\_framework\Microsoft.JSInterop.WebAssembly.dll
 wwwroot\_framework\Nager.Date.dll
-wwwroot\_framework\package-lock.json
-wwwroot\_framework\pal_random.js
-wwwroot\_framework\pinvoke.c
-wwwroot\_framework\pinvoke.h
 wwwroot\_framework\System.Collections.Concurrent.dll
 wwwroot\_framework\System.Collections.dll
 wwwroot\_framework\System.Collections.Immutable.dll
diff --git "a/..\\diff\\p6.txt" "b/..\\diff\\p7WithFix.txt"
index ba2b3c2d..0c936084 100644
--- "a/..\\diff\\p6.txt"
+++ "b/..\\diff\\p7WithFix.txt"
@@ -1,4 +1,3 @@
-web.config
 wwwroot\.nojekyll
 wwwroot\404.html
 wwwroot\index.html
@@ -43,25 +42,24 @@ wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typ
 wwwroot\_content\Material.Blazor.Website\videos\coverr-close-up-of-two-hands-typing-on-a-keyboard-9692.mp4
 wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.jpg
 wwwroot\_content\Material.Blazor.Website\videos\coverr-someone-is-checking-emails-there_s-an-old-globe-on-the-table-0186.mp4
-wwwroot\_framework\binding_support.js
 wwwroot\_framework\blazor.boot.json
 wwwroot\_framework\blazor.webassembly.js
-wwwroot\_framework\corebindings.c
-wwwroot\_framework\dotnet.6.0.0-preview.6.21352.12.js
+wwwroot\_framework\blazor.webassembly.js.gz
+wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js
+wwwroot\_framework\dotnet.6.0.0-preview.7.21377.19.js.gz
 wwwroot\_framework\dotnet.timezones.blat
 wwwroot\_framework\dotnet.wasm
-wwwroot\_framework\dotnet_support.js
-wwwroot\_framework\driver.c
-wwwroot\_framework\emcc-default.rsp
-wwwroot\_framework\Emcc.props
-wwwroot\_framework\icudt.dat
+wwwroot\_framework\dotnet.wasm.gz
 wwwroot\_framework\icudt_CJK.dat
 wwwroot\_framework\icudt_EFIGS.dat
 wwwroot\_framework\icudt_no_CJK.dat
-wwwroot\_framework\library_mono.js
+wwwroot\_framework\icudt.dat
 wwwroot\_framework\Material.Blazor.dll
+wwwroot\_framework\Material.Blazor.pdb.gz
 wwwroot\_framework\Material.Blazor.Website.dll
-wwwroot\_framework\Material.Blazor.Website.WebAssembly.dll
+wwwroot\_framework\Material.Blazor.Website.pdb.gz
+wwwroot\_framework\Material.Blazor.WebSite.WebAssembly.dll
+wwwroot\_framework\Material.Blazor.WebSite.WebAssembly.pdb.gz
 wwwroot\_framework\Microsoft.AspNetCore.Components.dll
 wwwroot\_framework\Microsoft.AspNetCore.Components.Forms.dll
 wwwroot\_framework\Microsoft.AspNetCore.Components.Web.dll
@@ -78,10 +76,6 @@ wwwroot\_framework\Microsoft.Extensions.Primitives.dll
 wwwroot\_framework\Microsoft.JSInterop.dll
 wwwroot\_framework\Microsoft.JSInterop.WebAssembly.dll
 wwwroot\_framework\Nager.Date.dll
-wwwroot\_framework\package-lock.json
-wwwroot\_framework\pal_random.js
-wwwroot\_framework\pinvoke.c
-wwwroot\_framework\pinvoke.h
 wwwroot\_framework\System.Collections.Concurrent.dll
 wwwroot\_framework\System.Collections.dll
 wwwroot\_framework\System.Collections.Immutable.dll

@MarkStega
Copy link
Author

@javiercn

I chose the second method and indeed the github actions build now works.

However when I try to run the website project from Visual Studio I get the following output from dotnet.exe:

Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: Material.css
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) in System.Private.CoreLib.dll:token 0x6006c9c+0x1a0 at System.Collections.Generic.Dictionary2.AddRange(IEnumerable1 collection) in System.Private.CoreLib.dll:token 0x6006c83+0x64 at System.Collections.Generic.Dictionary2..ctor(IDictionary2 dictionary, IEqualityComparer1 comparer) in System.Private.CoreLib.dll:token 0x6006c80+0x1c
at Microsoft.AspNetCore.Hosting.StaticWebAssets.ManifestStaticWebAssetFileProvider.OSBasedCaseConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) in Microsoft.AspNetCore.Hosting.dll:token 0x60002fd+0x0
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x600078d+0xd6 at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) in System.Text.Json.dll:token 0x60008bc+0xc0
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x6000a29+0x90 at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x600078d+0x197
at System.Text.Json.Serialization.Converters.DictionaryDefaultConverter3.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value) in System.Text.Json.dll:token 0x6000963+0xd5 at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x600078d+0x197
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) in System.Text.Json.dll:token 0x6000779+0xae at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) in System.Text.Json.dll:token 0x6000395+0xa at System.Text.Json.JsonSerializer.ReadUsingMetadata[TValue](Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo) in System.Text.Json.dll:token 0x60003bd+0x2b1 at System.Text.Json.JsonSerializer.ReadUsingOptions[TValue](Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options) in System.Text.Json.dll:token 0x60003bc+0x8 at System.Text.Json.JsonSerializer.Deserialize[TValue](Utf8JsonReader& reader, JsonSerializerOptions options) in System.Text.Json.dll:token 0x60003b8+0x0 at Microsoft.AspNetCore.Hosting.StaticWebAssets.ManifestStaticWebAssetFileProvider.OSBasedCaseConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) in Microsoft.AspNetCore.Hosting.dll:token 0x60002fd+0x0 at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x600078d+0xd6
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) in System.Text.Json.dll:token 0x60008bc+0xc0 at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x6000a29+0x90
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x600078d+0x197 at System.Text.Json.Serialization.Converters.DictionaryDefaultConverter3.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value) in System.Text.Json.dll:token 0x6000963+0xd5
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x600078d+0x197 at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) in System.Text.Json.dll:token 0x6000779+0xae
at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) in System.Text.Json.dll:token 0x6000395+0xa
at System.Text.Json.JsonSerializer.ReadUsingMetadata[TValue](Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo) in System.Text.Json.dll:token 0x60003bd+0x2b1
at System.Text.Json.JsonSerializer.ReadUsingOptions[TValue](Utf8JsonReader& reader, Type returnType, JsonSerializerOptions options) in System.Text.Json.dll:token 0x60003bc+0x8
at System.Text.Json.JsonSerializer.Deserialize[TValue](Utf8JsonReader& reader, JsonSerializerOptions options) in System.Text.Json.dll:token 0x60003b8+0x0
at Microsoft.AspNetCore.Hosting.StaticWebAssets.ManifestStaticWebAssetFileProvider.OSBasedCaseConverter.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) in Microsoft.AspNetCore.Hosting.dll:token 0x60002fd+0x0
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x600078d+0xd6 at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) in System.Text.Json.dll:token 0x60008bc+0xc0
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x6000a29+0x2c1 at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x600078d+0x197
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) in System.Text.Json.dll:token 0x60008bc+0xc0 at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x6000a29+0x2c1
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) in System.Text.Json.dll:token 0x600078d+0x197 at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) in System.Text.Json.dll:token 0x6000779+0xae
at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonConverter jsonConverter, Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) in System.Text.Json.dll:token 0x6000395+0xa
at System.Text.Json.JsonSerializer.ReadCore[TValue](JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& state, JsonConverter converterBase) in System.Text.Json.dll:token 0x60003ad+0x1a
at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonConverter converter, JsonSerializerOptions options) in System.Text.Json.dll:token 0x60003aa+0x69
at System.Text.Json.JsonSerializer.ReadAll[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo) in System.Text.Json.dll:token 0x60003a7+0x4b
at System.Text.Json.JsonSerializer.ReadAllUsingOptions[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options) in System.Text.Json.dll:token 0x60003ac+0x8
at System.Text.Json.JsonSerializer.Deserialize[TValue](Stream utf8Json, JsonSerializerOptions options) in System.Text.Json.dll:token 0x600039d+0x0
at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest, Boolean isJson) in Microsoft.AspNetCore.Hosting.dll:token 0x60001c5+0x0
at Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration) in Microsoft.AspNetCore.Hosting.dll:token 0x60001c4+0x19
at Microsoft.AspNetCore.WebHost.<>c.b__9_0(WebHostBuilderContext ctx, IConfigurationBuilder cb) in Microsoft.AspNetCore.dll:token 0x6000086+0xd
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass9_0.b__0(HostBuilderContext context, IConfigurationBuilder builder) in Microsoft.AspNetCore.Hosting.dll:token 0x6000208+0x7
at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration() in Microsoft.Extensions.Hosting.dll:token 0x6000038+0x38
at Microsoft.Extensions.Hosting.HostBuilder.Build() in Microsoft.Extensions.Hosting.dll:token 0x6000032+0x58
at Microsoft.AspNetCore.Components.WebAssembly.DevServer.Server.Program.BuildWebHost(String[] args) in blazor-devserver.dll:token 0x6000008+0x42
at Microsoft.AspNetCore.Components.WebAssembly.DevServer.Program.Main(String[] args) in blazor-devserver.dll:token 0x6000006+0x0

@javiercn
Copy link
Member

@MarkStega It's likely that you are including the content twice.

That is because the first time you build the content doesn't exist and the second time you build it already exists. You can still use the approach I mentioned, but you need to make sure it's not already there.

The simplest way I can think of is:
<Content Remove="@(MyStuff)" /><Content Include="@(MyStuff) /> that'll make sure that duplicates are removed. You'll get a better warning/error in this situation in RC1 and we'll update the docs to cover all these things.

@MarkStega
Copy link
Author

@javiercn

With this in place in Material.Blazor.csproj and Material.Blazor.Website.csproj I can run locally and in the gh action

    <ItemGroup>
        <InputStaticAssetsScripts Include="components\**\*.ts;scripts\**\*.ts" />
        <OutputStaticAssetsScripts Include="wwwroot\materialblazor.js;wwwroot\materialblazor.min.js" />
        <Content Remove="@(OutputStaticAssetsScripts)" />
        <Content Include="@(OutputStaticAssetsScripts)" />
    </ItemGroup>

    <ItemGroup>
        <InputStaticAssetsStyles Include="components\**\*.scss;styles\**\*.scss;" />
        <OutputStaticAssetsStyles Include="wwwroot\materialblazor.css;wwwroot\materialblazor.min.css;wwwroot\material.css;wwwroot\material.min.css" />
        <Content Remove="@(OutputStaticAssetsStyles)" />
        <Content Include="@(OutputStaticAssetsStyles)" />
    </ItemGroup>

Thanks very much for all of the help; this was pretty subtle.

@javiercn
Copy link
Member

@MarkStega No problem, we'll improve the documentation in this area to suggest better patterns to follow.

@mkArtakMSFT mkArtakMSFT added the Docs This issue tracks updating documentation label Aug 12, 2021
@mkArtakMSFT mkArtakMSFT added this to the 6.0.0 milestone Aug 12, 2021
@mkArtakMSFT mkArtakMSFT modified the milestones: 6.0.0, 6.0-docs-infra Oct 19, 2021
@javiercn
Copy link
Member

Based on the feedback here, we plan to see if we can make this scenario easier in .NET 7.0 and we've created an experimental package you can use to integrate JS tooling easier into the build pipeline. We have a sample here and we'll be publishing a blog post with more details in a few days.

The TL;DR is:

  • Install a package that brings in some MSBuild targets.
  • Configure some MSBuild property or follow the convention we've defined to handle JS sources.
    • The convention is to put all the JS related stuff in an assets folder, but all these things are configurable via MSBuild properties.
  • Create build:Debug and build:Release scripts in your package.json

We will invoke npm install to restore packages and we will invoke build:Debug/Release as part of the build process and make sure the results are included as static web assets without you having to copy them to the wwwroot folder manually.

@javiercn
Copy link
Member

Closing this issue since we have created a sample to achieve this and a blog post that will be available in the following days and which we will include in docs.

@javiercn javiercn added the Done This issue has been fixed label Oct 29, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components Docs This issue tracks updating documentation Done This issue has been fixed feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-static-web-assets
Projects
None yet
Development

No branches or pull requests

4 participants