Set BuildAction in Visual Studio from pre build event

70 views Asked by At

I have droid and iOS xamarin projects plus a shared library. Both apps use a common set of images. For android these should live in the Assets folder. I have a pre build event that copied them from the shared project to the android project.

xcopy /E /Y "$(SolutionDir)VentureLibrary\Art\RogueLife\*" "$(ProjectDir)Assets" 

That works fine but that doesn't seem to be the same as adding the files manually. Then they get their build action set to AndroidAsset.

So my question is, can you set a build action for a file in a pre build event? If not, is there another way of achieving the same result?

0

There are 0 answers