Closed gfraiteur closed 8 months ago
Hello @gfraiteur, thank you for submitting this issue. We will try to get back to you as soon as possible. Note to the PostSharp team, this ticket is being tracked in our dashboard under ID TP-33579.
May I suggest to convert LamaDebug to a MSBuild property only that can be true rather than a Configuration? Often projects have important existing configuration that wont be set when selecting LamaDebug and compilation can fail.
Alternatively there is a trick to allowing a configuration condition without the configuration being automagically imported into the UI etc that I know of and use myself.
The reason we chose this approach (the LamaDebug
configuration) is that it is automatically imported into the UI.
It is a shortcut for three MSBuild properties. See https://doc.metalama.net/conceptual/configuration/msbuild-properties#build-configurations
I see. The problem is that all our builds require other properties to be set to build correctly, so LamaDebug
will never actually build. I imagine this is fairly common, since build configurations are vital to building your project correctly, and LamaDebug
only contains properties for Metalama.
An MSBuild property MetalamaCreateLamaDebugConfiguration
has been introduced in Metalama 2023.4.4-preview. Set this property to false
to avoid adding the LamaDebug configuration. You can also set the required properties for the LamaDebug build configuration in your .csproj file or Directory.Build.Props
as follows:
<PropertyGroup Condition="'$(Configuration)'=='LamaDebug'">
<MyProperty>Value</MyProperty>
</PropertyGroup>