Adding files to Shared Projects

When I add a file to a shared project in visual studio projitems looks like this

<ItemGroup>
    <Compile Include="$(MSBuildThisFileDirectory)Keys.pas"/>
</ItemGroup>

When I add a file in Fire its like this

<ItemGroup>
    <Compile Include="AnimationSelection.pas"/>
</ItemGroup>

As a result I cant build projects that reference shared projects.

Cheers,
John

I don’t see how A follows from B. What exactly fails?

In each project that references the shared project it cant find the file and thinks it should be in the project

For example SendMeAGrib is one project that references the shared project

While building I get

: error E215: File “/Users/JohnMoshakis/Documents/develop/Nougat/SendMeAGrib/SendMeAGrib/AnimationSelection.pas” not found

And I get the same error in the other project SendMeAGribIOS

: error E215: File “/Users/JohnMoshakis/Documents/develop/Nougat/SendMeAGrib/SendMeAGribIOS/AnimationSelection.pas” not found

That file is in the shared project, which is in a folder called SendMeAGrib.Core

Cheers,
John

Can you send me a test case that shows this? I’ve been sing shared projects extensively, in Fore and VS, and they work fine in all my uses (and the presence or lack of $(MSBuildThisFileDirectory) should and does not make a difference for me).

Does it fail to build in Fire,in VS or both?

References.zip (394.1 KB)

I created this totally in Fire and it also doesnt build in visual studio. It says

Error 1 (E215) File “Z:\Documents\develop\Nougat\References\MacApp\Something.pas” not found 0 0 MacApp

Ok, it looks like build doesn’t need $(MSBuildThisFileDirectory), but Visual Studio does, when the projects are in different folders. I’ll investigate some more, and probably end upheaving Fire add the prefix, after all.

I think Fire needs it as well, that was how I found it. If you have all the projects in different directories it has problems.

Ah, ok. Guess in all my cases I had both projects in the same folder, so far.

Will fix for the next build (for newly added files; it won’t fix “bad” existing projects, so you’ll have to manually add the prefix there.