aspnetcore
aspnetcore copied to clipboard
The "ProcessFrameworkReferences" task failed unexpectedly.
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
Hi,
I just installed .NET 7 preview 7. I created a new Blazor Wasm hosted project. The client project does not compile - I get the stack below:
2>C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error MSB4018: The "ProcessFrameworkReferences" task failed unexpectedly.
2>C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error MSB4018: System.InvalidOperationException: Nullable object must have a value.
2>C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error MSB4018: at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
2>C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error MSB4018: at Microsoft.NET.Build.Tasks.ProcessFrameworkReferences.ExecuteCore()
2>C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute()
2>C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2>Done building project "BlazorApp1.Client.csproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Also, all the references (Analyzers, Frameworks, Packages, Projects) have a yellow warning icon.
If I change in csproj file
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
to
<Project Sdk="Microsoft.NET.Sdk.Razor">
the dependencies are restoring and the project compiles, but this is not useful for me.
Any idea?
Thanks, Ion
Expected Behavior
Dependencies must be restored properly ant the project must compile.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
7.0.100-preview.7.22377.5
Anything else?
OS: Windows 10 VS version: 17.4.0 Preview1.0
@IonRobu thanks for contacting us.
This might be an issue on the SDK. Could you file the issue through Visual Studio and include an MSBuild binary log with information set to diagnostics? You can use https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProjectSystemTools2022 to capture the binary log. Make sure to turn file logging for MSBuild to diagnostic.
Check https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022 for how to report a problem
Parking this here for now, although this is very likely an SDK issue.
@IonRobu thanks for contacting us.
This might be an issue on the SDK. Could you file the issue through Visual Studio and include an MSBuild binary log with information set to diagnostics? You can use https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProjectSystemTools2022 to capture the binary log. Make sure to turn file logging for MSBuild to diagnostic.
Check https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022 for how to report a problem
Hello, I will get the report and send it via Report problem method. Meanwhile I found this: https://github.com/dotnet/core/blob/main/release-notes/7.0/known-issues.md
Blazor issues depending on whether you’re using .NET 6 installed by VS or stand-alone install of .NET 7 If your app is targeting Blazor using the .NET 7 version included in VS, you can target net6.0 but not target net7.0 and you'll see an error message 'The "ProcessFrameworkReferences" task failed unexpectedly.'
Workaround:
Install the standalone SDK for .NET 7.0 Preview 6. Could be related to my issue?
Thanks, Ion
It might be.
@javiercn I reported this via Visual Studio and attached the MSBuild log:
https://developercommunity.visualstudio.com/t/The-ProcessFrameworkReferences-task-fa/10117124?port=1025&fsid=83a9f073-8862-4bef-b828-ca04cfe1bd71&entry=myfeedback&space=8&sort=newest&q=The+%22ProcessFrameworkReferences%22+task+failed+unexpectedly&ref=native&refTime=1660200745347&refUserId=e90e0456-d2f7-4427-90ee-dc0969152727
Thanks for reporting it that way. Closing this as external.