Update: a much better alternative.
One of the most under used features of Visual Studio is the post and pre build events…….
Example: Deploy the assembly to gac and copy the .pdb files in to the assemblies gac directory.
before this gac the assembly and navigate to its (gac) folder from “C:\WINDOWS\Assembly\GAC_MSIL\Assembly NameSpace
1) create a bat file with the following and save it in the bin\debug\postbuild.bat
“C:\Program files\Microsoft Visual Studio 8\SDK\v2.0\Bin\GacUtil.exe” /i Assembly Name.dll/f
xcopy Assembly Name.pdb C:\WINDOWS\Assembly\GAC_MSIL\Assembly name space\184.108.40.206__Assembly Public Key Token\
2) Right click the project select properties.
3) Navigate to Build Events
4) In the post build event text box enter the following
call “project path\bin\debug\postbuild.bat”
5) Rebuild the solution …
Hope this helps
i was writing a httphandler(class library project ofcourse), i needed to log a value into the db, so i needed a connection string from the web.config, i imported the namespce(System.Configuration) in to the class and all i could do was only access the AppSetting part of the config file.
In order to access the connection strings add a reference to the System.Configuration.dll to the project.
1) Gac the assembly
Install the WCF LOB Adapter assembly in the GAC and click Run and paste the following %systemroot%\assembly\gac, navigate to the msil folder(the .net 2.0 assembly are installed here) find your assembly and copy the pdb files in to it
your assembly will be stored in the following structure
— Name of the assembly
— public key token
— .dll file (copy the pdb files here)
in order to automate the process you might want to create a bat file or add a post build command in Visual studio.(Of course the above structure will appear only when you have gaced the assembly first and then create the bat file or the post build script).
So we are ready for debugging
2) Design Time
open up 2 instances of Visual studio
1st instance should contain the WCF LOB Adapter project
2nd should contain the client or biz talk project that you want to import the adapter proxy into
In the first instance attach the 2nd instance Visual studio process from the debug menu, and from the second VS instance perform Add Adapter reference for a .net client or a Add generated items for a Biz talk client.
Once done the debug point in the 1st instance of the Adapter code will be hit.
3) Run Time
Once you gaced WCF LOB Adapter assembly click F5 from your .net application
For biz talk you have to attach the Biz talk process.
and also throw in DebugView and add WCF tracing— 🙂
Note: As you do the changes to the adapter code, you have to restart Visual studio again to load the latest dll, i believe VS caches the dlls.
I was working the with the WCF LOB adapter and did a small change to the adapter’s operation (added another input parameter from 2 to 3), and gaced the adapter dll, then in the same VS instance i added another project and consumed thte adapter service, nothing has changed the operation still showed only 2 parameters!!!!!!!!!!!!!
Solution: Restart VS and consume the adapter again.
This is an amazing tool to have, one of my resources deleted a BizTalk Map, in came the dissasembler for Reflector and the XSLT was generated from the DLL, ufff… It did save us a lot of time(About to be deployed to PRD).
The disassembler can generate schemas, xslt, orchestartions, pipelines etc…
its a must have for every BizTalk Devloper out there.