Setup Wizard tries to install to wrong framework version - c#

I've created simple one line Console application for the 3.5 framework and was attempting to try out the "Visual Studio Installer" setup wizard project to install on a server. Both Console and "Setup Wizard"are for the .net 3.5 framework however when I try the setup.exe on the target server I get a message regarding 4.5 framework pre-requisites.
Visual Studio 2013
C# Console application
.net 3.5
Windows Server 2003 R2
Any ideas where this reference to 4.5 is likely to be coming from?
Thanks

As in the MSDN Forum answer:
https://social.msdn.microsoft.com/Forums/windows/en-US/54e20ea4-ddfa-4315-9a04-57daa74b6952/setup-wizard-tries-to-install-to-wrong-framework-version?forum=winformssetup
"If this the installer project extension that generated an MSI setup and a setup.exe, then in the setup project go to View => Editor=>Launch conditions, right-click the NET launch condition, Properties window, and choose the relevant one from the drop down in Version. "

Related

Visual Studio 2017 - How to get the "New publisher Wizard"

I have a problem with publishing an app in VS 2017 with the Publishing Wizard. I found a stackoverflow post:
Compile a .NET Core application as an EXE file using Visual Studio 2017
But when I want to go to this menu it only opens an old Publishing Wizard that doesnt have the options I need.
I tried to update my VS 2017 to the newest Version, but it didnt help...
After that I tried to use the first approach of the stackoverflow post above, but I didnt have dotnet(???) so installed .NET 7 SDK. Tried the command in the project directory (where the .csproject lays), but I got the error: MSB4062. So Im back trying to get the new publisher, because I really dont know how to fix MSB4062.
Picture of my Publishing wizard:
Picture of the one I want:
[]
The Publish Wizard is usually the first time you publish a project and will guide you to publish the project to the specified location.
After completing the Publish Wizard, you will find Publish Settings in the Publish view and configure it. Hope it can help you
I needed a .NET Core / .NET console app, but I had a .NET FRAMEWORK console app.
And to create a .NET Core / .NET console app I needed Visual Studio 2022 (maybe 2019 is enough), but I had Visual Studio 2017.
This fixed everything for me.

Error trying to debug winforms application in visual studio 2008

I have a solution working at VS 2008. It contains lots of projects. I installed VS 2010 and it converted all projects to work in .NET Framework 4. After I've found that there is no profit to use VS 2010, I decided to move back to 2008. After that debugging is totally broken.
When I select project and select "Debug -> Start New Instance" It says me:
Error while trying to run project: Unable to start debugging.
The remote computer does not have a CLR version which is compatible with the remote debugging components. To install a compatible CLR version, see instructions in the 'Remote Component Setup' page on Visual Studio CD.
I tried to remove both VSs and install 2008, removed .NET Frameworks and installed 3.5.
I don't understand why it wants remote debugger while I'm trying just to run winforms application on local machine. The same happens for Console applications.
Appreciate any help.
Is your issue with Visual Studio or with the 4.0 Framework?
If it is with just the framework. I would change your projects Target Framework back to your former framework and continue to use VS2010.
If it is with VS2010, I would do the same thing as above before trying to run it in VS2008 again. You will probably have to edit the project files to the proper VS Version.
See this CodeProject Article for an example what needs to be done.
or better yet if you have source control just restore your Solution from there.

Why prerequisites doesn't show framework 2.0? [duplicate]

When setting up a Setup Project in Visual Studio 2010 and even to I removing all the prerequistes .NET 4.0 is still required on the computer that runs the Installation. Deploying with ClickOnce works but is not an option, but at least it doesn't ask for .NET 4.0.
Is there a way to create a Setup Project in Visual Studio 2010 that doesn't require .NET 4.0 on installation?
Edit
This is one of the test configurations i've tested
And this is what it looks like when I run setup.exe or the .msi
Right click on the setup project in the solution explorer -> View -> Launch Conditions and set the appropriate .NET framework version:

Creating Installer Package Visual Studio 2010

I have a C# application that requires .net version 4 in order to run. I know how to create a basic installer using the Visual Stuido Installer Setup Project that comes with Visual Studio and that installs my application fine, however, I can't get it to check if .net version 4 is already installed in the client machine and if not install it. Does anyone have any suggestions? Should I use a different approach besides this method? Purchasing a license for InstallShield is not an option as that is too expensive. Thanks
You should follow this guide on MSDN. It should tell you what you need to know about creating an installer to check for .NET 4.
The long and short of it is, if you set it as a prerequisite, the installer will check that it is installed.

setup installer vs 2010 64 bit changed platform

I created a setup installer in vs 2010 and it is in .net Platform 3.0. Because my app is 64 bit , I also made the setup installer x64 (solution explorer-> target platform). it compiled and build fine.
when I am ready to use it, I copied this installer file to another box and run it. It complains that I need .net platform 4.0. How is it possible? How to changed it back to 3.0? How to fix this?
Sometimes Visual Studio setup automatically adds a .NET Framework launch condition to the package. So you can try this:
select your setup project in Solution Explorer
click "Launch Conditions Editor" button in Solution Explorer top pane
modify or remove the .NET Framework launch condition

Categories

Resources