I have the following issue.
I've created an Azure function and want to run a compiler stored in {ProjectFile}/AlCompiler
folder.
The folder contains .dll's and alc.exe file. The exe-file requires these .dll's to run, otherwise produces an error.
I tried to publish the files of AlCompiler folder to wwwroot directory adding following to the .csproj project file:
<ItemGroup>
<Content Include="AlCompiler/**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Also I tried this markup:
<ItemGroup>
<ContentWithTargetPath Include="AlCompiler/**">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<TargetPath>AlCompiler\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
And tried to use <Link>
attribute:
<ItemGroup>
<Content Include="AlCompiler/**">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<Link>AlCompiler\%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>
All of these causes the files of AlCompiler directory being split up on publish:
- exe and some other files go to wwwroot/AlCompiler folder
- all the .dll's go to wwwroot/bin/AlCompiler folder
I didn't find any way to keep them in one place.
So I cannot run alc.exe file due to .dll's being missing.
I'd be very glad for your help with this!