Closed espritm closed 2 weeks ago
@espritm Could you share a build binary log after building for DebugEV1
?
You can produce a build binlog by setting the MAUI Debug Verbosity to diagnostic
from Settings -> Extensions -> .NET MAUI
. A file named msbuild.binlog
will be created next to your solution file.
Thanks @emaf Please find the msbuild.binlog here : msbuild.binlog.zip
I have upgraded to latests pre-releases versions : C# v2.26.13 (pre-release) C# Dev Kit v1.5.14 (pre-release) .NET MAUI v0.11.16 (pre-release)
@emaf, the 'needs-more-info' label has been removed upon receiving further response from the original bug filer.
This issue is related and shares root cause to this other one: https://github.com/microsoft/vscode-dotnettools/issues/1072 It was also opened by the same customer. Linking for tracking purposes
Thanks @espritm!
From what I can see in the binary log, EV1Constants.cs
is what is passed to the compiler and not EV2Constants.cs
. What are you seeing that would signal EV2Constants is being used to compile?
If you are curious about the binary log, you can inspect it using the MSBuild Structured Log Viewer.
Hello @emaf thank you for your answer and the link to the log viewer !
The URL used was "ev2.com" instead of "ev1.com", which is configured in those Constants.cs files.
But, I confirm upgrading to the latest pre-release versions have fix my issue: I have downgraded and analysed the binlog with this, the wrong file was taken. And with latests pre-release version of C#, C# Dev Kit and .NET MAUI extensions, the right file is taken.
Awesome! Thanks for confirming this is now fixed!
Describe the Issue
I am migrating from .Net7 to .Net8 a MAUI application project. So I need to migrate from VS For Mac to VS Code too.
I have several build configurations, DebugEV1, DebugEV2 (and other for prod and release..). But I cannot use them successfully is VS Code.
Steps To Reproduce
Here are my config :
In my csproj :
In my solution folder, the EV1Constants.cs and EV2Constants.cs files, of course as well as the BuildConfigurations folder containing them. Note that this works fine in VS For Mac for years (Xamarin.Forms > .net6 Maui > .net7 Maui).
To migrate to VS Code, I had to create a launch.json file with the following :
From there I retrieve my lovely combobox "Run And Debug" DebugEV1 or DebugEV2, and it builds fine, it even run on simulator (a pleasant success after 1 week of hard try). In my bin obj folders I have the rights folder : bin/DebugEV1 or bin/DebugEV2
But, in all cases, the content of EV2Constants.cs file is used.. Where the content of EV1Constants.cs should be used if I build with DebugEV1 configuration.
Expected Behavior
If I build with the configuration DebugEV1, the EV1Constants.cs file should be used for compilation. If I build with the configuration DebugEV2, the EV2Constants.cs file should be used for compilation.
Environment Information
Visual Studio Code Version: 1.88.0 (Universal) Commit: 5c3e652f63e798a5ac2f31ffd0d863669328dc4c Date: 2024-04-03T13:28:18.899Z (6 days ago) Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Darwin arm64 23.1.0
.NET MAUI extension v0.9.7
C# extension v2.23.15
C# Dev Kit v1.4.29
dotnet 8.0.203
VS For Mac 17.6.10 (build 428) | VS Bug 2032240