Post-Build event no longer work as expected (if compared to UnmanagedExports)
See original GitHub issueI have discovered this bug a while ago and I am surprised to see that it is still not fixed. Note: This bug is specific to DllExport code/package (any version)! Such bug does not exist in UnmanagedExports code/package (v1.2.7).
For example:
- Create a new C# class library project.
- Download/Install DllExport into project via NuGet (
Install-Package DllExport
, pick any version, the newest release v1.5.2 is still affected by this bug). - Use whatever DllExport configuration options you want, it doesn’t matter at all.
- Go to Project -> Properties -> Build Events page.
- Enter (or copy/paste) the following into post-build command line:
COPY /Y "$(TargetPath)" "$(SolutionDir)$(TargetFileName)"
You should have something like this: Next, build the project and wait for it to complete. The above simple post-build event should copy the compiled DLL with exports into another directory (overwriting the existing file if it exists). However, it seems that it instead copies compiled DLL without any exports into another directory.
And like I already said, this is not the case with UnmanagedExports package; post-build event works fine with UnmanagedExports package, apparently this bug has been introduced in DllExport code/package!
To speed things up, you can download my example (DllExport) VS2017 solution from here: DllExport-PostBuild-issue.zip
And here you can also download another example VS2017 solution which uses UnmanagedExports package instead (to see that post-build works correctly with it): UnmanagedExports-PostBuild.zip
Please fix DllExport 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
You about records from IMAGE_DATA_DIRECTORY 😃 I see, did not noticed because as I said above - it still all ok via vssbe scripts 😃
for std. VS build-events I will look later, thanks.
temporarily you can try with vssbe, or try something manually via targets.
please check it with latest changes - https://ci.appveyor.com/project/3Fs/dllexport/build/build-45/artifacts
But now we can’t use Post-build events (
PostBuildEvent
) before processing our tool. If you need this, use something like:etc.