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

Blazor WebAssembly App does not build when referencing .NET Standard 2.0 assembly. #35349

Closed
vsfeedback opened this issue Aug 14, 2021 · 6 comments · Fixed by dotnet/sdk#19873
Assignees
Labels
area-blazor Includes: Blazor, Razor Components Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:I'm unable to use this version] [regression] [worked-in:Preview 2.1]
When referencing a .NET Standard 2.0 (this is the only option I have tried) assembly (versus Project Reference), I am not able to build the Project/Solution.
I have included the basic project, cleaned in order to keep the download small. Build the ClassLibrary first, then the BlazorApp.


Original Comments

Feedback Bot on 8/12/2021, 02:05 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

@ghost ghost added the Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. label Aug 14, 2021
@mkArtakMSFT mkArtakMSFT added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Aug 14, 2021
@SteveSandersonMS
Copy link
Member

Unfortunately we haven't received the repro project that is mentioned above. If you're able to repost it, preferably as a GitHub issue, we'd be happy to investigate.

@SteveSandersonMS SteveSandersonMS added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Aug 16, 2021
@johnhmuller
Copy link

johnhmuller commented Aug 17, 2021

Hi, I have recreated the repro steps and attached the solution:

Create a new Blazor Web Application, do not build. Add a .NET Standard 2.0 Class Library, building the latter (class library) only. Add a reference to the built output in the Blazor project and build - build fails. Seems that the extension gets lost somewhere in the MSBuild machinery. I have also included a workaround in the project file - moving the HintPath directly into the Reference.

BlazorApp.zip

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Aug 17, 2021
@pranavkm
Copy link
Contributor

@johnhmuller could you share the repro app as a GitHub repo? Thanks!

@pranavkm pranavkm added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Aug 17, 2021
@johnhmuller
Copy link

johnhmuller commented Aug 18, 2021

Hi, would this suffice?

https://github.com/johnhmuller/blazorApp

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Aug 18, 2021
@javiercn javiercn added bug This issue describes a behavior which is not expected - a bug. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Aug 19, 2021
@javiercn
Copy link
Member

I've confirmed it's a bug.

It's an issue with how we choose the path to the file we are about to compress, we look at the original item spec expecting that its the path to an existing file.

@javiercn
Copy link
Member

dotnet/sdk#19873

@pranavkm pranavkm added this to the 6.0-rc1 milestone Aug 19, 2021
@ghost ghost added the Working label Aug 20, 2021
javiercn added a commit to dotnet/sdk that referenced this issue Aug 20, 2021
* Fixes an issue with projects not working with reference assemblies
  using HintPath.
* Fixes an issue where files without an extension where being included
  inside an additional folder with the file name on nuget packages.
* Adds additional error logging for the brotli compression tool.
* Adds additional login for the gzip compress task.
* Adds editor config files in the blazor wasm and razor sdk folders
  to handle 'var' usage preferences in ASP.NET Core projects.
* Performs a more selective filtering for static web assets candidates
  from the build candidates in blazor webassembly applications.
* Fixes an issue with AppendTargetFramework=false causing issues

dotnet/aspnetcore#35349
dotnet/aspnetcore#32744
dotnet/aspnetcore#29561
dotnet/aspnetcore#35561
@ghost ghost added Done This issue has been fixed and removed Working labels Aug 20, 2021
javiercn added a commit to dotnet/sdk that referenced this issue Aug 20, 2021
* Fixes an issue with projects not working with reference assemblies
  using HintPath.
* Fixes an issue where files without an extension where being included
  inside an additional folder with the file name on nuget packages.
* Adds additional error logging for the brotli compression tool.
* Adds additional login for the gzip compress task.
* Adds editor config files in the blazor wasm and razor sdk folders
  to handle 'var' usage preferences in ASP.NET Core projects.
* Performs a more selective filtering for static web assets candidates
  from the build candidates in blazor webassembly applications.
* Fixes an issue with AppendTargetFramework=false causing issues

dotnet/aspnetcore#35349
dotnet/aspnetcore#32744
dotnet/aspnetcore#29561
dotnet/aspnetcore#35561
javiercn added a commit to dotnet/sdk that referenced this issue Aug 24, 2021
* Fixes an issue with projects not working with reference assemblies
  using HintPath.
* Fixes an issue where files without an extension where being included
  inside an additional folder with the file name on nuget packages.
* Adds additional error logging for the brotli compression tool.
* Adds additional login for the gzip compress task.
* Adds editor config files in the blazor wasm and razor sdk folders
  to handle 'var' usage preferences in ASP.NET Core projects.
* Performs a more selective filtering for static web assets candidates
  from the build candidates in blazor webassembly applications.
* Fixes an issue with AppendTargetFramework=false causing issues

dotnet/aspnetcore#35349
dotnet/aspnetcore#32744
dotnet/aspnetcore#29561
dotnet/aspnetcore#35561
@ghost ghost locked as resolved and limited conversation to collaborators Sep 19, 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 Author: Migration Bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author. bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants