After updating 7.0.0-rc.1 to 7.0.0-rc.2 build fails
See original GitHub issueAfter updating 7.0.0-rc.1 to 7.0.0-rc.2 my WPF application build action
dotnet build xxxWpf/xxxWpf.csproj -c Release -p:PublishSingleFile=true --no-restore
started to fail with the following error:
Error: C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\7.0.100-rc.2.22477.23\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): error NETSDK1047: Assets file 'D:\a\xxx\xxx\xxxModels\obj\project.assets.json' doesn't have a target for 'net7.0/win-x64'. Ensure that restore has run and that you have included 'net7.0' in the TargetFrameworks for your project. You may also need to include 'win-x64' in your project's RuntimeIdentifiers. [D:\a\xxx\xxx\xxxModels\xxxModels.csproj]
Above xxxModels project already targets net7.0 and is referenced by the main WPF project. I tried updating all Microsoft.Extensions.* packages references to 7.0.0-rc.2.* but that didn’t help. Prior 11 October 2022 (7.0.0-rc.1) build was not failing.
Section from xxxWpf.csproj:
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<ApplicationIcon>Icon\icon512.ico</ApplicationIcon>
<AssemblyName>X X X</AssemblyName>
<RootNameSpace>xxxWpf</RootNameSpace>
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
<SelfContained>true</SelfContained>
</PropertyGroup>
Section from xxxModels.csproj:
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
[HAS WORKAROUND] Android build fails since 0.71.0-rc. ...
You can resolve this problem by forcing the React Native dependency to the version you expect with something like this implementation 'com.
Read more >React Native Android build failure with different errors ...
The build failures for Android was due to the publish of the React Native version 0.71.0-rc0 . Note: Error may be different but...
Read more >ASP.NET Core updates in .NET 7 Release Candidate 1
NET 7 Release Candidate 1 (RC1) is now available and includes many great new improvements to ASP.NET Core. Here's a summary of what's...
Read more >Upgrade Your Existing Projects to .NET7 - ABP Community
In this article, I'll share the experiences we faced while upgrading to the new .NET version .NET 7. When I wrote this article,...
Read more >Troubleshooting App Deployment Errors - Dash Python
This troubleshooting guide describes errors that you may encounter when deploying apps to Dash Enterprise as well as steps to resolve them.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to reproduce your issue locally and I was able to fix it by adding
-r win-x64
to your dotnet restore command. Can you test if it fixes your issue ?Also, I was able to reproduce this issue using a Console project referencing a Class Library project so this looks like it is unrelated to WPF.
Hi. Yes, issue can be closed please. Thank you.