index > Team Foundation Server - General > Team Build Error when using Strong Naming

Team Build Error when using Strong Naming


Hi I am getting the following error when trying to build my solution using Team Build. The projects are strong named an the key is in source control.
Solution: MediaConnector.Client.Windows.sln, Project: MediaConnector.Domain.csproj, Compilation errors and warnings
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1718,7): error MSB4018: The "ResolveKeySource" task failed unexpectedly.
System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
   at Microsoft.Build.Shared.ExceptionHandling.RethrowUnlessFileIO(Exception e)
   at Microsoft.Build.Tasks.ResolveKeySource.ResolveAssemblyKey()
   at Microsoft.Build.Tasks.ResolveKeySource.Execute()
   at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)

The error referes to this section of the Microsoft.Common.targets file:
      <ResolveKeySource
          KeyFile="$(AssemblyOriginatorKeyFile)"
          CertificateThumbprint="$(ManifestCertificateThumbprint)"
          CertificateFile="$(ManifestKeyFile)"
          SuppressAutoClosePasswordPrompt="$(BuildingInsideVisualStudio)"
          ShowImportDialogDespitePreviousFailures="$(BuildingProject)"
          ContinueOnError="!$(BuildingProject)"
          >

        <Output TaskParameter="ResolvedKeyFile" PropertyName="KeyOriginatorFile" Condition=" '$(SignAssembly)' == 'true' "/>
        <Output TaskParameter="ResolvedKeyContainer" PropertyName="KeyContainerName" Condition=" '$(SignAssembly)' == 'true' "/>
        <Output TaskParameter="ResolvedThumbprint" PropertyName="_DeploymentResolvedManifestCertificateThumbprint" Condition=" '$(SignManifests)' == 'true' "/>

      </ResolveKeySource
>
To me it looks like it is some problem with finding the key, but i am not sure where to go from here. If i check the application out to a clean directory it builds fine so i assume that everything is being referenced ok.

Does anyone have any ideas as to what is going on here?

Thanks,
Derek
Derek Ekins
Well I found that the error is because my key requires a password.
I cannot figure out how to give msbuild that password however. If anyone has any pointers...
Derek Ekins

For password protected signing keys to work on build without prompting, they need to be exported into a key container crypto store on the build machine under the account that performs the build. Once exported, the build will not ask for a password anymore. The crypto store will do the signing and take care to keep private key safe.

Nagaraju Palla MSFT
Just the answer i was looking for.

Thanks very much.
Derek Ekins

Nagaraju

Did you come up with any other workarounds?

Thanks,

Paul




Nothing
Pvanroos
reply 5

You can use google to search for other answers

 

More Articles

Does tfsSetup have to be licensed user
Scripting tf.exe using wscript.shell
Shelving during the RC upgrade process
TFS Notification Web Services: Visual Studio 2005 Project Templat...
Migration from VSS to VSTS - Big company with many dev teams
Estimation & Scheduling with VSTS
Build Machine on a different domain
Version Control window not displaying
Creating a link dependency in Work Items
Cherry Pick merge
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

VS 2005 Pro with TFS client and source c…
Can I create a label using MSBuild types?
Visual Studio 2005 and Team Foundation S…
Moving code from one team project to ano…
"Auto" alerts is possible?
Is there a Team Foundation Server Admin …
Team Build Error when using Strong Naming
Upgrade Beta 3 to Beta 3 refresh
Work Item "Application Data"
Can the portal be integrated with ShareP…
How to upload changes in my workspace
"The operation could not be complet…
'Display Name' changes in Active Directo…
Package Load Failure - Microsoft.VisualS…
Extending VSTS article - Automatically s…

Hot Articles

Create Query with calculation
Another 32000 Error for Beta2
A question about integration package dat…
Scaling Team System to more servers
Using Microsoft Project to create work i…
Project Portal Process guidance back but…
TFS without Active Directory
Connect to Team Foundation Server error …
Methodologies & Patterns
VSS Converter, Solution Files still refe…
How to use team build to build a web set…
How to change the current authenticated …
Does Office 2007 System compatible with …
Workspace issue
Got 32000 Error When Installing TFS App …

Recommend Articles

Cannot access Sharepoint admin after TFS…
TFS Beta 3 extensibility issue - witimport
Somehow Installed TFS, Now Having some P…
'Display Name' changes in Active Directo…
Getting Detail Code Coverage Information
build software over several solutions in…
What is the purpose of the standard cate…
Severe Problem, Any help would be very a…
in vstsv how to Manage Stored Proc code
Mismatch in Installation guide for Beta3…
Unable to add Web parts to the Project P…
Visualisation tools for merging
Reports fails with TFS beta 3 refresh
TFS Install fails...
Access Denied to Start Build