8

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.

Gabor
  • 685
  • 2
  • 11
  • 25

2 Answers2

9

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
Piotr Palka
  • 3,086
  • 1
  • 9
  • 17
  • is there any documentation on this relation? – Stavros Koureas Nov 24 '20 at 17:40
  • Best I found was release notes for SSDT: `Upgraded .NET framework version to 4.7 for script task/component when the target server version is SQL Server 2019.`, from https://learn.microsoft.com/en-us/sql/ssdt/release-notes-ssdt?view=sql-server-ver15 and comments from MS staff. – Piotr Palka Nov 24 '20 at 22:45
2

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.

J Weezy
  • 3,507
  • 3
  • 32
  • 88