Skip to content

Build error throws when running dotnet pack with multiple target framework #30427

@Karthigaiselvi-SF2856

Description

@Karthigaiselvi-SF2856

Bug Description:

After upgrading the .NET 6.0 preview 1 SDK, it throws build error when running dotnet pack command line. The problem is occur when the project file have multiple target frameworks <TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>. If I change it to single <TargetFramewok> then it works fine.

Exceptions (if any)

C:\Program Files\dotnet\sdk\6.0.100-preview.1.21103.13\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.ScopedCss.targets(134,3): error MSB4044: The "ComputeCssScope" task was not given a value for the required parameter "TargetName". [D:\Feb\NET6\RazorClassLibrary2\RazorClassLibrary2.csproj]

To Reproduce

  • Download the Razor sample.
  • Goto command prompt and then run the command dotnet pack -c Release

Sample:

RazorClassLibrary3.zip

Further technical details

Blazor RazorClass Library 6.0 sample
Latest SDK .NET 6.0 Preview 1
VS 2019 preview

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-css-isolationThis issue is related to CSS Isolation featurefeature-razor-sdk

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions