RickStrahl / Westwind.Globalization

Database driven resource localization for .NET applications
544 stars 135 forks source link

Newtonsoft.Json is referenced twice in Sample project #45

Closed pmarflee closed 8 years ago

pmarflee commented 8 years ago

Newtonsoft.Json is referenced twice in the Sample project. The hint path for the second reference points to a version of the Nuget package (7.0.1) that doesn't match with the version listed in packages.config.

The sample project will build if the following section of the project file is removed:

`

..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll `
RickStrahl commented 8 years ago

Hmmm... good catch. However, are you saying the project is not building for you? It's building for me... Removed the errant reference.

pmarflee commented 8 years ago

No, it wasn't building for me. These are are errors I was getting:

1>------ Build started: Project: Westwind.Globalization.Sample, Configuration: Debug Any CPU ------ 1> Restoring NuGet packages... 1> To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'. 1> All packages listed in packages.config are already installed. 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3243: No way to resolve conflict between "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". Choosing "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" arbitrarily. 1> Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "4.5.0.0" [C:\Windows\assembly\GAC_MSIL\Newtonsoft.Json\4.5.0.0__30ad4fe6b2a6aeed\Newtonsoft.Json.dll] to Version "6.0.0.0" [C:\Code\Westwind.Globalization\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning. 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,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: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /><bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /></dependentAssembly></assemblyBinding> 1>C:\Code\Westwind.Globalization\Westwind.Globalization.Sample\Controllers\AlbumViewer\AlbumsBusiness.cs(58,20,58,31): error CS0433: The type 'Newtonsoft.Json.JsonConvert' exists in both 'c:\Code\Westwind.Globalization\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll' and 'c:\Windows\assembly\GAC_MSIL\Newtonsoft.Json\4.5.0.0__30ad4fe6b2a6aeed\Newtonsoft.Json.dll' 1>C:\Code\Westwind.Globalization\Westwind.Globalization.Sample\Controllers\AlbumViewer\AlbumsBusiness.cs(67,20,67,31): error CS0433: The type 'Newtonsoft.Json.JsonConvert' exists in both 'c:\Code\Westwind.Globalization\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll' and 'c:\Windows\assembly\GAC_MSIL\Newtonsoft.Json\4.5.0.0__30ad4fe6b2a6aeed\Newtonsoft.Json.dll' 1>C:\Code\Westwind.Globalization\Westwind.Globalization.Sample\Controllers\AlbumViewer\AlbumViewerEntities.cs(19,20,19,31): error CS0433: The type 'Newtonsoft.Json.JsonConvert' exists in both 'c:\Code\Westwind.Globalization\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll' and 'c:\Windows\assembly\GAC_MSIL\Newtonsoft.Json\4.5.0.0__30ad4fe6b2a6aeed\Newtonsoft.Json.dll' 1>C:\Code\Westwind.Globalization\Westwind.Globalization.Sample\Controllers\AlbumViewer\AlbumViewerEntities.cs(28,20,28,31): error CS0433: The type 'Newtonsoft.Json.JsonConvert' exists in both 'c:\Code\Westwind.Globalization\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll' and 'c:\Windows\assembly\GAC_MSIL\Newtonsoft.Json\4.5.0.0__30ad4fe6b2a6aeed\Newtonsoft.Json.dll' ========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

RickStrahl commented 8 years ago

Weird - I was able to build with the invalid reference in my project.

IAC, it's been removed. Thank you for the heads up.