-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSBuild 2017 can't find azure sdk targets file #1888
Comments
Based on Is your build script invoking the MSBuild.exe from Build Tools directly? If so, you probably just need to invoke the MSBuild.exe from the VS installation where you checked the Azure box in the installer instead. If TeamCity is finding that version of MSBuild for you, you might need to uninstall Build Tools so that it can find a more appropriate one. (The root cause of this issue is that Visual Studio now supports side-by-side installations, for example to allow testing an Update Preview without disrupting your primary installation. But the installations may have had different installer options checked, so they may not be all be able to open or build every project. Here, the Build Tools installation is distinct from the VS installations, and doesn't have the Azure targets installed.) |
Yep you are right, the TeamCity agent seems to start MSBuild from build tools:
I probably need to restart my TeamCity agent to find the correct MSBuild version, after i removed build tools. Is there a way to just install the BuildTools with the Azure and F# targets? Those options are not available during the |
They're really not there. The first release of this Build Tools installer doesn't have nearly enough checkboxes. Teams at Microsoft are trying to improve that for the future (but filing bugs on individual SDKs would help with that--we the MSBuild team don't know every SDK that delivers targets and can't do all the work ourselves, since it often involves splitting up the SDK VSIX into a "build extension" part relevant to Build Tools and a "UI stuff" part needed for full VS workloads). See for example #1697 for the .NET Core SDK. For now, the guidance remains that you need to install full VS unless Build Tools works for you already. I'm going to close this issue since MSBuild itself is working as designed. |
If someone comes here looking for the solution to the similar problem for VS 2019, to resolve this, just pass the following argument to the msbuild.exe command line:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\msbuild.exe |
Hi,
I'm not quite sure if this is an Azure SDK related issue or a MSBuild issue, so please just close this issue if it's not MSBuild related.
My build server (TeamCity Professional 10.0.5 (build 42677)) currently can't build my Azure solution (several C# projects and one F# project), because MSBuild tries to find the
Microsoft.WindowsAzure.targets
in the directory:But it is actually in the directory:
[VisualStudioVersion]
can have the following values "Community", "Professional" ,"Enterprise"This issue can be resolved by copying the whole content of the directory, but then I get another error in my F# project:
This issue can be resolved by adding the
/p:VisualStudioVersion=15.0
flag to theMSBuild
task in TeamCity.So yes everything works for me now, but I felt like I should report this. I don't think replacing all files in
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\
is the way to go. The/p:VisualStudioVersion=15.0
flag in TeamCity also feels more like a workaround and not like a solution.I've already created a question on SO (http://stackoverflow.com/questions/42832371 ), but with now response so far.
The text was updated successfully, but these errors were encountered: