Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android] 'obj\Release\monoandroid81\Resource.Designer.cs' could not be found #174

Closed
xen2 opened this issue Aug 2, 2019 · 12 comments

Comments

@xen2
Copy link
Contributor

xen2 commented Aug 2, 2019

Started to happen once I updated VS2019 from 16.1.6 to 16.2.0

Seems to be due to https://github.com/onovotny/MSBuildSdkExtras/blob/master/Source/MSBuild.Sdk.Extras/Build/Platforms/Xamarin/Xamarin.Android.targets#L11
(until line 18).

Maybe those parameters are interpreted differently in latest Xamarin Android.

Note: this is a big blocker, can't compile anything without ugly workaround to remove the Compile from line 18.

@xen2
Copy link
Contributor Author

xen2 commented Aug 2, 2019

Quick guess (since I don't have the old version anymore):
maybe it used to generate empty file before if there was nothing to write, but maybe in latest Xamarin.SDK it doesn't generate the file at all anymore?

This might be the actual change:
dotnet/android@ea6853a#diff-d07d3a1d454b339218b793dedae96995

@xen2
Copy link
Contributor Author

xen2 commented Aug 2, 2019

Quick workaround:

  <Target Name="_RemoveNonExistingResgenFile" BeforeTargets="CoreCompile" Condition="'$(_SdkSetAndroidResgenFile)' == 'true' And '$(AndroidResgenFile)' != '' And !Exists('$(AndroidResgenFile)')">
    <ItemGroup>
      <Compile Remove="$(AndroidResgenFile)"/>
    </ItemGroup>
  </Target>

xen2 added a commit to stride3d/stride that referenced this issue Aug 2, 2019
@clairernovotny
Copy link
Collaborator

I can't seem to repro this in 16.3 preview 1. Does it repro for you there? If so, can you attach a small repro project? In my test library project, I see a Resource.Designer.cs in the obj\MonoAndroid81 directory.

@skarllot
Copy link

skarllot commented Aug 6, 2019

@xen2 Could fix to 1.6 branch too, because I'm stuck with this version because UWP support.

@Perksey
Copy link
Contributor

Perksey commented Aug 7, 2019

Getting this too, thanks for the workaround @xen2

@RLittlesII
Copy link

#174 (comment) fixed our issue. We added it to every project that targeted MonoAndroid

@jamesmontemagno
Copy link

I had an odd dependency on the new billing library and it has a dependency on annotations. I had to add the resgen fix and turn off designtime builds too: jamesmontemagno/InAppBillingPlugin@1220af4

@clairernovotny
Copy link
Collaborator

@clairernovotny
Copy link
Collaborator

Can you try Extras 2.0.41? Should have a fix for this.

martijn00 referenced this issue in aritchie/userdialogs Aug 19, 2019
@JulienTheron
Copy link

Same issue here. VS2019 16.2 with Extras 2.0.41.

@TSIoT
Copy link

TSIoT commented Aug 21, 2019

Same issue here. VS2019 16.2.3 with Extras 2.0.41
But work fine in VS2017 15.9.15 with Extras 2.0.41

@Perksey
Copy link
Contributor

Perksey commented Aug 21, 2019

Same issue here. Rider 2019.2 with Extras 2.0.41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants