Closed calvinv closed 9 years ago
Not currently. The current behavior is that packages with duplicate ID / Version replace an existing package but preserve the download count metadata.
It shouldn't be too difficult to include this setting if it would be useful.
We were planning on forking it and adding it ourselves but if you added it that would be great. Think you will?
I can add it but no promises on when :). The changes will actually go in https://github.com/themotleyfool/NuGet.Lucene so you should fork that repo if you want to take a stab at it.
I would probably implement this change in LucenePackageRepository
Thanks for pointing me in the right direction. Will give it a shot
Hey, I see you've made this change in Nuget.Lucene however when I try get a new build by referencing nuget.lucene artifacts from a new clone I built locally I get compiler errors. It seems you've updated Nuget.Lucene to use Microsoft.AspNet.WebApi.* v5.2.2 while Klondike is still referencing v5.1.1.
I'm working on a few remaining bugs/features before making a new binary release of Klondike.
You could try installing NuGet.Lucene.Web from the AppVeyor NuGet feed: https://ci.appveyor.com/nuget/nuget-lucene-gsxts1jkyeml
Despite mismatched dependency versions, do you get compile errors or only warnings about the mismatch? I'm wondering if updating the AspNet.WebApi dependencies to match, and adding any necessary binding redirects to Web.config would help.
Also please note the dev branch of Klondike is not on master but on the self-host branch.
Klondike has an example setting with comments in Settings.config, commit 15063d5eff60ebe738d72dfa75497105e4b6f748. This has not been released but is available in AppVeyor builds and on master.
Sorry for the late response, for interests sake I rebuilt latest klondike master and Nuget.Lucene master then updated the Klondike.csproj with the new dlls from nuget.lucene. I've attached the csproj with the updated references as well as my grunt build log. I've trimmed as much of it as I could just showing the updated references and the msbuild part of the log. The Version number in the xml are arbitrary as the dlls I'm pointing to are from my Nuget.Lucene clone. I'm either going to wait it out for the next release or try adding the code onto a personal fork at the last release revision. Thanks for the help, here's the attachments.
Klondike.csproj
<Reference Include="Common.Logging, Version=2.1.2.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\Common.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.SignalR.Client, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\Microsoft.AspNet.SignalR.Core.dll</HintPath>
</Reference>
<Reference Include="NuGet.Core, Version=2.8.50126.400, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\NuGet.Core.dll</HintPath>
</Reference>
<Reference Include="NuGet.Lucene, Version=2.9.4.47, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\NuGet.Lucene.dll</HintPath>
</Reference>
<Reference Include="NuGet.Lucene.Web, Version=2.9.4.47, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\NuGet.Lucene.Web.dll</HintPath>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\Owin.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Formatting, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\System.Web.Http.dll</HintPath>
</Reference>
Msbuild part of grunt build log Microsoft (R) Build Engine version 12.0.21005.1 [Microsoft .NET Framework, version 4.0.30319.34003] Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2015-02-05 10:11:50 AM.
Project "C:\git\Klondike\Ciao.proj" on node 1 (default targets).
RestoreSolutionPackages:
"C:\git\Klondike\build\tools\NuGet.exe" restore "Klondike.sln" -NonInteractive -Source http://www.nuget.org/api/v2/
All packages listed in packages.config are already installed.
All packages listed in packages.config are already installed.
Project "C:\git\Klondike\Ciao.proj" (1) is building "C:\git\Klondike\packages\Ciao.1.0.2\tools\Ciao.proj" (2) on node 1 (default targets).
GenerateVersionInfoCore:
PackageVersion: 1.6.2
AssemblyVersion: 1.6.2.0
AssemblyInformationalVersion: 1.6.2-build0 1.6.2 (a6670e8-dirty)
Assembly Version attributes written to C:\git\Klondike\build\VersionInfo.cs
Project "C:\git\Klondike\packages\Ciao.1.0.2\tools\Ciao.proj" (2) is building "C:\git\Klondike\Klondike.sln" (3) on node 1 (Build target(s)).
ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
Project "C:\git\Klondike\Klondike.sln" (3) is building "C:\git\Klondike\app\Klondike.csproj" (4) on node 1 (default targets).
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3243: No way to resolve conflict between "Microsoft.AspNet.SignalR.Core, Version=2.1.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.AspNet.SignalR.Core, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "Microsoft.AspNet.SignalR.Core, Version=2.1.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily. [C:\git\Klondike\app\Klondike.csproj]
No way to resolve conflict between "System.Web.Http, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "System.Web.Http, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "System.Web.Http, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
No way to resolve conflict between "System.Net.Http.Formatting, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "System.Net.Http.Formatting, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "System.Net.Http.Formatting, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
No way to resolve conflict between "Microsoft.Data.Edm, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.Data.Edm, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "Microsoft.Data.Edm, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
No way to resolve conflict between "Microsoft.Data.OData, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.Data.OData, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "Microsoft.Data.OData, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
No way to resolve conflict between "System.Spatial, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "System.Spatial, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "System.Spatial, Version=5.6.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
No way to resolve conflict between "System.Web.Http.Owin, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "System.Web.Http.Owin, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "System.Web.Http.Owin, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
Consider app.config remapping of assembly "Microsoft.AspNet.SignalR.Core, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "2.0.2.0" [C:\git\Klondike\packages\Microsoft.AspNet.SignalR.Core.2.0.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll] to Version "2.1.2.0" [C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\Microsoft.AspNet.SignalR.Core.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Web.Http, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.2.0.0" [] to Version "5.2.2.0" [C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\System.Web.Http.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Net.Http.Formatting, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.2.0.0" [] to Version "5.2.2.0" [C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\System.Net.Http.Formatting.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "Microsoft.Data.OData, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.6.0.0" [C:\Program Files (x86)\Microsoft WCF Data Services\5.6\bin.NETFramework\Microsoft.Data.OData.dll] to Version "5.6.3.0" [C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\Microsoft.Data.OData.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "Microsoft.Data.Edm, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.6.0.0" [C:\Program Files (x86)\Microsoft WCF Data Services\5.6\bin.NETFramework\Microsoft.Data.Edm.dll] to Version "5.6.3.0" [C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\Microsoft.Data.Edm.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Web.Http.Owin, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.2.0.0" [] to Version "5.2.2.0" [C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\System.Web.Http.Owin.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "Common.Logging, Culture=neutral, PublicKeyToken=af08829b84f0328e" from Version "2.1.2.0" [] to Version "2.3.1.0" [C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\Common.Logging.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Spatial, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.6.0.0" [C:\Program Files (x86)\Microsoft WCF Data Services\5.6\bin.NETFramework\System.Spatial.dll] to Version "5.6.3.0" [C:\git\NuGet.Lucene\source\NuGet.Lucene.Web\bin\Debug\System.Spatial.dll] to solve conflict and get rid of warning.
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:
Build FAILED.
"C:\git\Klondike\Ciao.proj" (default target) (1) ->
"C:\git\Klondike\packages\Ciao.1.0.2\tools\Ciao.proj" (default target) (2) ->
"C:\git\Klondike\Klondike.sln" (Build target) (3) ->
"C:\git\Klondike\app\Klondike.csproj" (default target) (4) ->
(ResolveAssemblyReferences target) ->
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3243: No way to resolve conflict between "Microsoft.AspNet.SignalR.Core, Version=2.1.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.AspNet.SignalR.Core, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "Microsoft.AspNet.SignalR.Core, Version=2.1.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily. [C:\git\Klondike\app\Klondike.csproj]
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:
"C:\git\Klondike\Ciao.proj" (default target) (1) -> "C:\git\Klondike\packages\Ciao.1.0.2\tools\Ciao.proj" (default target) (2) -> "C:\git\Klondike\Klondike.sln" (Build target) (3) -> "C:\git\Klondike\app\Klondike.csproj" (default target) (4) -> (CoreCompile target) -> App_Start\NinjectWebCommon.cs(16,25): warning CS1591: Missing XML comment for publicly visible type or member 'Klondike.App_Start.NinjectWebCommon' [C:\git\Klondike\app\Klondike.csproj] Global.asax.cs(21,18): warning CS1591: Missing XML comment for publicly visible type or member 'Klondike.Global' [C:\git\Klondike\app\Klondike.csproj] Global.asax.cs(23,46): warning CS1591: Missing XML comment for publicly visible type or member 'Klondike.Global.RouteMapper' [C:\git\Klondike\app\Klondike.csproj] KlondikeHtmlMicrodataFormatter.cs(13,18): warning CS1591: Missing XML comment for publicly visible type or member 'Klondike.KlondikeHtmlMicrodataFormatter' [C:\git\Klondike\app\Klondike.csproj]
"C:\git\Klondike\Ciao.proj" (default target) (1) ->
"C:\git\Klondike\packages\Ciao.1.0.2\tools\Ciao.proj" (default target) (2) ->
"C:\git\Klondike\Klondike.sln" (Build target) (3) ->
"C:\git\Klondike\app\Klondike.csproj" (default target) (4) ->
(CoreCompile target) ->
App_Start\NinjectWebCommon.cs(46,74): error CS0246: The type or namespace name 'SignalRModule' could not be found (are you missing a using directive or an assembly reference?) [C:\git\Klondike\app\Klondike.csproj]
Global.asax.cs(28,28): error CS1502: The best overloaded method match for 'NuGet.Lucene.Web.UnhandledExceptionLogger.LogException(System.Exception, System.Action
7 Warning(s)
9 Error(s)
Time Elapsed 00:00:01.56 [31m>> [39mExited with code: 1. [33mWarning: Task "exec:msbuild:dist" failed. Use --force to continue.[39m
[31mAborted due to warnings.[39m
It sounds like you are not on latest commit on master on Klondike. Klondike has been migrated off of grunt and onto ember-cli. You should not need to modify any assembly paths or use local builds for NuGet.Lucene or NuGet.Lucene.Web in order to have the latest changes which support the packageOverrideMode
setting.
The nuget server 2.8 has a setting in its web.config called "allowOverrideExistingPackageOnPush" under appsettings which prevents overwriting of already existing packages (obviously :) ) Does Klondike have the same feature, I can't find anything like it under the web.config.
Not sure where else to post this