Problem: The.exe generated directory may not match the resource directory, so you can’t manually copy the generated.exe and DLL to the resource directory every time you compile the project
Solution: Use the build post batch command that comes with Visual Studio
visual studio-> Right-click project ->; properties-> Build Events-> Post-Build Event-> Under the Command Line
Xcopy $(OutDir) $(TargetFileName) $(ProjectDir.). \Resources
\/Y
This imperative function copies the exe files in the build directory to the Resources folder one level above the project directory
Note:
$outDir = $outDir = $outDir = $outDir
2. Generate post-event xcopy is simply running a console command, so
Command does not support ‘/’
Like an error command written earlier
Xcopy $(OutDir) $(TargetFileName) $(ProjectDir.).
/ Resources \/Y
Runtime will prompt an error
3. “/Y” is a parameter, indicating that there is the same file to replace
You can also copy the entire folder
Xcopy “$(ProjectDir) controls,” “$(TargetDir).. \ app1 \ controls “/ y/I/e/exclude: CodeFilesToExclude. TXT
For specific parameters, refer to the CMD console to see the specific function of xcopy…
Read More:
- error PRJ0019: A tool returned an error code from “Performing Post-Build Event…”
- Composer update encountered “Script php artisan optimize handling the post-update-cmd event returne when upgrading laravel
- Solve the problem of VC 6.0 fatal error C1033: cannot open program database’.\debug\vc60.pdb’
- [Solved] VUE3.0 Warning: Added non-passive event listener to a scroll-blocking ‘mousewheel‘ event如何解决
- In the HTML page request Ajax times 400 error, solve Yii submit post form 400 error, and Ajax post request 400 problem (example code)
- Resolve the problem of “event ID 4107” or “event ID 11” errors recorded in the application logs of windows and windows server
- Solving ora-21561: oid generation failed
- Token bucket implementation with adaptive token generation rate
- Vc2010 configuring OpenGL environment
- NPM run build failed to package err! Missing script: build
- Solve the problem of VC6.0 open crash and OpenGL glut32.lib library
- IntelliSense in VC + + 2010: unable to open source file “StdAfx. H”
- Action RPG demo source code (VC + OpenGL)
- error C2471: cannot update program database vc90.pdb
- VC + + compiler can not find the header file and rebuild failure
- failed to find Build Tools revision 23.0.2 Install Build Tools 23.0.2 and sync project
- An error occurred during the installation of assembly ‘Microsoft.VC80.CRT,version=”8.0.50727.42″,typ
- Error c2064: term does not evaluate to a function in VC
- Prevent flashback after running code in VC 6.0
- VC Critical error detected c0000374 crash problem and solution