Grzegorz G.
Grzegorz G.

Reputation: 1345

Visual Studio - xamarin.forms - Could not find file [possible duplicate]

I have a small problem with my cross-platform xamarin.forms project. I am calling it small because my app is working and there is no problems at all. Its just annoying to see failure messages, would u agree?

So anfter cleaning project I am getting outputs:

[Failure] Could not find file 'C:\Users\Grzegorz\source\repos\SkanerDetali\SkanerDetali\SkanerDetali\obj\Debug\SkanerDetali.Views.LoginPage.xaml.g.cs'.
[Failure] Could not find file 'C:\Users\Grzegorz\source\repos\SkanerDetali\SkanerDetali\SkanerDetali\obj\Debug\SkanerDetali.App.xaml.g.cs'.
[Failure] Could not find file 'C:\Users\Grzegorz\source\repos\SkanerDetali\SkanerDetali\SkanerDetali\obj\Debug\SkanerDetali.MainPage.xaml.g.cs'.

I couldnt find thread about similar messages. Is there any way to repair this failure?

Upvotes: 0

Views: 612

Answers (1)

Wilson Vargas
Wilson Vargas

Reputation: 2899

That's a compiler generated file, try rebuilding the PCL/shared project 1st and then the platform specific Project.

Also if you make XAML changes in Visual Studio (Windows) you have to save the changes before the code behind file can see them.

I have complained about these issues.

But you can Try doing a clean. If that doesn't work, delete the bin obj directories in your solution, then do a full rebuild. Make sure none of your XAML files are referencing that component (which is what's generating the .g.cs file).

Upvotes: 1

Related Questions