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:
- Differences between the assets directory in Android project and the purpose of resource
- Using Visual Studio 2015 to create. DLL and use. DLL
- OpenGL environment configuration under VS2010 / vs2012 / vs2015
- How to Fix Spring Boot OTS parsing error: Failed to convert WOFF 2.0
- After Java application is deployed in Linux environment, Chinese is displayed as square solution
- The icon on the layui page is not displayed, and an error message is reported: Failed to decode downloaded font …..
- [pit filling] problem summary of upgrading VS2010 project to vs2017
- Start gzip in node environment of project optimization
- Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build Exception caught: basedir src/mai
- OpenGL class library and environment configuration under win10 and vs2015
- How to solve the problem that the console window disappears in a flash after visual studio 2017 runs
- OpenGL Programming Guide 8th Edition 9th Edition vs2015 vs2017 configuration method
- Vs compiling OpenGL project, the solution of unable to open the source file “GL / glaux. H” appears
- Spring MVC – enable static resource access
- How to Fix Invalid bound statement (not found) Error
- Vs2013 + glfw + glew configure OpenGL development environment
- [VTK] vtk8.2.0 + vs2015 + win10 compilation and configuration
- After unity connects with androidstudio, unity packages APK with an error: commandinvocationfailure: failed to re package resources
- Configuration, compilation and installation of vtk8.1 in qt5.9
- Eo ferror: compressed file ended before the end of stream marker was reached