Search Issue Tracker
Fixed in 2017.1.X
Votes
0
Found in
2017.1.0b2
Issue ID
907867
Regression
Yes
Unity auto-generated C# script contains invalid references, triggers compilation warnings
Repro steps:
1. Open Unity and create a new project
2. In the project create a new c# script ( Assets -> Create -> C# Script)
3. Open the script with Visual Studio 2017 Community
4. In Visual Studio click on View -> Error List
5. Click Build -> Rebuild Solution
6. See that in the "Error List" there are 2 Warnings
Expected result: For no warnings/errors to happen
Actual result: 2 warning messages appear
Reproduced with: 2017.1.0b5, 2017.1.0b4, 5.6.1f1
Regression introduced in: 5.6.0f3
Not reproduced on: 5.5.3p3
Fixed in: 2017.1.0b7
Note:
Added video
The primary reference "UnityEngine.TestRunner" could not be resolved because it has an indirect dependency on the framework assembly "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5,Profile=Unity Subset v3.5". To resolve this problem, either remove the reference "UnityEngine.TestRunner" or retarget your application to a framework version which contains "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The primary reference "nunit.framework" could not be resolved because it has an indirect dependency on the framework assembly "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5,Profile=Unity Subset v3.5". To resolve this problem, either remove the reference "nunit.framework" or retarget your application to a framework version which contains "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on when D3D12RenderPass::SetupDeviceResources when opening FBX animation preview
- Serialization errors are thrown when "com.unity.render-pipelines.core" is added as a custom package and Graphics window is opened
- Character Joints unexpectedly rotate when a ragdoll is created using the Ragdoll Wizard
- Crash on GfxDeviceD3D11Base::DrawBuffersBatchMode when rendering the Scene view
- The shared EditorBuildSettings.asset file of symlinked projects is not updated when changing the order of the Scenes in Build Settings in one of the projects
Mattnet
May 29, 2017 09:43
I report still having these two warnings with Unity version 5.6.1f1 and Visual Studio 2017 Community version 15.2