Hey guys...I can't say enough how greatful I am over all the hard work on these adaptors. The work for me flawlessly! The other day I read a post with a link to codeplex for the binaries. I wanted to add the .dll to my project to test it out. My problem
is that I can't figure out how to properly reference in in the web.config. Declaring it in the page is no problem. How do I get the publickeytoken? Having little knowledge of this I found some tutorials on google for using SN.exe -T e:\CSSFriendly.dll to retrieve
the PubliKeyToken but it says "CSSfriendly.dll does not represent a strongly named assembly". Can any one shed some light on how to reference it properly in the web.config file?
Instructions are brief for now, but we'll expand on them as soon as possible.
Download the
current release. Only the CSSFriendly.dll and CSSFriendlyAdapters.browser files are required.
Add a reference to the CSSFriendly.dll to your web application.
Add the CSSFriendlyAdapters.browser configuration file to your App_Browsers directory.
To expand a little:
Create or use existing BIN folder. Drop in the DLL file from Windows Explorer, In Visual Studio right click on BIN->Add Reference...
Make the App_Browsers folder or use existing, drop in the CSSFriendlyAdapters.browser from Windows Explorer, right click on the folder in VS and select Add existing item...
Your existing controls will now be rendered as CSS Friendly versions.
The direction are pretty straight foward for installing the adapters. I've really never had trouble installing them. I was merely trying to learn how to add them to the web.config file. Like this example below. This is an area I know little about. But it's
my understanding that the point of referencing a .dll through the web.config file is to make it available through out the site. Ofcourse it's easy enough to reference it in every page .... but I'm a beginner and trying to learn the best approach.
I haven't had to touch the web.config file to use the DLL version of the CSS Friendly controls. I double checked an existing project and there is no such entry in my web.config.
Well ..I know you don't need to use the web.config file for either project but that's beside the point or my previous question. My question was how to use the web.config file to reference the CssFriendlyAdapters .dll file. I was merely trying to learn how
to set them through the web.config file. The same way you can set any .dll file through the web.config file in your projects.
Here is the solution (its very late reply, I know. Kindli adjust)
Go to your project folder. In Solution Explorer, go to the properties of your project, and copy your Project Folder into the clipboard.
Open up Visual Studio 2005 Command Prompt. Type cd followed by pasting your recent clipboard content onto the command prompt. You have do right-mouse click on your command prompt window to paste.
Go to the folder which stores your assembly. Most likely it is in bin\debug, by default.
gacutil -i AssemblyName.dll
gacutil -l AssemblyName
Right-mouse click the command prompt area, copy the publickeytoken info. Example:PublicKeyToken=b03f5f7f11d50a3a
Remember to remove the assembly as you do not want to install it in the global assembly cache. Remove by doing gacutil -u
AssemblyName
devinmccloud
Member
470 Points
151 Posts
Add assembly to web.config file
Jun 19, 2007 12:56 AM|LINK
Hey guys...I can't say enough how greatful I am over all the hard work on these adaptors. The work for me flawlessly! The other day I read a post with a link to codeplex for the binaries. I wanted to add the .dll to my project to test it out. My problem is that I can't figure out how to properly reference in in the web.config. Declaring it in the page is no problem. How do I get the publickeytoken? Having little knowledge of this I found some tutorials on google for using SN.exe -T e:\CSSFriendly.dll to retrieve the PubliKeyToken but it says "CSSfriendly.dll does not represent a strongly named assembly". Can any one shed some light on how to reference it properly in the web.config file?
devinmccloud
Member
470 Points
151 Posts
Re: Add assembly to web.config file
Jun 19, 2007 06:14 PM|LINK
Am I the only one using the CSSFriendly.dll.
neps
Member
27 Points
17 Posts
Re: Add assembly to web.config file
Jun 20, 2007 06:26 PM|LINK
Nope.
You don't need to add anything on web.config. Just add the bundled .browser file on App_Browsers and the adapters will be used.
Sam Russo
Member
8 Points
4 Posts
Re: Add assembly to web.config file
Jun 20, 2007 08:23 PM|LINK
From the home page http://www.codeplex.com/cssfriendly
Implementation
Instructions are brief for now, but we'll expand on them as soon as possible.
To expand a little:
Create or use existing BIN folder. Drop in the DLL file from Windows Explorer, In Visual Studio right click on BIN->Add Reference...
Make the App_Browsers folder or use existing, drop in the CSSFriendlyAdapters.browser from Windows Explorer, right click on the folder in VS and select Add existing item...
Your existing controls will now be rendered as CSS Friendly versions.
devinmccloud
Member
470 Points
151 Posts
Re: Add assembly to web.config file
Jun 21, 2007 10:43 PM|LINK
Well thanks for your replys,
The direction are pretty straight foward for installing the adapters. I've really never had trouble installing them. I was merely trying to learn how to add them to the web.config file. Like this example below. This is an area I know little about. But it's my understanding that the point of referencing a .dll through the web.config file is to make it available through out the site. Ofcourse it's easy enough to reference it in every page .... but I'm a beginner and trying to learn the best approach.
<
assemblies><add assembly="CssFriendlyAdapters, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
Sam Russo
Member
8 Points
4 Posts
Re: Add assembly to web.config file
Jun 22, 2007 01:11 PM|LINK
I haven't had to touch the web.config file to use the DLL version of the CSS Friendly controls. I double checked an existing project and there is no such entry in my web.config.
devinmccloud
Member
470 Points
151 Posts
Re: Add assembly to web.config file
Jun 26, 2007 01:52 AM|LINK
Well ..I know you don't need to use the web.config file for either project but that's beside the point or my previous question. My question was how to use the web.config file to reference the CssFriendlyAdapters .dll file. I was merely trying to learn how to set them through the web.config file. The same way you can set any .dll file through the web.config file in your projects.
abhilashca
Participant
1260 Points
265 Posts
Re: Add assembly to web.config file
Feb 16, 2009 06:45 AM|LINK
Here is the solution (its very late reply, I know. Kindli adjust)
- Go to your project folder. In Solution Explorer, go to the properties of your project, and copy your Project Folder into the clipboard.
- Open up Visual Studio 2005 Command Prompt. Type cd followed by pasting your recent clipboard content onto the command prompt. You have do right-mouse click on your command prompt window to paste.
- Go to the folder which stores your assembly. Most likely it is in bin\debug, by default.
- gacutil -i AssemblyName.dll
- gacutil -l AssemblyName
- Right-mouse click the command prompt area, copy the publickeytoken info. Example:PublicKeyToken=b03f5f7f11d50a3a
- Remember to remove the assembly as you do not want to install it in the global assembly cache. Remove by doing gacutil -u
AssemblyName
- VOILA!
Reference: http://blogs.msdn.com/tolong/archive/2006/11/16/how-to-get-your-publickeytoken.aspxwww.cametoofar.com | www.javascriptexplorer.com | www.nmozhi.com