The type or namespace name 'TargetFrameworkAttribute' does not exist in the namespace

I've used Rider with Unity for quite a while, but always seem to run into issues setting it up. I run 2018.1 Rider and Unity 2018.2.0b8. I work on a Macbook Book Pro, iOS 10.13.3.

When I open a script and then build it, I get these errors:

  .NETFramework,Version=v4.5.AssemblyAttributes.cs(4, 46): [CS0234] /var/folders/qt/k9qm69t94j7370b68rhq9b300000gn/T/.NETFramework,Version=v4.5.AssemblyAttributes.cs(4,46): error CS0234: The type or namespace name 'TargetFrameworkAttribute' does not exist in the namespace 'System.Runtime.Versioning' (are you missing an assembly reference?)

  .NETFramework,Version=v4.5.AssemblyAttributes.cs(4, 46): [CS0234] /var/folders/qt/k9qm69t94j7370b68rhq9b300000gn/T/.NETFramework,Version=v4.5.AssemblyAttributes.cs(4,46): error CS0234: The type or namespace name 'TargetFrameworkAttributeAttribute' does not exist in the namespace 'System.Runtime.Versioning' (are you missing an assembly reference?)

  .NETFramework,Version=v4.5.AssemblyAttribute.cs(2, 101): [CS0246] obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs(2,101): error CS0246: The type or namespace name 'FrameworkDisplayName' could not be found (are you missing a using directive or an assembly reference?)

I've tried a number of things to resolve them, reinstalling Mono, reinstalling Unity and Rider, but none seem to work. I lack insight in what the actual problem is and Google is not being very helpfull alas. Anyone have an idea?

 

2
3 comments

Same error on Unity 2018.1.3f1 on Ubuntu. Unity is supposed on support Rider yet.

Attach to debug works though.

I attached, detached, and Build solution worked this time. Very weird...

0
Avatar
Permanently deleted user

I had this error, it fixed itself on changing the target framework in the Solution explorer Project properties.

0
Avatar
Permanently deleted user

Janet, to which framework did you do this? I am still having issues.

0

Please sign in to leave a comment.