Reputation: 352
My IDE is showing errors complaining that my resources do not contain a definition, one example is:
'Resource.Dimension' does not contain a definition for 'screen_padding'
The auto-generated Resource.Designer.cs file in the Resources folder of my Android project has the resources there, but it appears that there is another auto-generated Resource.Designer.cs file in the debug folder for my project, which for reasons unknown to me, is different and I guess is what is causing the error warnings. I'm having to copy/paste from the first in to the second to supress the error warnings (which are non-breaking), but they are annoying.
Is there any way round this, or why does the debug REsource.Designer file not mirror the Resource.Designer file in the project?
Upvotes: 2
Views: 928
Reputation: 55
You should put this inside of your .csproj file: <AndroidUseManagedDesignTimeResourceGenerator>False</AndroidUseManagedDesignTimeResourceGenerator>
.
To do that, close your project, open the .csproj file and insert it into the first <PropertyGroup>
. I inserted right after <MonoAndroidAssetPrefix>Assets</MonoAndroidAssetPrefix>
.
Upvotes: 3