[英]Unity project does not compile in VS2015 when adding Firebase
I'm having troubles integrating Firebase for Unity in my project. 我在项目中集成Firebase for Unity时遇到了麻烦。 As soon as I add it, it seems to work fine in Unity but the C# project does not compile anymore in VisualStudio 2015 一旦我添加它,它似乎在Unity中工作正常,但C#项目在VisualStudio 2015中不再编译
I'm having a lot of warnings looking like : 我有很多警告看起来像:
>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5):
warning MSB3258: The primary reference "Firebase.App" could not be resolved because it has
an indirect dependency on the .NET Framework assembly "System, 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.
Which, I assume are problematic because after a douzain of those on different classes from Google Firebase sdk for Unity I get : 其中,我认为是有问题的,因为在针对Unity的Google Firebase sdk的不同类别的人员之后,我获得了:
[Edited Path of my project]\Assets\Firebase\Editor\AnalyticsDeps.cs(30,36,30,42):
error CS0103: The name 'Google' does not exist in the current context
It seems that when building a version for Android, everything is fine but calls to LogEvent
are not executed. 似乎在为Android构建版本时,一切都很好但是没有执行对LogEvent
调用。 Plus, with this problem I can no longer debug the scripts as they do not compile in VS. 另外,有了这个问题,我无法再调试脚本,因为它们不能在VS中编译。
Looks like it's .NET framework problem, but I have no idea how to solve this. 看起来它是.NET框架问题,但我不知道如何解决这个问题。 I do not have latest version of Unity as I'm releasing very soon and I kept the last stable version (5.3.5f1) for my game (further versions made my game enter infinite loops) 我没有最新版本的Unity,因为我很快就会发布,我为我的游戏保留了最后一个稳定版本(5.3.5f1) (更多版本让我的游戏进入无限循环)
[Edit] Here are the steps I used to reproduce the problem with a new Unity project having only one (default generated) script file: [编辑]以下是我用一个新的Unity项目重现问题的步骤,该项目只有一个(默认生成的)脚本文件:
Steps: 脚步:
And here are the configs I tried it on : 以下是我试过的配置:
Configuration : windows 7 home premium SP1 64bits with: 配置: windows 7家庭高级版SP1 64位带:
I also did a clean install on another PC with latest Unity and VS 2015 and SDK/JDK/NDK etc. setup on a Windows 8.1 home edition with the same result. 我还在另一台PC上进行了全新安装,在Windows 8.1家庭版上安装了最新的Unity和VS 2015以及SDK / JDK / NDK等,结果相同。 [/Edit] [/编辑]
Looks like a known issue, here is an answer from google support : 看起来像一个已知问题,这是谷歌支持的答案:
Hi Chris, 嗨克里斯,
Thanks for sending all these details. 感谢您发送所有这些细节。
This is a legit issue and we are tracking this internally. 这是一个合法的问题,我们正在内部跟踪这个问题。
However, won't be able to commit about the ETA and timelines for this issue to get resolved. 但是,无法提交有关此问题的ETA和时间表以解决问题。
In the meantime, the engineer of concerned team have suggested workaround to build in Unity (which you already did successfully) and go ahead with the release. 与此同时,相关团队的工程师建议在Unity中构建解决方法(您已经成功完成)并继续发布。
Regards, 问候,
Update: 更新:
Hello Chris, 你好克里斯,
Thanks for all the inputs and feedback to drive this bug to resolution. 感谢所有输入和反馈,以驱动此错误解决。
We have fixed this bug in our Unity plugin. 我们在Unity插件中修复了这个错误。
This will be released and pushed soon to production. 这将被发布并很快投入生产。 Keep an eye on our release notes . 请留意我们的发行说明 。
Feel free to reach out if you have any further questions. 如果您有任何其他问题,请随时与我们联系。
Regards, 问候,
Update 2 Fixed in version 1.1.0 of Firebase 更新2已在Firebase 1.1.0版中修复
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.