23

while doing the build of my dontnet 4.0 project setup i'm getting following errors

An error occurred generating a bootstrapper: Unable to finish updating resource for E:\project\Setup\Debug\setup.exe with error 8007006E    E:project\Setup\Setup.vdproj    Setup

General failure building bootstrapper   E:\project\Setup\Setup.vdproj   Setup

Unrecoverable build error   E:\project\\Setup\Setup.vdproj Setup

I am using dotnet framework 4 and MSVS 2010.

KMoraz
  • 14,004
  • 3
  • 49
  • 82
dnyan waychal
  • 433
  • 1
  • 4
  • 10

10 Answers10

47

This happens because The .NET framework version required by the setup project is different than the .NET framework version targeted by the application.

To change verify this:

  1. In Solution Explorer, click the Setup project.
  2. On the View menu, point to Editor, and then click Launch Conditions.
  3. Click .NET Framework.
  4. In the Properties window, change the Version property to the version of the .NET Framework that you want the Setup project to check for and install.

And also you need to Make sure that the Setup.exe program also checks for and installs the correct version of the .NET Framework.

Right click on the setup project -> Properties -> Prerequisites -> Select the correct ones.

moribvndvs
  • 42,191
  • 11
  • 135
  • 149
Safras
  • 486
  • 6
  • 4
  • 1
    Thanks for the response i tried with this but still getting same error. – dnyan waychal Jun 21 '12 at 12:00
  • I get this error intermittently, if I hit 'F6' enough times it will compile. This seems to happen when a solution grows to a moderate size (about 15 projects in it) –  Aug 29 '12 at 19:05
  • 3
    I found I had to delete the contents of my `\bin\debug` folder as it contained a problematic `app.publish` folder from one of the previous failed builds. After that, and updating the prerequisites, the publish succeeded. – Evan Wondrasek Oct 15 '13 at 19:58
  • Cleaning the solution worked for me, thanks a lot @EvanWondrasek – reggaeguitar Jun 26 '15 at 16:49
  • For me, I changed it down a version, then back up a version, hit save all, and then right clicked the setup project and clicked "rebuild". Then it started working. – user2924019 Jun 10 '22 at 14:21
15

When I turn McAfee real-time scan off, it works. I spent 2 hours on figuring this out :(

tony yuan
  • 31
  • 1
  • 2
5

I googled a lot on this issue after trying all i just disabled my antivirus(NPAV) and this issue was solved.

2intor
  • 1,044
  • 1
  • 8
  • 19
3

turning off mcafee real time scanning worked for me as well on Windows 8.1

Ashwin
  • 73
  • 6
2

Here is yet another solution, this one is unlike the rest...

We recently added NTFS replication to our build tree root to provide some additional data redundancy and to begin to sync our old build machine with the new server. The NTFS replication caused some projects to fail with the exact same three error reported, and yet other projects work just fine. Set the replication on only run at night and the problem stopped occurring...

K

Keith Vinson
  • 771
  • 5
  • 10
1

I got the same error when I changed targeted framework to 4.0 but neglected to change prerequisits for click once from 3.5 to 4.0 as well. Fixing prerequisits resolved the problem.

gev
  • 49
  • 2
1

Instead of disabling the Anti-Virus, I would suggest to just create an exclusion for your Solution Folder. See documentation if you are using Windows Defender. Microsoft Support

user961954
  • 3,214
  • 2
  • 17
  • 24
1

I've just had this same error and then realised Dropbox was running. I closed Dropbox and then the build completed successfully.

brightfunction
  • 159
  • 1
  • 6
0

Thank you qwerty13579! How stupid of me, the solution is obvious. I have tried all sorts of things suggested over the internet, and even with the most recent version of VS Community 2017 (15.9.9), the bootstrapper failure pops up erratically, but with increasing frequency, to the point of frustration this past week. The principle: It doesn't succeed reliably, so it also doesn't FAIL reliably. The solution: Click the Publish Now button and watch the output panel. When it's that clear that it's failing, click the Publish Now button again immediately. Keep at it until it succeeds! Each round only takes a couple of seconds, much less time that it takes to re-build, take down anti-virus, and all that fancy stuff.

In my case, I traced the problem to an incorrectly dated setup.exe file in the bin\Release\app.publish folder of my application. When it fails, Publish Now creates an setup.exe that's two years earlier than the current day. When it succeeds, the setup.exe file is correctly dated.

Manas
  • 21
  • 3
-1

Got the same problem. I disabled Windows Defender real-time protection and it worked. I also added the folder where the solution is saved in exclusions for Defender, and that allowed me to publish as well.

EricST
  • 1
  • 2
  • 1
    This is the same solution as in [this other answer](https://stackoverflow.com/a/50244415/2227743). – Eric Aya Aug 12 '22 at 11:25