NickCraver / StackExchange.Exceptional

Error handler used for the Stack Exchange network
https://nickcraver.com/StackExchange.Exceptional/
Apache License 2.0
859 stars 170 forks source link

Unable to build the solution because Microsoft.WebApplication.targets is missing #141

Closed stijnherreman closed 4 years ago

stijnherreman commented 5 years ago

I'm not able to build from source, the following error is displayed:

Project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" was not imported by "C:\Users\herremanst\Desktop\StackExchange.Exceptional\samples\Samples.MVC5\Samples.MVC5.csproj" at (38,3), due to the file not existing.

I have the latest VS 2017 installed with the ASP.NET and web development workload enabled. I thought I'd have to install the Build Tools, but that seems to default to installing in C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools with installation nickname 2.

The file does exist in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications.

How should I proceed?

NickCraver commented 5 years ago

How are you trying to build it? The build failure in the .ps1 is expected at the moment, only Visual Studio can build the solution (only it sets the variable). The reason the .ps1 doesn't work is the inability for dotnet to build ASP.NET non-Core projects (see my issue over at https://github.com/dotnet/project-system/issues/2670). I'm working a bit with the MS Build team on using the traversal SDK but there are some issues with it I haven't gotten time to follow-up on. For now, the solution failing is annoying, but not a blocker. It's rough supporting old and new projects at the moment.

stijnherreman commented 5 years ago

I'm building from within VS, just building the solution. I can probably just unload that one project and build without it, as a workaround.

NickCraver commented 4 years ago

This should finally be resolved with latest SDK tooling. The build has also moved to the Traversal SDK to build the right things and eliminate build warnings. Additionally, tests should also run correctly on Linux (and do so in a GitHub Actions build now) :)