-2

i've finished my WPF app that targets PCs that do NOT have access to the internet, i was trying to publish the app so i made these steps : right click on Project -> Publish -> enterd the path -> from a CD-Rom or DVD-Rom -> the application won't check for updates

and i got my installer file and it works fine on my own machine (running Windows 10). However, i tried to install the app on another machine that is running Windows 8.1 and got an error indicating that the app is targetting .NET 4.6 which is not installed, i revert back to Visual Studio and to Project properties and changed the target to .NET 4.5 (4.6.1 was selected by default), built, ran and published the app again but i still get the same error, then downloaded the .NET 4.6 and 4.6.1 offline installers and installed them and still get that ".NET 4.6 required" message .... what is the problem ?

by the way, i copied the debug folder of my project to that computer and the app ran just fine but is this a safe way to distribute an app?

(the image shows the ".NET 4.6 required" message, Please note that i can't fall down below .NET 4.5 since i am using async/await)

thanks for your time

enter image description here

  • 1
    That looks like a pre-req screen from a installer. What installer are you using, click-once or something else? – Scott Chamberlain Jul 23 '16 at 23:52
  • Lke Scott has asked, your real project and its setup have separate settings. You downgraded the real project but haven't yet update the setup settings. Depending on which setup technology you use, the steps are completely different. – Lex Li Jul 24 '16 at 04:49
  • now it is working, yes it is click-once installer and it was the pre-req for the insaller not the app itself, thanks i really apreciate it – MohamedMokhtar Jul 24 '16 at 08:24

1 Answers1

0

In addition to the target framework on the Project Properties Application tab, you need to go to the Publish tab and click on "Prerequisites..." button. You should see a dialog which will allow you to change the .Net version.

pharring
  • 1,991
  • 1
  • 14
  • 10