project-system icon indicating copy to clipboard operation
project-system copied to clipboard

Conditional Compile Include in referenced project doesn't trigger recompile when changed

Open Pequeno0 opened this issue 6 years ago • 3 comments

I have a main Xamarin forms project referencing project A Project A has the following in it's .csproj file:

<ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">
   <Compile Include="**\*.android.cs" />
   <Compile Include="**\*.android.*.cs" />
   <!--Resources-->
   <AndroidResource Include="Resources\**\*.axml" />
   <AndroidResource Include="Resources\**\*.xml" />
   <AndroidResource Include="Resources\**\*.png" />
 </ItemGroup>

if I change any of the android files, and build the Xamarin Forms project (debugging to an android phone) the referenced project will not trigger for a rebuild, meaning if I ever change anything in the referenced project, I have to manually rebuild that project. The referenced project is in the same solution and with build enabled in the build config.

Pequeno0 avatar Nov 26 '20 13:11 Pequeno0

Are you using VS or VSfM? Are you multi-targeting in the main project? Do you have simple repro solution that reproduces this issue? That might help us redirect as it could be a VS project system issue.

marcpopMSFT avatar Apr 28 '21 21:04 marcpopMSFT

@Pequeno0 a more complete repro would be helpful. Can you produce a new solution that shows this behaviour?

drewnoakes avatar Apr 29 '21 03:04 drewnoakes

Unfortunately we don't have enough information to investigate

jjmew avatar Jun 29 '21 17:06 jjmew