Comments (6)
What is the correct way to tell nuget that I want the Cassette package to depend on AjaxMin v4 and greater?
It seems like the default behaviour is "ha ha you lose" :( #confused
from cassette.
if you compiled against v 4.13, but you want to use it with 4.19 you have to use assembly binding to tell you apppool to look for the newer version of the dependency
http://msdn.microsoft.com/en-us/library/2fc472t2(v=vs.71).aspx
something like
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="AjaxMin" publicKeyToken="b03f5f7f11d50a3a" culture=""/>
<bindingRedirect oldVersion="0.0.0.0-4.18.0.0" newVersion="4.19.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
from cassette.
andrewdavey,
I believe the problem was not with nuGet, but with assembly references; maybe it makes sense to advice compiler to use any dll with "SpecificVersion" element in project file, such as:
<Reference Include="AjaxMin, Version=4.19.4141.18463, Culture=neutral, PublicKeyToken=24297a69a7eae424, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>....\Solution\Usadba\packages\AjaxMin.4.19.4141.18463\lib\AjaxMin.dll</HintPath>
</Reference>
I found this stackoverflow question about this topic:
http://stackoverflow.com/questions/1063459/net-reference-specificversion-true-or-false
But I'm afraid to say I have a problem with reproducing this issue... right now Cassette works just fine with AjaxMin 4.19 both on Dev and Staging (win 2008) environment. Can't say what changed...
smnbss,
Thank you for advice, but such way of assemble redirection should be set in every Web.config in every project which uses Cassete, which can be a bit boring :)
from cassette.
It can be done by the same merge that adds the configuration for cassette to the web.config. I've seen other NuGet packages working like that.
sometimes the problem happens if you reference 3rd party libraries that reference a specific version of a dll, while you reference a different version from your library. it can get quite complex, so assemblyBinding solve the problem in that specific case
from cassette.
Can the binding redirect specify a non-fixed upper bound? Otherwise we have the same problem when AjaxMin gets updated to a new version and the redirect still points to an older version.
I will have a look at setting Specific Version = False and changing the AjaxMin dependency to something like [4-5). Since I'd rather let nuget satisfy the versioning.
from cassette.
I was not right in my comment below, the reference which I quoted is actually going to point only 4.19 always (it appears SpecificVersion works only on compile time, not execution-and-assembly-search time)
Maybe it makes sense to make a reference in csproj file without versions at all:
<Reference Include="AjaxMin">
<HintPath>....packages\AjaxMin.4.13.4076.28499\lib\AjaxMin.dll</HintPath>
</Reference>
(with no version at all)
I also agree that it's better to let NuGet care about setting minimal required version.
Thanks
from cassette.
Related Issues (20)
- Infinite loop between ExceptionCatchingBundleCollectionInitializer and BundleCollection.GetReadLock HOT 3
- Remove legacy classic pipeline web.config transforms HOT 1
- Strange behavior using Web Deploy HOT 1
- Azure + Release = 500 on cassette.axd HOT 10
- Change ID of html template
- cassette rebuild is slow HOT 1
- Sorting assets in HtmlTemplateBundles
- Cassette.RequireJS breaks with most recent version of AjaxMin
- 304 Not Modified HOT 1
- When minifing comma operator syntax, the behaviour of the minified code changes
- Cassette stripping timing units from 0 values making CSS properties invalid HOT 1
- Support "defer" and "async" on scripts
- Support ASP.NET core HOT 3
- Fonts and CSS Animations for Semantic UI not working once bundled HOT 1
- Cassette does not include files in /fonts and /images.
- Cached Manifest.xml being empty breaks website
- CSS minification breaking calc() HOT 1
- setTimeout with lambda causes incorrect minification
- Can Cassette be used in react-native?
- Could not load type 'Cassette.Trace' from assembly 'Cassette, Version=2.4.2.13844, Culture=neutral, PublicKeyToken=null'. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cassette.