1
votes

I have a "file->new project->new asp.net core mvc" (.net Core 1.1) and have installed two Nuget Packages:

  • System.Globalization
  • System.Text.Encoding

Both version 4.3 as seen in the solution explorer. The error relates to a lower version 4.2. The csproj also references the 4.3 version. So where is the 4.2 ref? enter image description here

If I uninstall the 4.3.0 version I get a 4.0.10 and 4.2.0 conflict...

blabla.cs(117,23): error CS0433: The type 'Encoding' exists in both 'System.Text.Encoding, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

edit is this perhaps browserlink related and if so, how can I fix it? https://stackoverflow.com/a/43571044/169714

edit2 @Ilya Chumakov referenced this other stackoverflow topic. So I searched the solution explorer for the globalization or encoding and all I got were references to the 4.3 (which is the nuget version) enter image description here enter image description here

1

1 Answers

1
votes

Fixed by removing the browserlink package in the solution explorer under dependencies -> nuget

https://github.com/NuGet/Home/issues/4484#issuecomment-277863709

and remove app.UseBrowserLink(); from public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in Startup.cs

enter image description here