Add this on the post build events of the Class Library project for quick GAC deployment
“C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil" -i "$(TargetPath)" | C:\Recycle.vbs
Then create a VB Script file using Notepad in location C:\Recycle.vbs:
strAppPoolName = "DefaultAppPool"
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:{authenticationLevel=pktPrivacy}\\" _
& strComputer & "\root\microsoftiisv2")
Set colItems = objWMIService.ExecQuery _
("Select * From IIsApplicationPool Where Name = " & _
"'W3SVC/AppPools/" &strAppPoolName & "'")
For Each objItem in colItems
objItem.Recycle
Next
Wscript.echo "Recycle Completed"
Change the value of the variable "strAppPoolName" to the name of the application pool that needs recycling.
No comments:
Post a Comment