As I said in the comments on your question, this should work for you:
<ItemGroup> <EmbeddedResource Include="..\$(Configuration)\file.txt"> <Link>Files\file.txt</Link> </EmbeddedResource> </ItemGroup>
Even if you can see the old values ββin the "Full path" of the VS property editor - when you create it, it will take into account your current configuration. The VS property editor should be updated with the Refresh button in Solution explorer or reload the project in the worst case. Maybe changing the selection to another file and returning to the .txt file will be enough to update the property editor.
UPDATE
I found out in which case the full path changed for me by clicking the Refresh button in Solution explorer - this is the path of the Dll Reference Hint link.
<Reference Include="MyDll"> <SpecificVersion>False</SpecificVersion> <HintPath>..\$(Configuration)\MyDll.dll</HintPath> </Reference>
This will only work if all the DLL files (in all target folders) really exist.
For some reason, Item files. The full path is not updated - for elements of a file, VS always thinks that the current configuration is named Debug - EVEN IF YOU REMOVE DEBUG CONFIGURATION FROM THE PROJECT. Fortunately, this VSBug does not affect the build - it will still accept valid files.
source share