You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking suggestion by @mholo65 and @patriksvensson on discussion related to #3044
Goal: Define default values for tool settings. For example, MSBuildSettings: set a number of values, and use that as a default when calling MSBuild.
Pseudo-code of possible usage:
varmsbuildDefaultSettings=new MSBuildSettings
{// By default, we want to use MSBuild VS2017 on all tasksToolVersion= MSBuildToolVersion.VS2017,// ... (set other defaults)};
Task("A").Does(_ =>{varmsbuildSettings= msbuildDefaultSettings.Clone(); msbuildSettings.Configuration ="Debug";// ... (override other properties of msbuildSettings as needed) MSBuild("./MyConsoleApp/MyConsoleApp.csproj", msbuildSettings);});
Task("B").Does(_ =>{varmsbuildSettings= msbuildDefaultSettings.Clone(); msbuildSettings.Configuration ="Release";// ... (override other properties of msbuildSettings as needed) MSBuild("./MyConsoleApp/MyConsoleApp.csproj", msbuildSettings);});// ...
The text was updated successfully, but these errors were encountered:
Relates to #2103. This is about adding clone support to the base class ToolSettings whereas #2103 is about adding clone specifically to MSBuildSettings
Tracking suggestion by @mholo65 and @patriksvensson on discussion related to #3044
Goal: Define default values for tool settings. For example,
MSBuildSettings
: set a number of values, and use that as a default when callingMSBuild
.Pseudo-code of possible usage:
The text was updated successfully, but these errors were encountered: