error on Add to GAC with MSBuild Extensions

Jan 7, 2013 at 9:19 PM

I'm having a little trouble with getting AddAssembly to work. I jhave already managed get the remove assembly to work but the add is giving me problems.

Here is the XML.:

  <Target Name="AddToGAC">
    <MSBuild.ExtensionPack.Framework.Gac TaskAction="AddAssembly" AssemblyName="c:\Nick\MyDll.dll" RemoteAssemblyPath="\\MyServer\c$\temp\Nick\MyDll.dll" MachineName="MyServer" />
  </Target>

The returned output is: 

Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.296]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 1/7/2013 4:17:21 PM.
Project "C:\Nick\Build_01.proj" on node 1 (AddToGAC target(s)).
C:\Nick\Build_01.proj(93,5): error : NullReferenceException: Object reference not set to an instance of an object.
C:\Nick\Build_01.proj(93,5): error :
Done Building Project "C:\Nick\Build_01.proj" (AddToGAC target(s)) -- FAILED.

Build FAILED.

"C:\Nick\Build_01.proj" (AddToGAC target) (1) ->
(AddToGAC target) ->
  C:\Nick\Build_01.proj(93,5): error : NullReferenceException: Object reference not set to an instance of an object.
C:\Nick\Build_01.proj(93,5): error :

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.18

Any ideas? I fear this is something I have not completed correctly as I can't find this error reported anywhere.


Regards

Jan 21, 2013 at 9:41 PM

Fixed

Marked as answer by mikeFourie on 2/16/2014 at 10:35 AM