Open alexeygritsenko opened 1 week ago
I don't believe this is related to the MAUI UI project. This is dotnet Android SDK tooling. Can you try this in a dotnet Android project (dotnet new android
) that doesn't implement the MAUI UI tools? If it fails there, then I think you want the android tooling repo instead. @jonathanpeppers what do you think?
Hi @alexeygritsenko. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
@alexeygritsenko I would imagine this works fine with dotnet build
? And it's only broken in Visual Studio or .NET framework MSBuild.exe
?
@drasticactions, Yes, this is reproduced in android native project (without MAUI), I didn't know that you have dotnet/android repo. Sorry if I posted this topic in the wrong place. @jonathanpeppers, I did not think about that. You're right. I just checked through the command line and there is no such error.
In this case, when can I expect Visual Studio support?
While we should of course address this root issue, also note that we already maintain an okhttp3
binding: https://www.nuget.org/packages/Square.OkHttp3.
I had a memory of "how does this work without us shipping NuGet.ProjectModel.dll
"?
But I can't remember where I posted that comment:
While we should of course address this root issue, also note that we already maintain an
okhttp3
binding: https://www.nuget.org/packages/Square.OkHttp3.
Thanks. As for Square.OkHttp3 library, I know that it already exists in Nuget, I was just interested in testing how it works. In the future, I want to connect libraries that are not available on Nuget in this way, for example mikepenz/FastAdapter
I had a memory of "how does this work without us shipping NuGet.ProjectModel.dll"?
I suspect it works because the msbuild
process will very likely already have the NuGet libraries loaded in order to do the project build. However they may not be the version we expect, or perhaps a VS build can be broken up into small enough pieces that NuGet isn't in that msbuild
process.
I think we will likely need to ILRepack
the libraries to ensure we always have and use our expected versions.
I think we will likely need to ILRepack the libraries to ensure we always have and use our expected versions.
I wanted to remove ILRepack
, can we just ship the assembly like we normally would?
@drasticactions, Yes, this is reproduced in android native project (without MAUI), I didn't know that you have dotnet/android repo. Sorry if I posted this topic in the wrong place.
No worries! It's hard to tell sometimes where issues should go, since these tools are so interlinked and the brands can make it hard to tell what is going on. We just wanna make sure it gets to the right place. It's always better to file an issue somewhere than not file it at all.
I wanted to remove ILRepack, can we just ship the assembly like we normally would?
Given that there is very likely a copy of this assembly already loaded in the msbuild
process, and it may not match our version, I think we need it ILRepack'd but I could be wrong. I would think the same about other assemblies we currently ILRepack like Newtonsoft.JSON
as well.
No it's strong named and versioned, so it should work to just ship a copy.
No it's strong named and versioned, so it should work to just ship a copy.
That should work for .NET framework which supports strong naming, but I suspect it won't work on .NET 6+ which doesn't check strong names.
For .NET Core and .NET 5+, strong-named assemblies do not provide material benefits. The runtime never validates the strong-name signature, nor does it use the strong-name for assembly binding.
(https://learn.microsoft.com/en-us/dotnet/standard/assembly/strong-named)
For example, let's say we use an API added in Newtonsoft.Json
12.0
, and a user's project includes another MSBuild task assembly that references and ships Newtonsoft.Json
11.0
.
On a dotnet build
, if their MSBuild task assembly is loaded first it will load 11.0
and I suspect our task would fail.
Description
Hi, I'm looking forward to AndroidMavenLibrary, this is what I've been waiting for for a very long time and want to try. After all, for full-fledged development, we always lacked the libraries that developers use in Android Studio.
So I installed: VS 2022 Preview .NET 9.0 Preview 5 .NET 9.0 MAUI Workload
And added to Android Binding project
then output error:
Steps to Reproduce
see above
Link to public reproduction project repository
No response
Version with bug
Unknown/Other
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response