Tony
Tony

Reputation: 17657

Xamarin: [Failure] Could not find file designtime\Resource.Designer.cs

While Building a Xamarin Solution

This error appears on the Build of the Android project:

[Failure] Could not find file designtime\Resource.Designer.cs

How to solve it?

Upvotes: 1

Views: 1816

Answers (3)

Cool_Yusuf
Cool_Yusuf

Reputation: 1

You should change the MainActivity.cs Build Action property as 'none' instead of 'compile'. I Hope this will resolve your problem, it worked for me.

Upvotes: 0

Suresh R
Suresh R

Reputation: 11

I got the solution

1) Go to Project folder's Properties -> (Uncheck the Read only box) -> (Check apply to folders & sub folders)

2) Reopen and build the project.

the above solution worked fine.

Upvotes: 1

Tony
Tony

Reputation: 17657

Edit the .csproj and find

<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>

replace with:

<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>

Source: https://forums.xamarin.com/discussion/13339/resource-designer-cs-not-regenerated#latest

Upvotes: 2

Related Questions