1

I have this problem that's been affecting me for a while:

I use CSSFriendly, with the App_Browsers folder and a CSSFriendlyAdapters.browser file in it.

Everything works fine, but every time I make a change to a source file in the project and rebuild, the App_browsers folder starts getting ignored when the web app is run.

To fix the things, I have to remember to touch the CSSFriendlyAdapters.browser (I ususally insert or delete an empty line) before building. If I fail to do that, same problem.

I've been looking everywhere for a solution. The Web app is set to be compiled with .net 4.0, I don't have an App_Browsers.dll nor a __browserCapabilitiesCompiler.compiled file in my bin folder.

I have tried to clean all my temp folders, but the problem comes back every time.

I was about to write a batch file which touches the CSSFriendlyAdapters.browser file as a pre-build operation, but I tought someone here could help.

Update:
Solved writing the batch file. It worked at first, but some months later this alone isn't enough, I have to restart IIS after each compile as well.

(I also noticed that the App_Browsers.dll and the __browserCapabilitiesCompiler.compiled* files are indeed generated, but they're copied in the asp.net temp directory instead of my bin folder).

f.cipriani
  • 3,357
  • 2
  • 26
  • 22

1 Answers1

4

I know this is a late reply but I've had a very hard time with this issue in recent days. The only thing that helped me was to uninstall the pre-compiled browser capabilities file from the GAC using the aspnet_regbrowsers.exe -u command located in C:\Windows\Microsoft.NET\Framework\v4.0.30319. It was only after I did this that the .browser definition files in my site's app_browsers folder are properly recognized. I had installed the hotfix Microsoft provided for this problem and it did not help. And I want to make it clear that copying the new browser files to C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Browsers in order to do a machine-wide update and running the aspnet_regbrowsers command resulted in an error ("The browser or gateway element with ID 'IE' cannot be found"). So, uninstalling what is already there in the GAC apparently forced my site to use its own browser definition files and everything worked properly after that. I don't really know if there are any negative implications of this approach but so far so good.

Jack Ghostine
  • 41
  • 1
  • 4
  • Trying that command I get "1002: The browser capabilities assembly is not currently installed". After some time I'm working on the same project again, and now for some reason even the pre-build event that touches the files is not working anymore. Deleting the temp directory everytime does. – f.cipriani Aug 19 '14 at 10:16