This question already has answers here:
What does "exited with code 9009" mean during this build?
(36 answers)
Closed 3 years ago.
I setup project from git. but when i build solution I got an error "the command xcopy... exited with code 9009. I did not find any solution.
below are the commands by default in Post build event command line:-
xcopy "$(ProjectDir)bin\$(TargetFileName)" "$(SolutionDir)..\Educate\bin\" /s /i /y
xcopy "$(ProjectDir)bin\$(TargetFileName)" "$(SolutionDir)..\PlayList\bin\" /s /i /y
xcopy "$(ProjectDir)bin\$(TargetFileName)" "$(SolutionDir)..\EducateFHCRC\FredHutch\FredHutch\bin\" /s /i /y
xcopy "$(ProjectDir)bin\$(TargetFileName)" "$(SolutionDir)..\EducateFHCRC\FredHutch\FredHutch.Domain\bin\" /s /i /y
This is the full error:-
Error The command "xcopy "D:\Projects\Educate\EmpowerLearn\EducateAssessment\bin\EducateAssessment.dll" "D:\Projects\Educate\EmpowerLearn\EducateAssessment\..\Educate\bin\" /s /i /y
xcopy "D:\Projects\Educate\EmpowerLearn\EducateAssessment\bin\EducateAssessment.dll" "D:\Projects\Educate\EmpowerLearn\EducateAssessment..\PlayList\bin\" /s /i /y
xcopy "D:\Projects\Educate\EmpowerLearn\EducateAssessment\bin\EducateAssessment.dll" "D:\Projects\Educate\EmpowerLearn\EducateAssessment..\EducateFHCRC\FredHutch\FredHutch\bin\" /s /i /y
xcopy "D:\Projects\Educate\EmpowerLearn\EducateAssessment\bin\EducateAssessment.dll" "D:\Projects\Educate\EmpowerLearn\EducateAssessment..\EducateFHCRC\FredHutch\FredHutch.Domain\bin\" /s /i /y" exited with code 9009. EducateAssessment
You should try restarting Visual Stutio. Worked for me.
Maybe your path is incorrect, it should be something like this :
C:\Program Files (x86)\Bad Vendor\Buggy Program;
Or is just that a DLL file is missing. To see, run the same command line in CMD and see the output. DLL's are easy to download, from here : https://www.dll-files.com/
More info on this thread : Why does xcopy exit with code 9009 in Visual Studio post-build step?
The 'xcopy' executable can't be found. Check your PATH variable for 'C:\Windows\System32\' - if this not exists, add this at the front of PATH.
Related
I've downloaded sfml from NuGet to develop with it in C#. I'm using the 2019 community version for C# and version 2.5 for sfml. With the code:
using SFML.Graphics;
using SFML.Window;
namespace sfml_test
{
class Program
{
static void Main()
{
RenderWindow window = new RenderWindow(new VideoMode(200, 200), "test");
CircleShape cs = new CircleShape(100.0f);
cs.FillColor = Color.Green;
window.SetActive();
while (window.IsOpen)
{
window.Clear();
window.DispatchEvents();
window.Draw(cs);
window.Display();
}
}
}
}
I get the following error:
System.DllNotFoundException: 'Can't load DLL csfml-graphics: Can't find given module. (Exception of HRESULT: 0x8007007E)'
I know that there already are some answers to similar questions, but these questions have been answered in 2010, with programs that don't seem to support Windows 10 (like Dependency Walker, I also did not understand the explanations.
Any help will be greatly appreciated and thank you in advance!
P.S. I'm trying to make a 2D ray tracer in C# and need a window to display it on. Most of the windows I can find are used for UI (Windows.Forms, GTK#) or are meant to work for 3D (OpenTK). Any suggestions are welcomed.
The CSFML NuGet package seems to be the issue.
When you added SFML.Net as a referenced package, the CSFML one is also downloaded but not actually referenced to the project. During compilation, no dll gets copied to the OutputDir.
A "solution" to this, is to copy the libraries from the package to your output directory. You can copy the following 5 lines into the post-build event of your project to do that, but don't forget to select Execute post-buid event : Always
xcopy /C /E /R /I /K /Y "$(SolutionDir)packages\CSFML.2.5.0\runtimes\win-$(Platform)\native\csfml-Audio.dll" "$(TargetDir)csfml-Audio.dll*"
xcopy /C /E /R /I /K /Y "$(SolutionDir)packages\CSFML.2.5.0\runtimes\win-$(Platform)\native\csfml-Graphics.dll" "$(TargetDir)csfml-Graphics.dll*"
xcopy /C /E /R /I /K /Y "$(SolutionDir)packages\CSFML.2.5.0\runtimes\win-$(Platform)\native\csfml-System.dll" "$(TargetDir)csfml-System.dll*"
xcopy /C /E /R /I /K /Y "$(SolutionDir)packages\CSFML.2.5.0\runtimes\win-$(Platform)\native\csfml-Window.dll" "$(TargetDir)csfml-Window.dll*"
xcopy /C /E /R /I /K /Y "$(SolutionDir)packages\CSFML.2.5.0\runtimes\win-$(Platform)\native\openal32.dll" "$(TargetDir)openal32.dll*"
This is going to be very specific to InstallShield, so I doubt anyone has dealt with this before, but I wrote a batch file to uninstall prior versions of our product and it doesn't work. (We always uninstall prior versions prior to an install/upgrade since the Upgrades in InstallShield don't seem to work). Uninstalling Installscript MSI projects is very different from typical uninstalls in that you need to "record" an uninstall and store the results in a file i.e.:
setup.exe /x /r /f1"C:\temp\UNINST.ISS"
This stores the uninstall image in c:\temp\UNINST.ISS and then you need to pass that to the uninstaller to get the product to uninstall:
setup.exe /s /f1"UNINST.ISS"
So I did this for all prior versions of our product and then wrote a batch script (with the product code being {7F2A0A82-BB08-4062-85F8-F21BFC3F3708} to do the uninstalls that looks like this:
echo Uninstalling 5.3.0
pause
if exist "C:\Program Files (x86)\InstallShield Installation Information\ {7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup.exe" (
del /q "C:\Program Files (x86)\InstallShield Installation Information\{7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup-5.3.0.exe"
copy /y "C:\Program Files (x86)\InstallShield Installation Information\{7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup.exe" "C:\Program Files (x86)\InstallShield Installation Information\{7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup-5.3.0.exe"
cls
echo Uninstalling 5.3.0
"C:\Program Files (x86)\InstallShield Installation Information\{7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup-5.3.0.exe" /s /f1".\Uninstall response files\5.3.0\UNINST-5.3.0.ISS"
:wait1
timeout /t 3 /NOBREAK > nul
tasklist | find /i "Setup-5.3.0.exe" >nul 2>nul
if not errorlevel 1 goto wait1
)
echo Uninstalling 5.3.1...
The problem is that it doesn't work. If I execute the uninstall from an elevated CMD window it works fine:
"C:\Program Files (x86)\InstallShield Installation Information\{7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup-5.3.0.exe" /s /f1".\Uninstall response files\5.3.0\UNINST-5.3.0.ISS"
But when I execute the batch script it just seems to pass right by the uninstall and not do anything. SO I thought I'd try to write a simple C# program to do this but that's not working either:
Console.Clear();
Console.WriteLine("Uninstalling 5.3.0");
if (File.Exists(#"C:\Program Files (x86)\InstallShield Installation Information\{7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup.exe"))
{
File.Copy(#"C:\Program Files (x86)\InstallShield Installation Information\{7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup.exe", #"C:\Program Files (x86)\InstallShield Installation Information\{7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup-5.3.0.exe", true);
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = #"C:\Program Files (x86)\InstallShield Installation Information\{7F2A0A82-BB08-4062-85F8-F21BFC3F3708}\setup-5.3.0.exe";
Directory.SetCurrentDirectory(#"..\..\..\");
startInfo.Arguments = "/s / f1\".\\Uninstall response files\\5.3.0\\UNINST-5.3.0.ISS\"";
startInfo.UseShellExecute = false;
startInfo.WindowStyle = ProcessWindowStyle.Normal;
using (Process process = new Process())
{
process.StartInfo = startInfo;
process.Start();
process.WaitForExit();
}
}
I've tried debugging this and confirmed that the current directory is correct (using Directory.GetCurrentDirectory()), but I get this error:
process.StandardError' threw an exception of type 'System.InvalidOperationException' System.IO.StreamReader {System.InvalidOperationException}
There are some further instructions towards the bottom of this PDF: https://resources.flexera.com/web/pdf/archive/silent_installs.pdf
setup.exe /s /f1"C:\sample\uninstall.iss" /f2"C:\sample\uninstall.log"
Did you try it manually with full paths for both the /f1 and /f2 parameters?
I am actively trying to forget how to write batch files, but I think you can get the folder where the batch file is running from like this:
set here=%~dp0
cd %here%
Could changing the setup.exe file name cause problems? Maybe you can try without changing the name of the setup.exe and see if that completes?
Could passing the command to cmd.exe via the /c parameter be an idea? ("carries out the command specified by the string and then terminates"):
cmd.exe /c "%here%\setup.exe /s /f1"C:\sample\uninstall.iss" /f2"C:\sample\uninstall.log""
Maybe try adding the /SMS switch to ensure that the setup.exe does not exit prematurely before the actual uninstall is complete. As rumor has it this /SMS switch is not needed for late-generation Installshield setup.exe, but it is needed for older versions.
As Gravity pointed out the problem was a space between the / and the f1. It got added somehow during the cut & paste.
How can I cancel this option (I need only English).
Is it some installation that should be removed? configuration?
folders created are: de, en, es, fr, it, ja, ko, zh-Hans zh-Hant
Working with Visual Studio 2015
references:
System.Windows.Interactivity
Microsoft.Expression.Interactions
I added this in my "post build event command line" which is a bit shorter than the example by Dr. C. Hilarius.
rd /s /q "de" "en" "es" "fr" "hu" "it" "ja" "ko" "pr-br" "ro" "pt-br" "ru" "sv" "zh-hans" "zh-hant"
None of the suggestions worked for me.
Instead, I added post build events to remove the offending directories:
RMDIR "$(TargetDir)de/" /S /Q
RMDIR "$(TargetDir)es/" /S /Q
RMDIR "$(TargetDir)fr/" /S /Q
RMDIR "$(TargetDir)it/" /S /Q
RMDIR "$(TargetDir)ja/" /S /Q
RMDIR "$(TargetDir)ko/" /S /Q
RMDIR "$(TargetDir)ru/" /S /Q
RMDIR "$(TargetDir)zh-Hans/" /S /Q
RMDIR "$(TargetDir)zh-Hant/" /S /Q
Turning my comment as an answer:
The issue may come from C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries which contains localizable objects for build. If you delete it (keep a backup to be sure) it should solve your issue.
In The case of linking in ZedGraph into your project, simply go to the path where ZedGraph is installed (being referenced from). Delete all the unwanted folders from this location, then go back and rebuild your project. Don't forget to delete all the unwanted folders in your projects output folder so you can verify the rebuild indeed does not recreate the unwanted folders.
I have used itextsharp library to generate pdf in my asp.net web application. It was working fine untill today when suddenly my laptop on which the application was running in the debug mode went off. When I switched on my laptop again and tried to run the application I satrted getting this error:
"Could not load file or assembly 'itextsharp, Version=5.5.0.0,
Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its
dependencies. The parameter is incorrect. (Exception from HRESULT:
0x80070057 (E_INVALIDARG))"
What could be the reason and how can I solve this? Please help.
Try removing the reference and add again...!!! Seems like the reference got removed due to improper shutdown.
Try to clean Temporary Files of Asp.Net, sometime I've experimented strage cases of files corruption(I know this should be a comment but It's verbose):
1 - Open notepad and paste the following.
#ECHO OFF
ECHO Performing IIS Reset
IISRESET
ECHO Deleting Cache
Del /F /Q /S %LOCALAPPDATA%\Microsoft\WebsiteCache\*.*
Del /F /Q /S %LOCALAPPDATA%\Temp\VWDWebCache\*.*
Del /F /Q /S “%LOCALAPPDATA%\Microsoft\Team Foundation\3.0\Cache\*.*“
Del /F /Q /S “C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\*.*“
Del /F /Q /S “C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\*.*“
Del /F /Q /S “C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\*.*“
Del /F /Q /S “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\*.*“
ECHO Complete
2 - Save the file as a .bat file.
3 - run it from the command prompt.
I had a backup of my project. Restored the backup and it worked. Thanks for all the suggestions.
Anyone using https://github.com/khrona/AwesomiumSharp? I am trying to build the AwesomiumSharp but get the following errors:
Error 2 The command "XCOPY ..........\build\bin\release\icudt42.dll "C:\Users\demo\Desktop\July2012\khrona-AwesomiumSharp-423f277\AwesomiumSharp\bin\x86\Debug\" /i /y
XCOPY ..........\build\bin\release\avcodec-52.dll "C:\Users\demo\Desktop\July2012\khrona-AwesomiumSharp-423f277\AwesomiumSharp\bin\x86\Debug\" /i /y
XCOPY ..........\build\bin\release\avformat-52.dll "C:\Users\demo\Desktop\July2012\khrona-AwesomiumSharp-423f277\AwesomiumSharp\bin\x86\Debug\" /i /y
XCOPY ..........\build\bin\release\avutil-50.dll "C:\Users\demo\Desktop\July2012\khrona-AwesomiumSharp-423f277\AwesomiumSharp\bin\x86\Debug\" /i /y
XCOPY ..........\build\bin\release\Awesomium.dll "C:\Users\demo\Desktop\July2012\khrona-AwesomiumSharp-423f277\AwesomiumSharp\bin\x86\Debug\" /i /y
XCOPY ..........\build\bin\release\AwesomiumProcess.exe "C:\Users\demo\Desktop\July2012\khrona-AwesomiumSharp-423f277\AwesomiumSharp\bin\x86\Debug\" /i /y
XCOPY ..........\build\bin\Release\locales\en-US.dll "C:\Users\demo\Desktop\July2012\khrona-AwesomiumSharp-423f277\AwesomiumSharp\bin\x86\Debug\locales\" /i /y
XCOPY ..........\build\bin\debug\Awesomium_d.dll "C:\Users\demo\Desktop\July2012\khrona-AwesomiumSharp-423f277\AwesomiumSharp\bin\x86\Debug\" /i /y
XCOPY ..........\build\bin\debug\AwesomiumProcess_d.exe "C:\Users\demo\Desktop\July2012\khrona-AwesomiumSharp-423f277\AwesomiumSharp\bin\x86\Debug\" /i /y
" exited with code 4. AwesomiumSharp
Any ideas?
The XCOPY commands are in the startup projects properties on the build events tab, you need to amend to your disk or remove them (depending on what they are doing, I am unsure.)
Same for the Mono project I am guessing.....
-------------------- EDIT ----------------------
I managed to get it compiling the code, I followed the readme and installed the SDK on my D:\
I then copied the source in the same folder as the readme into the following folder:
D:\Awesomium\1.6.6\wrappers\Awesomium.NET\AwesomiumSharp
I then went into the properties and added in front of the xcopy source path an extra ..\ so that it went down to the correct folder and now it compiles.
It should be then copied from here:
Good luck!