-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Squishit.less adds C# file to VB project #232
Comments
We definitely don't mean to exclude VB. I'm not terribly familiar with the way the WebActivator stuff gets added by NuGet but I can try to figure it out. I'd like to have it install an equivalent SquishItLess.vb if possible. |
This commit looks like what we'd need (basically include the initialization method in our assembly and specify the pre application start method in assembly info) alexbeletsky/elmah-mvc@abf84ae Shouldn't be terribly difficult - I'll aim to include this in the next release. |
Ugh, looks like the PreApplicationStartMethod attribute was added in ASP.net 4. I will make the changes in a branch, but will need to collect more feedback before making a change like that (a 1.0 release might be a reasonable time to do this). |
Ok this seems to be working, as of the commit above. I didn't actually test in a VB project, but this brings the initialization code into the library so it should work for either. Tested by commenting out the LESS preprocessor registration in our test project and running the LESS test page. This has approach has the addiitional benefit that it will automagically register for everyone, not just folks who install via nuget (of course this assumes I get around to fixing #221 so people can actually install that way ;) ) |
Thanks for the quick response. I was converting a project from C# to VB and added the packages and ran into this problem. For a workaround, I added a SquishItLess.vb file to replace the C# file. This project taught me that C# is much easier to work with. |
Well hopefully we can at least eliminate any part of VB being hard to work with that we directly caused! We probably won't be cutting another release for a while but it might be fair to start requiring .net 4 for the preprocessors at this point (some of them already required it). If you don't like having the random .vb file sitting around , you can copy the Bundle.RegisterStylePreprocessor(...) line from that into the Application_Start method of your Global.asax.cs. Or Global.asax.vb I guess in your case :D |
I created a poll to try and figure out what ASP.net version people are using - if anyone comes across this issue thats interested please respond :) |
When we do this it may be worth using WebActivator's PreApplicationStartMethod attribute instead of ASP.net's (see http://blog.davidebbo.com/2011/02/new-features-in-webactivator-13.html) Using WebActivator will allow us to call code that we define in the bootstrap classes for preprocessor registration, and also provides a similar ApplicationShutdownMethod attribute that could be used to automate calls to a method that cleans up temporary files created when resolving embedded resources (see issue mentioned above for details). |
related AlexCuse@acc105e |
When adding SquishIt.Less from nuget,
SquishItLess.cs
is added toApp_Start
instead ofSquishItLess.vb
. If you don't support VB, then you can close this issue.The text was updated successfully, but these errors were encountered: