1

Closed

RegExFlatFileSource project does not build as normal user

description

Running under Vista or Win7, the RegExFlatFileSource project generates errors two access denied errors.
 
------ Build started: Project: RegExFlatFileSource, Configuration: Debug Any CPU ------
C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.DTSPipelineWrap.dll" /reference:"C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SQLServer.DTSRuntimeWrap.dll" /reference:"C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SQLServer.ManagedDTS.dll" /reference:"C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.PipelineHost.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug+ /debug:full /keyfile:regexsample.snk /optimize- /out:obj\Debug\RegExFlatFileSource.dll /resource:TxRegExSrc.ico,RegExFlatFileSource.TxRegExSrc.ico /target:library TxRegExpSrc.cs Properties\AssemblyInfo.cs
 
Compile complete -- 0 errors, 0 warnings
RegExFlatFileSource -> C:\try\regexFlatFile\main\RegExFlatFileSource\bin\Debug\RegExFlatFileSource.dll
copy "C:\try\regexFlatFile\main\RegExFlatFileSource\bin\Debug\RegExFlatFileSource.dll" "%ProgramFiles%\Microsoft SQL Server\100\DTS\PipelineComponents."
"%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "C:\try\regexFlatFile\main\RegExFlatFileSource\bin\Debug\RegExFlatFileSource.dll"
 
Access is denied.
    0 file(s) copied.
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.30729.1
Copyright (c) Microsoft Corporation. All rights reserved.
 
Failure adding assembly to the cache: Access denied. You might not have administrative credentials to perform this task. Contact your system administrator for assistance.
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3397,13): error MSB3073: The command "copy "C:\try\regexFlatFile\main\RegExFlatFileSource\bin\Debug\RegExFlatFileSource.dll" "%ProgramFiles%\Microsoft SQL Server\100\DTS\PipelineComponents."
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3397,13): error MSB3073: "%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "C:\try\regexFlatFile\main\RegExFlatFileSource\bin\Debug\RegExFlatFileSource.dll"
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3397,13): error MSB3073: " exited with code 1.
Done building project "RegExFlatFileSource.csproj" -- FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
Closed Feb 14, 2009 at 9:57 PM by toddmcdermid
The GACUtil utility requires Administrator permission to place DLLs in the GAC. You must either:
  1. Run Visual Studio "As Administrator" on Vista/Win7 in order for a GACUtil command to work in the pre/post-build commands, or
  2. Remove the GACUtil commands from the pre/post-build commands in Visual Studio and issue GACUtil commands from a Command-line Prompt that was started "As Administrator".

comments