Forum Discussion
Pre Build Action in Windows Application Project
scoban Thanks - Yes that was going to be the next question.
Even if the files are manually copied, the packager does not pick up files in the output folder to package.
So what is that additional step to do so ?
Thanks
abhisinghal What is the scenario you are trying to enable that does not work with normal project references?
If you really need this behavior I would suggest using an itemgroup for the files that you want, This is not really recommended as the projects that you reference should be including all the files needed for packaging and they also include additional metadata that we use for other reasons. In other words this could have unintended side effects depending on what you are doing.
<ItemGroup>
<None Include="SomeDir\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
- abhisinghalApr 17, 2020Copper Contributor
scoban Thanks - will try this.
The scenario I am trying to enable is this.
Project has a reference to LibraryA.dll , which is AnyCPU.
This LibraryA uses some platform specific dlls which are dynamically loaded using assembly resolver.
On the pre-build action, we copy files for both platforms to the output folder under sub folders x64 and x86, and then load depending on the platform on which app is running.
Do I need to do anything else to package above ?
Thanks
- abhisinghalApr 22, 2020Copper Contributor
scoban Getting this error
Severity Code Description Project File Line Suppression State
Error PRI175: 0x8007000b - Processing Resources failed with error: An attempt was made to load a program with an incorrect format. AppSystem.Wap GENERATEPROJECTPRIFILE 1Package format selected is neutral.
- scobanApr 22, 2020Microsoft
abhisinghal Thats not enough to go off of, do you have a sample project I can look at? Try building for x86/x64 instead?