SSIS Script Keeps Reverting To .Net Framework 4.5 - c#

I've got the following issue: I've got an SSIS package, in which I would need to use some features of the .Net Framework 4.6.
Whenever I set the Framework version in the project proprties, it doesn't complain, I can build the project without errors. However, as soon as I save the file and close the script, it reverts to .Net 4.5.
I've checked these two links, but the solution did not work for me:
SSIS Script Component - Changing target .net version keeps reverting
Cannot change Target Framework on Several Projects From v4.0 to V4.5 or 4.5.1
I've even installed the Target Framework Migration tool, which executes without errors, confirms that the framework was changed, but after closing and reopening the project it's back to v4.5 again.
Can anybody please help?
Thanks in advance.

Approved answer will work for SQL Server 2016 and older versions.
Starting with SQL Server 2017 framework version is based on SSIS project target server version:
SQL Server 2017 enforces .Net framework 4.5
SQL Server 2019 enforces .Net framework 4.7

Saving changes in script tasks/components is a three step process: Build/Save/Ok.
1.) In VSTA, change the .NET framework and then Build the solution.
2.) Save the solution and close VSTA.
3.) When you are back to the Script Transformation Editor, click OK. If you click cancel, all of your changes will be eliminated and you will have to redo everything.

Related

How to change .NET Framework in Rider IDE?

In Rider IDE, I am trying to create a new solution:
But I'm unable to change the .NET Framework as the dropdown is disabled. How can I change the version? I have installed .NET Framework 3.5, 4.5, 4.6.
This is one of the way to change the build framework in Rider. It allows you to switch the MSBuild version explicitly by selecting MSBuild.dll.
When you have multiple .NET framework, you can change it here.
This example is for .NET core project.
In my system I installed latest .NET core RC after which Rider started complaining in older projects (when there were working fine prior to installation)
I had following versions
I selected the older version of MSBuild.dll and my project were back to normal.
in Rider IDE in solution explorer - right mouse click on the project,
in properties (left pane) select Application (should be selected by default)
in the right - change Target framework - click on ellipses, check your new framework
Save
Actually for now Rider contains the only one Web App Template - for net45.
We are going to add another one - for net4.6.1 (or 4.6.2) in 2018.1.
You can track status here: https://youtrack.jetbrains.com/issue/RIDER-10888
The main issue here - we can not just change target framework version, but change all referenced package versions and some template files...
#FaizanRabbani You should have installed suitable .NET Developer Pack to change this option. You can download it from https://www.microsoft.com/net/download/windows

Nant change Target Framework to match project

I upgraded my project from .NET 3.5 to 4.5. It's working locally but not building on the server, and the problem is that Nant is trying to use MSBuild 3.5. I ran Nant locally and although it's succeeding, it says 'Target framework: Microsoft .NET Framework 2.0' and then '[property] Target framework changed to "Microsoft .NET Framework 3.5'. What do I need to change in the nant.exe.config file to make it run the right version?
In case you (or anyone else for that matter) are still looking for an answer, check https://alastaircrabtree.com/how-to-build-a-visual-studio-2013-or-2015-solution-on-a-build-server-using-nant/

.NET Application is targeting 4.5, Setup.exe says it requires version 2.0.50727

I'm working on upgrading a windows application/service to target newer .NET frameworks for a client. This is the first time I've done anything of the sort. I changed the Target Framework in the C# project's properties window to 4.5, rebuilt the project without any errors, and then tried to run setup.exe. When I run this, it says:
This setup requires the .NET Framework version 2.0.50727.
Does anyone know why this would be happening? I read about launch conditions and that it could possibly be checking that the client computer requires v2.0, but I don't see an option to view the launch conditions in Visual Studio 2013.
Thanks

.NET Framework v4.5 Changing Layout Of Program

I have a program that I developed in C# and it is currently running on the Microsoft .NET Framework v4.0. I have upgraded to Visual Studio 2012 and that also installed Microsoft .NET Framework v4.5. Before when I had .NET Framework v4.0 installed, this how my program looked:
Now that I upgraded to .NET Framework v4.5, this is how it looks:
Notice the TreeView is now on the right side instead of the left? The 2 controls are each in seperate columns in a table which is in tool strip container. This problem is occurring on the latest/stable version of .NET Framework v4.5 (v4.0.30319.17929 or v4.5.50709 to be exact) which was released on August 15. I would like to know what is causing this and if there's a way to prevent this from happening (besides uninstalling .NET Framework v4.5)? Also, if this program is compiled with v4.0, why is v4.5 causing this problem?
Have you tried compiling it and running it under v4.0? Just because 4.5 is installed it doesn't mean 4.0 has been uninstalled.
In your solution explorer, right click on the project name and click Properties. Then in the Application tab, set the Target framework back to .NET Framework 4.
Then compile and run. If it's a .NET framework thing then it should all be back to normal. If it's still docked to the right, then the code has changed somehow.

VS Setup Project - Launch condition for .Net Framework 3.5 or higher

I need to create a setup project for my application. I need to add launch condition to make sure user has .Net framework 3.5 or higher installed on his machine. Is there a way to do so?
I have tried creating the setup project in VS 2005, 2008 and 2010. I have also tried setting up the version in launch condition to be 3.5 and then opened the project file in notepad to set "Allow Later Versions" to true, without any success.
The setup still asks me to download .Net framework 3.5 when I have .Net framework 4.0 installed on my system.
Any help will be deeply appreciated.
Thanks,
Manjeet
I think you don't want to edit project file manually. "Allow Later versions" flag is for your application not for .net framework I think; isn't it?
If you do as per this tutorial it should work fine. I've never seen your problem before. I think you must have done something wrong, other wise it should work fine.
I was also experiencing the same problem. I found that
- Visual studio 2008 started to use ToolsVersion attribute to target the framework
- Framework 4.0 doesn't include framework 3.5
In my case, I installed 3.5 (along with 4.0) and the setup is working fine now.

Categories

Resources