I have a Visual Studio 2012 project that creates an SSIS custom task. In the Post-build event, I have this:-
cd $(ProjectDir)
@SET TASKDIR="C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Tasks\"
@SET GACUTIL="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe"
Echo Installing dll in GAC
Echo $(OutDir)
Echo $(TargetFileName)
%GACUTIL% -if "$(OutDir)$(TargetFileName)"
Echo Copying files to Tasks
copy "$(OutDir)$(TargetFileName)" %TASKDIR%
which used to work with Windows 7.
Today, for the first time, I have tried to do this on Windows 10 and I'm getting:-
Failure adding assembly to the cache: Administrator permissions are needed to use the selected options.
If I start a command window as Administrator and use the command:-
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe" -if "C:\Users\Kevin\Documents\Visual Studio 2012\Projects\SSISCompressionTask\SSISCompressionTask\bin\Debug\<Task Name>.dll
it works.
How do I continue to put the assembly in the GAC from the Post-build event in Visual Stusio please?
Thanks