Package versions

If you have a project that requires a package that is already included in the solution, then it seems that the version has to match.

For example, if we include in a project

<PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.2"/>
including it in the solution distribution, the website will not fire up and will sit on the maintenance page. 
Not sure of the best way to handle this from a development perspective and also from the perspective of versioning becasue binding redirects are not available?  
Parents
  • Try adding ExcludeAssets to the package reference so it's not copied to /artifacts/build (which is the mount point for cfs/plugins in the local stack).

    <PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.2">
      <ExcludeAssets>runtime</ExcludeAssets>
    </PackageReference>

    This isn't entirely different from the same challenge you'd have had pre-14. If your plugin depends on a different version from what's in Community, a binding redirect would have always been a risky move. The safest bet for packages already referenced by Community (full list, versions available in Administration > About) is to reference the version in Community and to not deploy it with your plugin. 

  • And to be clear, if it had a reference to a DLL that wasn't visible to it in cfs/plugins, the site would have still loaded with a useful error message logged. But in this case, it was due to a completely different version of Microsoft.Data.SqlClient.dll being bundled. We already have another issue logged that expands exception logging for non-loadable custom plugins.

Reply Children
No Data