| Ticket Hash: | f16c93a9326ac3a32bcee5baa72fd447b1be1e1e | ||
| Title: | System.Data.SQLite.Core.targets should run CopySQLiteInteropFiles before PostBuildEvent | ||
| Status: | Closed | Type: | Code_Defect |
| Severity: | Important | Priority: | Blocker |
| Subsystem: | NuGetPackage | Resolution: | Fixed |
| Last Modified: |
2014-12-05 22:15:55 11.45 years ago |
Created: |
2014-11-06 09:36:48 11.53 years ago |
| Version Found In: | 1.0.94.0 | ||
| User Comments: | ||||
anonymous added on 2014-11-06 09:36:48:
(text/x-fossil-plain)
System.Data.SQLite.Core.targets, first shipped with 1.0.94.0, runs CopySQLiteInteropFiles target at the end of the build, which means it happens after <PostBuildEvent> (settable from Visual Studio -> project Properties -> Build Events tab).
This means that for example when I add there something like:
xcopy $(TargetDir) ..\..\someOtherDir
It will copy build results, but without sqlite assemblies, which gets copied to TargetDir later.
Fix it by changing:
<PropertyGroup>
<BuildDependsOn>
$(BuildDependsOn);
CopySQLiteInteropFiles;
</BuildDependsOn>
<CleanDependsOn>
$(CleanDependsOn);
CleanSQLiteInteropFiles;
</CleanDependsOn>
</PropertyGroup>
For example to:
<PropertyGroup>
<PostBuildEventDependsOn>
$(PostBuildEventDependsOn);
CopySQLiteInteropFiles;
</PostBuildEventDependsOn>
<CleanDependsOn>
$(CleanDependsOn);
CleanSQLiteInteropFiles;
</CleanDependsOn>
</PropertyGroup>
mistachkin added on 2014-11-07 23:54:01:
(text/x-fossil-plain)
How can anything in the "build event" fire after the "post build event"? mistachkin added on 2014-11-08 00:06:34:
(text/x-fossil-plain)
Related to [e796ac82c1]. mistachkin added on 2014-11-08 07:19:25:
(text/x-fossil-plain)
Ok, apparently PostBuildEvent is done as part of the Build processing. mistachkin added on 2014-11-19 00:52:06:
(text/x-fossil-plain)
A candidate fix is checked in on the publishWithNuGetPkg branch, here: [/timeline?r=publishWithNuGetPkg] mistachkin added on 2014-11-25 17:31:11:
(text/x-fossil-plain)
Fixed on trunk via check-in [eb697cca1c]. Please let us know if this fix does not address the issue in your environment. mistachkin added on 2014-12-05 03:07:11:
(text/x-fossil-plain)
Re-opened. The fix has issues when there is no PostBuildEvent defined. mistachkin added on 2014-12-05 03:24:40:
(text/x-fossil-plain)
This should be corrected by check-in [7de90061a2]. mistachkin added on 2014-12-05 22:15:55:
(text/x-fossil-plain)
The solution of calling the CopySQLiteInteropFiles MSBuild target twice is not ideal; however, I do not see any other reasonable way of making sure that the SQLite interop files are copied whether or not a PostBuildEvent is present. | ||||