2

Does anyone know a competitor to BiztalkNOS to register a c# library dll into the GAC, directly from Visual Studio 2013?

NOS is $499, and I hope there is an alternative.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Internet Engineer
  • 2,514
  • 8
  • 41
  • 54

4 Answers4

5

I have been using this method for years now, over multiple versions of Visual Studio. You just need to know the path gacutil.exe is stored at (see <yourpath>). For the default path, check out: where is gacutil.exe?

In VS, go to Tools -> External Tools, click on Add, and enter a

  • Title, for example "GAC assembly"

  • Command  : <yourpath>\gacutil.exe

  • Argument: /i $(TargetPath)

  • Initial directory: $(TargetDir)

... and click apply.     When you build a project and you want to add the assembly to the GAC, just have the project highlighted/selected in the solution explorer, and click Tools --> GAC assembly and that's it, it's "GAC'ed".

This will let you have manual control over when you GAC a DLL. A post-build script (other answers) adds it to the GAC every time: a valid option, this is just another possibility I wanted to point out.

Community
  • 1
  • 1
zurebe-pieter
  • 3,246
  • 21
  • 38
4

You don't need any add-ins, the Windows SDK (comes with Visual Studio) provides gacutil.exe for exactly this purpose.

You can use something like this is a Post Build script:

CALL "%VS110COMNTOOLS%vsvars32.bat"
gacutil.exe /i "$(TargetPath)"

VS110 is the Visual Studio version which you may need to adjust for you local version.

Johns-305
  • 10,908
  • 12
  • 21
2

This is not exactly the same purpose, but have a look at BizTalk Deployment Framework (https://biztalkdeployment.codeplex.com/). With some work, you would be able to deploy your BizTalk Application with only one script. Your librairies will be installed directly to the GAC.

Rom Eh
  • 1,981
  • 1
  • 16
  • 33
  • 1
    BTDF also has a handy button to GAC the DLL of the current project. It strangely looks like a database icon on the toolbar. – Dan Field Jan 25 '16 at 15:27
1

Here's what we use:

"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe" /if "$(TargetFileName)"

Put that in your projects Properties --> Build Events --> Post-build event command line and it will be deployed to the GAC when you build.

This is Visual Studio 2012/BizTalk 2013

Bensonius
  • 1,501
  • 1
  • 15
  • 39