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
Closed

Comments

@xen2
Copy link

@xen2 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

This comment has been minimized.

Copy link
Author

@xen2 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:
xamarin/xamarin-android@ea6853a#diff-d07d3a1d454b339218b793dedae96995

@xen2

This comment has been minimized.

Copy link
Author

@xen2 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 xenko3d/xenko that referenced this issue Aug 2, 2019
@onovotny

This comment has been minimized.

Copy link
Collaborator

@onovotny onovotny commented Aug 6, 2019

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

This comment has been minimized.

Copy link

@skarllot skarllot commented Aug 6, 2019

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

@Perksey

This comment has been minimized.

Copy link
Contributor

@Perksey Perksey commented Aug 7, 2019

Getting this too, thanks for the workaround @xen2

@RLittlesII

This comment has been minimized.

Copy link

@RLittlesII RLittlesII commented Aug 17, 2019

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

@jamesmontemagno

This comment has been minimized.

Copy link

@jamesmontemagno jamesmontemagno commented Aug 18, 2019

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

@onovotny

This comment has been minimized.

Copy link
Collaborator

@onovotny onovotny commented Aug 19, 2019

@onovotny onovotny closed this in ed2681b Aug 19, 2019
onovotny added a commit that referenced this issue Aug 19, 2019
@onovotny

This comment has been minimized.

Copy link
Collaborator

@onovotny onovotny commented Aug 19, 2019

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

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

This comment has been minimized.

Copy link

@JulienTheron JulienTheron commented Aug 20, 2019

Same issue here. VS2019 16.2 with Extras 2.0.41.

@TSIoT

This comment has been minimized.

Copy link

@TSIoT 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

This comment has been minimized.

Copy link
Contributor

@Perksey 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
Projects
None yet
8 participants
You can’t perform that action at this time.