Return to Unity Plugin

.NET version required

All about Unity plug-in

.NET version required

Postby Petr Kavan » November 29th, 2017, 5:32 am

Hi, I am using Unity 2017.2.0f3 and GAF. Everything installed 2 weeks ago, so it should be quite up-to-date. I can create animation from swf, put it in Unity, and play it without problem. But when I open a project in Visual studio and compile it from there (in order to do some debugging), i get following error:

Warning The primary reference "GAF" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.

Then of course symbols are not defined and compilation fails. What can be done to repair it? Target framework is "Unity 3.5 .net Subset base class libraries", I expect this cannot be simply changed to .NET Framework 4.6 or so? They have some warning about changing target.
User avatar
Petr Kavan
 
Posts: 2
Joined: November 21st, 2017, 5:06 am

Re: .NET version required

Postby Alexey Finkilshtein » November 30th, 2017, 12:00 am

Hi,

Seems like something wrong with your VS project.
You can try to select .NET Framework 4.6 in the VS project settings.
Or you can try to just use Debug --> Attach unity debugger and select opened unity app.
Attachments
attach.png
test+-+Microsoft+Visual+Studio+%28Administrator%29+2017-11-30+09.49.39.png
User avatar
Alexey Finkilshtein
 
Posts: 381
Joined: May 21st, 2014, 6:53 am

Re: .NET version required

Postby Petr Kavan » December 7th, 2017, 1:34 am

Thanks ... I tried to change the .NET version, it went OK, and I can the debug normally. I realized that it doesn't matter what I do to project itself, because unity uses just source code.

When unity recreates project, I have to change target again, but that is easy and not that often.
User avatar
Petr Kavan
 
Posts: 2
Joined: November 21st, 2017, 5:06 am

Return to Unity Plugin

Who is online

Users browsing this forum: No registered users and 1 guest