error while trying to publish c# windows forms with .net framework 4.5 prerequisite

616 views Asked by At

in the prerequisites part of my publish i have checked "Create setup program to install prerequisite components" and "Microsoft .NET Framework 4.5 (x86 and x64)" and selected "Download prerequisites from the same location as my application".

when i try to publish the following build errors are given:

  1. Cannot publish because a project failed to build.
  2. To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'DotNetFX45\dotNetFx45_Full_x86_x64.exe' for item 'Microsoft .NET Framework 4.5 (x86 and x64)' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.

so i followed all instructions on the help link except that the C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages folder in my computer does not contain \DotNetFX45 folder but instead it is located in C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages; so i assumed its related to my windows version and followed the instruction on the latter folder(which exists).

the same exact error is given again.

so my question is how can i get rid of this error and publish my c# windows forms app with .net framework 4.5? any ideas on how to diagnose my problem is appreciated.

1

There are 1 answers

0
raven On BEST ANSWER

this error happened because of my own mistake. for future people that get this same problem, i had mistakenly put .net framework 4 full installer in \DotNetFX45 folder(probably because there is no official full installer on microsoft.com for .net framework 4.5). so i only had to follow the instructions on the link in the correct folder.