Xamarin Android - 如何重建 Resource.designer.cs [英] Xamarin Android - How to rebuild Resource.designer.cs

查看:36
本文介绍了Xamarin Android - 如何重建 Resource.designer.cs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Xamarin Android 中 - 如何重新生成 Resource.designer.cs

In Xamarin Android - How to regenerate the Resource.designer.cs

我尝试将所有 XML 文件的构建操作标记为AndroidResource",但 Resource.designer.cs 仍然不会使用新值进行更新.

I tried to mark all the XML file's Build Action as "AndroidResource" and still the Resource.designer.cs won't get updated with new values.

生成此文件的事件触发器是什么?

What event trigger generating this file?

推荐答案

最近使用 Xamarin.Android 4.18.0 的 Xamarin Studio 5.6(内部版本 273),如果您手动删除了 Resource.designer.cs 文件,重建将重新生成 Resource.designer.cs,但不会将其添加回项目.因此,在尝试重建一次后,该文件将出现在文件系统中,但不在项目中.要解决此问题,请手动将新生成的文件添加到项目的 Resources 文件夹中.

As recently as Xamarin Studio 5.6 (build 273) with Xamarin.Android 4.18.0, if you have manually deleted the Resource.designer.cs file from the project, rebuilding will regenerate Resource.designer.cs, but will not add it back into the project. So after attempting to rebuild once, the file will be present in the file system, but not in the project. To fix this, manually add the newly generated file into the Resources folder in the project.

这篇关于Xamarin Android - 如何重建 Resource.designer.cs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆