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

Task assemblies can mismatch between .NET versions #20062

Open
rolfbjarne opened this issue Feb 8, 2024 · 1 comment · May be fixed by #20623
Open

Task assemblies can mismatch between .NET versions #20062

rolfbjarne opened this issue Feb 8, 2024 · 1 comment · May be fixed by #20623
Labels
bug If an issue is a bug or a pull request a bug fix dotnet An issue or pull request related to .NET (6) msbuild Issues affecting our msbuild tasks/targets
Projects
Milestone

Comments

@rolfbjarne
Copy link
Member

Ref: https://discord.com/channels/732297728826277939/732297808148824115/1205082594757054494


Filip Navara — Today at 10:27 AM

    88>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\tools\msbuild\iOS\Xamarin.Shared.targets(546,3): error MSB4018: The "CompileAppManifest" task failed unexpectedly.
    88>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\tools\msbuild\iOS\Xamarin.Shared.targets(546,3): error MSB4018: System.MissingMethodException: Method not found: 'System.String Xamarin.Localization.MSBuild.MSBStrings.get_W7108()'.
    88>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\tools\msbuild\iOS\Xamarin.Shared.targets(546,3): error MSB4018:    at Xamarin.MacDev.Tasks.CompileAppManifestTaskBase.Execute()
    88>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\tools\msbuild\iOS\Xamarin.Shared.targets(546,3): error MSB4018:    at Xamarin.MacDev.Tasks.CompileAppManifest.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileAppManifest.cs:line 16
    88>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\tools\msbuild\iOS\Xamarin.Shared.targets(546,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    88>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\tools\msbuild\iOS\Xamarin.Shared.targets(546,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
    
    does this ring any bells? .NET 8.0.200-preview.23624.5 SDK, VS 17.9.0 Preview 4.0
    (I know it's a "missing file" error, not really asking about the underlying cause, just the localization bundling issue)

Rolf — Today at 10:31 AM

    that's weird, W7108 is in the initial .NET 8 release
    is this a .NET 7 project?
    or are there .NET 7 projects in the solution?

Filip Navara — Today at 10:32 AM

    It was .NET 7 project and I bumped it to .NET 8.
    There are other .NET 7 projects in the solution, possibly even some iOS library projects
    so yeah, it would make sense that it can collide within the same VS instance

Filip Navara — Today at 10:40 AM

    yep, goes away if I retarget everything and restart VS
    (in fact, even the build error goes away)

See also #9835, where a fix was attempted (but apparently not enough).

@rolfbjarne rolfbjarne added bug If an issue is a bug or a pull request a bug fix msbuild Issues affecting our msbuild tasks/targets dotnet An issue or pull request related to .NET (6) labels Feb 8, 2024
@rolfbjarne rolfbjarne added this to the .NET 9 milestone Feb 8, 2024
@rolfbjarne rolfbjarne added this to Bugs in .NET 9 Feb 8, 2024
@rolfbjarne
Copy link
Member Author

Also internally: https://teams.microsoft.com/l/message/19:53507cb282f14829aff9c6bd9ef183ad@thread.v2/1716290507008?context=%7B%22contextType%22%3A%22chat%22%7D

The "FindItemWithLogicalName" task failed unexpectedly.System.MissingMethodException: Method not found: 'System.String Xamarin.Localization.MSBuild.MSBStrings.get_M0149b()'. at Xamarin.MacDev.Tasks.FindItemWithLogicalName.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue May 21, 2024
…marin#20062.

Version the Xamarin.Localization.MSBuild assembly correctly (instead of
hardcoding a 1.0.0 version - implicitly so because no version was set), so
that we can load multiple versions of the assembly into the same process.

Fixes xamarin#20062.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug If an issue is a bug or a pull request a bug fix dotnet An issue or pull request related to .NET (6) msbuild Issues affecting our msbuild tasks/targets
Projects
Development

Successfully merging a pull request may close this issue.

1 participant