TargetFramework from the startup project is being propagated to all referenced projects during running/debugging.

I have had a maccatalyst project as startup project for some time, but now I am not able to use the start/debug functionality in rider because of this error:

Error NETSDK1005 : Assets file '/Users/me/mysolution/myReferencesProject/obj/project.assets.json' doesn't have a target for 'net8.0-maccatalyst'.

The issues is that targetframework from the startup project propogates to the references projects. Most of these projects are .net8 class libraries. It work fine to rebuild the enture solution every time I make changes, but I would rather not. Visual studio code works as before with the dotnet CLI. I realize this might be some sort of user error, but I am not able to fix this issue and it is slowing down development.

Thanks!

5
14 comments

I have the same problem since I updated to Sequoia on my mac.  If I compile from CLI it works just fine, but I can't run the debugger.

1

How many votes do we need for this to gain traction? This is a very frustrating issue. Reporting the same problem here now I've upgraded to Sequoia. CLI builds fine using Rider's terminal but can't use start/debug buttons.

2

I've similar issue, also with MacCatalyst and Maui. I'm using latest version of Rider. 
Jason Cox - this link is not working for me. It is an internal issue? 

0

Jerzy Piechowiak 

I think they have acknowledged the issue at least.  The instructions I got from them that work are as follows:

`sudo rm -Rf` on the `obj` and `bin` folders in all referenced projects. (Tedious to do manually.)  Then Debug should work again.

I think something that MacOS changed with access controls is the culprit.  The problem only occurs after I've done `sudo dotnet publish…` because the publish command requires elevation, and it creates files in the bin and obj directories that Rider then can't change.

0

Jason Cox for me problem occurred everytime if i had changed something in dependency project.. 

Two things were helpful:

1) Build manually dependency projects

or

2) Disable “Use ReSharper Build” in Rider Settings - works everytime but it is a little bit slower 

0

I'd like to chime in and say that I think it's a Rider issue and not a macos issue. I've been using the toolbox to run an older version of Rider, I think it's 2023.2.2 (It's actually 2023.3.6) or something like that (I will edit when I am at my laptop) and I can debug my solution just fine. But once I open the same solution in the latest version of Rider, it does not work.

0

Hello everyone,

Please let us know if the issue persists if you update to the recently released Rider 2024.3.4. If you are able to reproduce this behavior using this version of Rider, please send us any project affected by this issue so we could look into this further.

You can use the Upload Service to send us the project privately - just mention the Upload ID in this thread.

 

0

I just wanted to chime in that my issue has not been resolved. Not only that, I also have issues with building. I have to rebuild the entire solution every time I make a change in another project that is not the maccatalyst project. Simply building the solution doesn't even work as it just skips all projects silently (it seems). I have used a lot of time trying to understand why my changes doesn't fix issues only to realise they were never built in the first place. 

I also have to invalidate caches constantly. It is starting to get to a point where I am just going to quit using rider all together, allthough I do not find visual studio code good enough yet. 

0

Hello Gaute Baalsrud,

Please send us a sample project affected by this issue so we could investigate it further. You can send us the project via the Upload Service, and let us know the Upload ID in this thread or use Help→Report a Bug in Rider to file an issue on the tracker and attach the sample project to this issue.

0

Hi again

This is a sample solution where I am able to reproduce the error. https://github.com/gautetb/target-framework-error

If I make changes in Class1 and run a configuration with “Build project” it fails with error message: 

Build with surface heuristics started at 13:44:18
Use build tool: /usr/local/share/dotnet/sdk/8.0.403/MSBuild.dll
CONSOLE: MSBuild version 17.11.9+a69bbaaf5 for .NET
CONSOLE: Build started 18/06/2025 13:44:18.
CONSOLE: Project "/var/folders/0l/w0qg3x2510q997q3yzqk7dy80000gn/T/Zeculyr.proj" on node 1 (default targets).
CONSOLE: ControllerTarget:
CONSOLE:   Run controller from /Applications/Rider.app/Contents/lib/ReSharperHost/JetBrains.Platform.MsBuildTask.v17.dll
0>------- Started building project: ClassLibrary1
0>Microsoft.PackageDependencyResolution.targets(266,5): Error NETSDK1005 : Assets file '/Users/me/MauiApp1/ClassLibrary1/obj/project.assets.json' doesn't have a target for 'net8.0-maccatalyst'. Ensure that restore has run and that you have included 'net8.0-maccatalyst' in the TargetFrameworks for your project.
0>------- Finished building project: ClassLibrary1. Succeeded: False. Errors: 1. Warnings: 0
Build completed in 00:00:00.550
 

If I run “Build solution” the build is pretty much instantaneous, but the changes are not applied. I need to run “Rebuild solution” in order to make changes that appear in the app basically. 

Im on macOS Sequoia 15.4.1 with JetBrains Rider 2025.1.3. This has persisted through multiple versions and I cannot recall when it occurred first unfortunately 

0

Gaute Baalsrud, thank you for the details. This particular issue is due to the project targeting net*-maccatalyst. MacCatalyst hot reload is not supported in Rider at the moment. Please consider voting for RIDER-124048 Support C# Hot Reload for MacCatalyst apps if you want to see this implemented. 

0

Okay, but I can live without hot reload. I just want to be able to build just the projects that have changes when making changes in my class libraries. I tried turning of hot reload now and it didn't seem to help. Is there something I can do? 

0

You can disable Use ReSharper Build option under Settings | Build, Execution, Deployment | Toolset and Build. This will force Rider to fall back on the behavior similar to dotnet build, with changes to non-Hot reload builds applied as expected. If you encounter any issues disabling this option in your environment, please let us know.

0

Please sign in to leave a comment.