我想在我的 SSIS 项目中有一个 PostBuildEvent。这是我的原始 .DTProj 文件,来自一个带有一个测试包的测试项目。
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ProductVersion>10.0.2531.0</ProductVersion>
<SchemaVersion>9.0.1.0</SchemaVersion>
<State>$base64$PFNvdXnRyb2xJbmZvPg==</State>
<Database>
<Name>PreBeforeDeployTest.database</Name>
<FullPath>PreBeforeDeployTest.database</FullPath>
</Database>
<Cubes />
<Dimensions />
<DataSources />
<DataSourceViews />
<MiningModels />
<Roles />
<Miscellaneous />
<Configurations>
<Configuration>
<Name>Development</Name>
<Options>
<OutputPath>bin</OutputPath>
<ConnectionMappings />
<ConnectionProviderMappings />
<ConnectionSecurityMappings />
<DatabaseStorageLocations />
</Options>
</Configuration>
</Configurations>
<DTSPackages>
<DtsPackage FormatVersion="3">
<Name>TestPackage.dtsx</Name>
<FullPath>TestPackage.dtsx</FullPath>
<References />
</DtsPackage>
</DTSPackages>
</Project>
我试过插入 <PostBuildEvent> ,它看起来像这样
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PropertyGroup>
<PostBuildEvent>copy "$(TargetDir)TestPackage.dtsx" "C:\"</PostBuildEvent>
</PropertyGroup>
<ProductVersion>10.0.2531.0</ProductVersion>
<SchemaVersion>9.0.1.0</SchemaVersion>
<State>$base64$PFNvdXnRyb2xJbmZvPg==</State>
<Database>
<Name>PreBeforeDeployTest.database</Name>
<FullPath>PreBeforeDeployTest.database</FullPath>
</Database>
<Cubes />
<Dimensions />
<DataSources />
<DataSourceViews />
<MiningModels />
<Roles />
<Miscellaneous />
<Configurations>
<Configuration>
<Name>Development</Name>
<Options>
<OutputPath>bin</OutputPath>
<ConnectionMappings />
<ConnectionProviderMappings />
<ConnectionSecurityMappings />
<DatabaseStorageLocations />
</Options>
</Configuration>
</Configurations>
<DTSPackages>
<DtsPackage FormatVersion="3">
<Name>TestPackage.dtsx</Name>
<FullPath>TestPackage.dtsx</FullPath>
<References />
</DtsPackage>
</DTSPackages>
</Project>
PostBuildEvent 根本不会触发。我在这里做错了什么?