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.
6条答案
按热度按时间bfrts1fy1#
This answer is a more detailed version of UberDoodles answer.
In Windows Explorer.
C:\Windows\Temp\
properties
Security
, chooseAdvanced
Permissions
, chooseChange Permissions
edit
.Traverse folder / execute file
,Create files / write data
andCreate folders / append data
.List folder / read data
andTake ownership
.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 ).
cgfeq70w2#
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.
dgtucam13#
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 :)
drkbr07n4#
I had the same problem. I first used Eric G. response and added the
List
andRead
permission to thec:\windows\temp
. After I got everything working I went back and removed that permission. I then redeployed my solution from Visual Studio, this time designating the deployment target asSQL Server 2014
(which was the environment I was using) using Martin's solution. I then reran the process, and it worked with theList
andRead
removed.I kept it using Martin's solution, as I don't like to have special permissions granted if I don't need them.
Good Luck
eulz3vhy5#
[Visual Studio 2017 15.9.16]
I just restarted Visual Studio as Administrator and the issue disappeared, which confirms the permissions idea of the answers above but spared me all work.
It's not a quirk though, as per this question and its answer you need that kind of permission for several tasks, like profiling and debugging under certain conditions.
For the sake of completeness, this blog says you might incur in some security contraindication if run VS as administrator when opening third-party solutions.
zrfyljdw6#
I was using script tasks in my workflow, I was having the same issue. Ensure that you do the build of .net code within each script task separately.