Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CS2001 Missing AssemblyAttributes.cs when executing SSIS package deployed to the server

I created SSIS packages and used the Integration Services Deployment Wizard to deploy it out to the server. I'm manually going to the Integration Services Catalog access through SQL Server 2012 and right-clicking and executing my package.

However, the package keeps failing and I'm getting the following errors when I check the execution report's messages.

They appear to be failing on data tasks where I have script components.

Assign :Error: CS2001 - Source file 'C:\Windows\TEMP.NETFramework,Version=v4.0.AssemblyAttributes.cs' could not be found, CSC, 0, 0

Assign :Error: Failed to compiled scripts contained in the package. Open the package in SSIS Designer and resolve the compilation errors.

like image 882
Juc Avatar asked Feb 11 '16 18:02

Juc


3 Answers

I had the same problem today, just on SQL 2016. For me it helped to change the target server version in Visual Studio project properties from SQL Server 2012 to SQL Server 2016.

like image 53
Martin Blažek Avatar answered Oct 22 '22 13:10

Martin Blažek


This answer is a more detailed version of UberDoodles answer.

In Windows Explorer.

  1. Navigate to C:\Windows\Temp\
  2. Right click the folder and select properties
  3. Go to tab Security, choose Advanced
  4. On the default tab Permissions, choose Change Permissions
  5. For the relevant Permission entry, choose edit.
  6. By default, I had 'allow' checked for Traverse folder / execute file, Create files / write data and Create folders / append data.
  7. Also check 'allow' for List folder / read data and Take ownership.
  8. Press OK, the window closes
  9. Press Apply and confirm anything you need.

Additionally, the logged in user had already Full control, but when I changed this for the entry 'Users', it worked for me.

(based on microsoft file/folder permissions).

like image 24
EricG Avatar answered Oct 22 '22 14:10

EricG


I was investigating the same issue, and I came across a solution here :

https://social.msdn.microsoft.com/Forums/vstudio/en-US/73e67f3a-c575-4c73-a71d-ed7a2aeabb50/csc-error-cs2001-source-file-cwindowstempnetframeworkversionv40assemblyattributescs?forum=msbuild

Basically, the account which the package runs under needs to have full permissions to the C:\Windows\Temp\ folder, so that it can create temporary classes.

It worked for me :)

like image 4
UberDoodles Avatar answered Oct 22 '22 14:10

UberDoodles