Msbuild p:OutputPath not respected

Hello,
we’ve ran into a problem that we think is a bug. When we try to build our solution via MSBuild using /p:OutputPath argument that should copy all dll files created by the build, the dll files of the Project that wasn’t referenced by any other Project of the Solution won’t get copied to the mentioned path.

Here is our test case:
TCElements2.zip (190.0 KB)

  1. Unzip the files

  2. Run this command in MSBuild (adjust the paths as needed)

    msbuild C:\users\KolarD\Plocha\TCElements\TCElements.sln /p:OutputPath=C:\users\KolarD\Plocha\TCElements\MyOut -t:Rebuild

  3. In the folder \TCElementsy\MyOut should now be visible the dll file “ClassLibrary4” but it isn’t.

Thank you in advance,
David

If you are using Elements 10, you will want to use EBuild to build your project from the command line, not MSBuild. See https://docs.elementscompiler.com/EBuild/ for more details.

Ok, but we have a solution that has not only .element files but also .csproj files which are not supported by Ebuild. Is there a way to make it work?

I’ll see what I can do, for OutputPath specifically. But EBuild embedded in MSBuild will not bw able to see arbitrary parameters set on MSBuild level.

Thanks, logged as bugs://83071

May I Ask for status update? Thanks

I’m still investigating options; it’s not as easy a fix as it might seem.

It works with
<Import Project="$(MSBuildExtensionsPath)\RemObjects Software\Elements\RemObjects.Elements.Echoes.Legacy.targets" />
hope it helps :slight_smile:

That’s a workaround, but not the proper solution, as you’ll lose all of the EBuild build tool chain, and many parts of out legacy MSBuild tool chain are deprecated, no longer maintained or even, frankly, no longer working.

For .NET projects you should be fine with using Legacy for now, but I don’t recommend it. All other platforms will not work with legacy, anymore.

Hello,
how It goes ? We really demand this Output redirection. Could you at least recommend us another way how to pass a property from msbuild arguments to the build task, so we could implement conditinal PostBuild copy task ?
Whe are stuck at RemObjects.Elements.Echoes.Legacy.targets with hundreds of projects migrating from original chrome compiler.

Thanks

For now, sticking with RemObjects.Elements.Echoes.Legacy.targets is the best solution.