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!

3
8 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

Please sign in to leave a comment.