Monday, 29 September 2014

Gac all assemblies in a directory


Installs all assemblies in a particular directory into the global assembly cache from batch file.


@SETLOCAL
@ECHO OFF
@CALL "%VS110COMNTOOLS%vsvars32.bat"

@SET BuildFolder=..\bin\Debug

@ECHO.
@ECHO GAC all project assemblies...


@for %%f in (%BuildFolder%\*.dll) do (

        @echo %%~nf.dll
@gacutil -if %BuildFolder%\%%~nf.dll
    )

@PAUSE
@EXIT
@ENDLOCAL

Execute a batch file from Visual Studio


From the menu select Tools => External Tools

Then add the following:




Sunday, 28 September 2014

SQL job to remove old BizTalk backup files


Run this:

EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1

GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO

Save and schedule this in a sql job:

EXEC xp_cmdshell 'FORFILES /p "D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup" /s /m AU-*.bak /d -1 /c "CMD /C del /Q /F @FILE"'

BizTalk Developer - Interview Question 1.

Rewrite the following xml without using namespace prefixes:


<ns0:RootNode Code="COMP" xmlns:ns0="http://ABC.Schemas.RootNode">
  <Identifier>X984991</Identifier>
  <Products>
    <Product>
      <Code>WW01</Code>
      <Description>Winter Woolies</Description>
    </Product>
  </Products>
</ns0:RootNode>