Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different versions dll in nuget #292

Closed
KopIlya opened this issue May 22, 2018 · 4 comments
Closed

Different versions dll in nuget #292

KopIlya opened this issue May 22, 2018 · 4 comments

Comments

@KopIlya
Copy link

KopIlya commented May 22, 2018

Hello. When update nuget on 2.2.1.0 version. In folder packages in folders net40 and net45 have dll version 2.2.1.0. But in folder netstandard1.5 have dll version 2.0.275.0. This is a bug or feature?
When I debug .netFramework who referenced netstandard project with commandlineparser I have error:

=== Pre-bind state information ===
LOG: DisplayName = commandline, Version=2.0.275.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32
 (Fully-specified)
LOG: Appbase = file:///D:/path/
LOG: Initial PrivatePath = NULL
Calling assembly : NetStandardClassLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\path\NetFrameworkApp.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: commandline, Version=2.0.275.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32
LOG: Attempting download of new URL file:///D:/path/commandline.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
@jay1891
Copy link

jay1891 commented May 23, 2018

Hey, I got a similar binding error and also see these 2 versions in one nuget packages. Is this a bug?

@acg9
Copy link

acg9 commented Oct 12, 2018

Having this same issue using CommandLineParser 2.3.0. If you reference it from .Net framework you reference assembly with version 2.3.0, if you reference from .Net standard you reference assembly 2.0.275.0.

@glennawatson
Copy link

This is causing me issues in Xamarin Android processes.

3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: The "LinkAssemblies" task failed unexpectedly.
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: System.IO.FileNotFoundException: Could not load assembly 'commandline, Version=2.0.275.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32'. Perhaps it doesn't exist in the Mono for Android profile?
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: File name: 'commandline.dll'
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Cecil.ModuleDefinition.Resolve(TypeReference type)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Cecil.TypeReference.Resolve()
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Linker.Steps.SweepStep.ResolveAllTypeReferences(AssemblyDefinition assembly)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Linker.Steps.SweepStep.SweepReferences(AssemblyDefinition assembly, AssemblyDefinition target)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Linker.Steps.SweepStep.SweepReferences(AssemblyDefinition target)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Linker.Steps.SweepStep.RemoveAssembly(AssemblyDefinition assembly)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Linker.Steps.SweepStep.SweepAssembly(AssemblyDefinition assembly)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Linker.Steps.SweepStep.Process()
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Mono.Linker.Pipeline.Process(LinkContext context)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Xamarin.Android.Tasks.LinkAssemblies.Execute()
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

@glennawatson
Copy link

@ericnewton76 I believe this one might have been fixed by your recent .net standard 2.0 adoption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants