acezrwild817 0 Light Poster

I receive the following 2 error messages when I attempt to Build my application, and I cannot resolve them.

C:\Documents and Settings\Robert W. Lipscomb\My Documents\Visual Studio Projects\caller\trunk\Installer\Installer.vdproj Unable to find source file 'C:\Documents and Settings\Robert W. Lipscomb\My Documents\Visual Studio Projects\caller\trunk\bin\install\data.enc' for file 'data.enc', located in '[TARGETDIR]', the file may be absent or locked.


C:\Documents and Settings\Robert W. Lipscomb\My Documents\Visual Studio Projects\caller\trunk\Installer\Installer.vdproj Unable to find source file 'C:\Documents and Settings\Robert W. Lipscomb\My Documents\Visual Studio Projects\caller\trunk\bin\install\caller.exe' for assembly 'caller.exe', located in '[TARGETDIR]'


Pre-Build Event failed

Dani AI

Generated

— the symptoms you posted point to two separate but related problems: the setup project is referencing build artifacts that are not present where it expects them, and a build event is failing before those artifacts can be created. The checklist below walks through the most reliable, low-risk ways to find and fix the root cause.

  • Build and inspect the app output first. Clean the solution, build the main application project alone, then open the application output folder (Debug/Release) to confirm the EXE and any helper files exist. If they do not, the failing build event is the immediate blocker.
  • Diagnose the failing build event. Open Project Properties -> Build Events and copy the command shown there. Run the exact command in a command prompt to see the raw error. Pay attention to quoting (paths with spaces), missing tools, or missing input files. Increase VS build verbosity (Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity = Detailed) to get fuller error text.
  • Make the installer depend on the project output rather than hard-coded files. In the setup project use Add -> Project Output -> Primary output of the application project. Then set Project Dependencies so the installer builds after the app project, and verify Configuration Manager maps the same configuration (Debug/Release) for both projects.
  • Remove stale references in the setup project. Open the installer File System view and delete any red/missing entries, then re-add outputs. If files must be generated (for example, encrypted data), either generate them as part of the build or include them in source control — do not leave the installer pointing at a path that only exists on one developer machine.
  • Other quick checks: close any running instance of the app (file-locks), temporarily disable antivirus if it blocks file creation, and delete bin/obj and rebuild.

If the installer continues to misbehave after these steps, capture the full Detailed build output and the exact failing command — that will pinpoint whether the problem is a missing input, a permissions/lock issue, or a broken tool invocation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.