-
Notifications
You must be signed in to change notification settings - Fork 90
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
Microsoft.WebApplication.targets was not found #398
Comments
This looks similar to dotnet/vscode-csharp#1368. |
It's not the same as dotnet/vscode-csharp#1368. However, it would be good to get your full OmniSharp Log. In addition, what version of Mono do you have installed? |
@DamienCassou are you using the bundled server installable via @DustinCampbell on MacOS and Linux in omnisharp-emacs we are using the "specialized" server code from omnisharp-roslyn/releases page per platform, that have mono bundled. |
the bundled version. I let omnisharp-emacs do everything. |
@razzmatazz yes, but OmniSharp does not include all of the MSBuild targets necessary to process every possible project. It just contains a minimal set. In particular, a .NET Framework Web Application targets are not included with OmniSharp, so it would try to locate them within a Mono installation on Mac/Linux. @DamienCassou: From the log above, it looks like it the |
@DustinCampbell: I'm on Fedora 26. I tried to follow the instructions on the link you gave me, but this results in conflicts with the package system:
|
Did you use the CentOS instructions? Those have worked for me on Fedora 26. Regardless, if you can't update, you might be able to fix the issue by dropping an {
"MsBuild": {
"MSBuildExtensionsPath": "/usr/lib/mono/xbuild"
}
} |
Dustin Campbell <[email protected]> writes:
Did you use the CentOS instructions? Those have worked for me on Fedora 26.
yes. This resulted in the addition of a
download.mono-project.com_repo_centos7_.repo file in
/etc/yum.repos.d. Still, this does not work.
Regardless, if you can't update, you *might* be able to fix the issue
by dropping an `omnisharp.json` file at the root of your repo with the
following content:
```JSON
{
"MsBuild": {
"MSBuildExtensionsPath": "/usr/lib/mono/xbuild"
}
}
There is no xbuild in /usr/lib/mono:
4.0-api -> 4.5
4.5
4.5-api -> 4.5
dbus-sharp-2.0
dbus-sharp-glib-2.0
gac
gtk-sharp-2.0
mono-configuration-crypto
monodoc
notify-sharp
nunit
webkit-sharp
…--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
|
Ok. That explains why OmniSharp didn't work correctly. It does sound like you'll need a newer Mono to get the WebApplication.targets on your machine that are needed to open this project. I don't know why the CentOS packages aren't working for you. Unfortunately, they've always worked for me so I've never had to troubleshoot them. I'll try setting up a new Fedora 26 VM today and see if those packages still install for me. |
FWIW, I just tried on a clean Fedora 26 VM and was able to
|
@DustinCampbell I gave it another shot and I managed to install 5.4 (I had to delete some packages for that). I still have the same message though. Here is an extract of the log:
2 things to note from this log:
Now, the
Even though there is no 5.4 entry there (should there be one?), I confirm I'm using 5.4:
|
I still suffer from the same problem. Can anyone help me? |
Try installing the Mono msbuild package: |
Thank you @DustinCampbell. This makes omnisharp-emacs basically working again. However, the error message still appears in the log
and I still get compilation errors that should not be there
Here is my log now:
|
@DamienCassou have you tried commenting out the lines with you might not need those targets for building/loading in omnisharp because, I think:
|
this removes the error I had.
I have no such thing in any file of my project.
the solution loads even when keeping the |
Sorry, most probably I did not understand you before. Are those errors you listed in your previous comment blocking your workflow with omnisharp-emacs or just something that is shown on the log (but everything works ok otherwise)? |
Saulius Menkevičius <[email protected]> writes:
Sorry, most probably I did not understand you before. Are those errors
you listed in your previous comment blocking your workflow with
omnisharp-emacs or just something that is shown on the log (but
everything works ok otherwise)?
Everything works ok now as far as I can tell. But I'm still surprised by
the amount of warnings in the log.
…--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
|
Regarding WebApplication.targets, our project has: <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> Do you see anything suspicious there? When using omnisharp, I have the impression that the first line triggers this error:
Using
Is there something we could fix on the project to make it work for everyone? |
Omnisharp complains about missing WebApplication.targets. I have no clue what that means.
In fact, there is no
xbuild/
directory under v1.24.0. I can reproduce the problem with latest omnisharp-emacs and v1.26.0.The text was updated successfully, but these errors were encountered: