-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
|
Any reason not to use If we add "tools": {
"vs": {
"version": "15.9",
"components": [
"Microsoft.Net.Component.4.6.TargetingPack",
"Microsoft.VisualStudio.Component.PortableLibrary",
"Microsoft.VisualStudio.Component.Static.Analysis.Tools",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.VisualStudio.Component.VC.140",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.Component.VC.Runtime.UCRTSDK",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.Component.Windows10SDK.17134",
"Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop.arm",
"Microsoft.VisualStudio.Component.VC.Tools.ARM",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64"
]
}
}It will automatically pick up VS MSbuild at build time only for Windows architectures. Last time I tried this we had issues with it working with run.exe due to the default parameters obtained from config.json. However, I have a feeling this might just work now. |
|
Agree with @hoyosjs that using arcade's msbuild detection in
I'm also fine with the current change since we will need some kind of wrapper script either way. We could use arcade vs detection in a later change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer a name like vs_msbuild.cmd, just a suggestion.
cmake_msbuild.cmd
Outdated
| @@ -13,12 +17,6 @@ if NOT '%ERRORLEVEL%' == '0' exit /b 1 | |||
| set Platform= | |||
| set __ProjectDir= | |||
|
|
|||
| :: Restore the Tools directory | |||
| call %~dp0init-tools.cmd | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just asking because I'm not familiar enough with all that buildtools does for our repo, but do we never have a case where this script could be called without having initialized tools? This uses the semaphore so it should be a no-op if left in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init-tools should not be used for cmake use cases. Since I am explicitly trying to eliminate build tools references and trying to make this support the cmake usage only, I deliberately removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, if it's only used for generating the vcxproj then this is a good idea. I just wasn't sure if we had any native-build targets that come from this that any native build flavor would depend on :) But most likely that would be caught by a screaming CI.
cmake_msbuild.cmd
Outdated
| :: Windows CMake has a dependency on desktop msbuild.exe because it generates | ||
| :: Visual Studio *.vcxproj solutions. | ||
| :: This file has cmake in its name to avoid accidentally introducing | ||
| :: another dependency on desktop msbuild.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes 👍 I like this
|
@sbomer @hoyosjs I had considered eng/common/msbuild et al. Given the need for two msbuild engines, I assumed it might be difficult for arcade to support both, but hadn't gotten a chance to look at it yet. I will probably deliberately limit the components in tool.vs so that it doesn't easily build managed code. Most of the recommended change logically belongs in #22755. I will do it there.
I am on the fence. |
|
I am going to move the cmake_msbuild.cmd patch back to #22755. |
4a8b721
to
791a338
Compare
|
I think it would be good to explore using |
|
@jkoritzinsky You may be right, but adding to global.json has a nice advantage of describing (and hopefully installing) the build dependencies. It is moved to #22755 now. |
|
@jkoritzinsky's approach may be better. Having two msbuilds is not easily supported as there are early outs if the build tools have been installed. |
Commit migrated from dotnet/coreclr@e7289a7


Distinguish between msbuild for cmake which require desktop msbuild.exe, and other cases which should all use
dotnet msbuildFix small bash syntax error.