-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can't run Desktop-Compiled MsBuild tasks installed from NuGet #7600
Comments
@madskristensen Is this supposed to work on the CLI with core? |
@livarcocc It's not about Web Compiler itself. It's more about MsBuild tasks in general. From what I see, there are two versions of MsBuild with exactly the same version number. Both run on the same machine. One of them can build my project, and the other one can't. I hope this is not caused by some lightweight feature-less MsBuild being used by .NET CLI. It would make the migration from |
The underlying issue seems to be that there are currently full framework (+ mono specific) and .net core builds of msbuild. |
Lost track of the issues but iirc the idea was that with |
Thanks @dasMulli. Agreed. The packaging of that particular task nupkg causes .NET Core msbuild to attempt to load desktop-compiled task implementations which is not supported for 1.0. Until the 2.0 story becomes more clear, task packages targeting CLI should be authored akin to the SDK package linked above by @dasMulli. |
I have similar error when I build xamarin.forms project with dotnet cli 1.0.1 (build : cee57bf6c981237d80aa1631cfe83cb9ba329f12)
This is my csproj file. I have seen it should be solved in netstandard 2.0. Anyone know workaround solution without rebuild the target package about this? |
I also hit that issue with Xamarin.Forms beta package. If i use the full blown msbuild instead of the dotnet build lightweight msbuild version it all works fine. |
Looks like it is using a PCL tasks assembly. My best guess is that PCL compatibility facade assemblies would need to be deployed with the CLI's msbuild for that to work - which is nontrivial dotnet/msbuild#1542. |
Issue is resolved with newest Xamarin.Forms version! 👍 UPDATE: no it's not. See below. |
Hi ViktorHofer, Thanks for looking into this issue. Thanks again for looking into this issue. |
Yes 2.3.4.224 - just noticed that pack is still not working from the cli. But with Visual Studio 2017 (newest update!) it is working for me now. Also Unit-testing is now working inside VS but not with dotnet test command in cli... |
We're also experiencing this issue. We have a .NET Core app but it runs on the full 4.6.2 framework. We're using Web Compiler for our LESS compilation, and also experience the
error on our build server, which runs Should this be working for us, or do we need to revert back to NodeJS until netstandard 2.0? |
Are you having an ASP.NET Core Application? A netcoreapp doesn't run on full .NET Framework. It either runs as a self contained application (framework bundled with it) or framework dependent (it uses the installed dotnet framework under "C:\Program Files\dotnet". |
Sorry, I get really confused with all these names and how the bits fit together. The project is an ASP.NET Core application, targeting .NET 4.6.2. |
Could you use |
@ViktorHofer same issue here but using msbuild instead is not an option as it runs into a different set of problems in a solution of 50+ projects targeting either netstandard2.0 or net461. Some suggestions say use "dotnet build" instead of msbuild, some other sources suggest the opposite. Problem is none of the two works reliably. Running any of them against a solution file doesn't work at all, so we created our own build tool. It's a big mess from the perspective of a maintainer of old-ish code (net461, old/new csproj file format) and new code (netstandard2.0). It's just sad and disappointing, cause a large amount of wasted time. No need to reopen this issue. Just need to vent somewhere. :-) |
Steps to reproduce
dotnet restore
.dotnet build
.See MsBuildTask.zip.
Expected behavior
WebCompiler.CompilerBuildTask
task should compile the .less file.Actual behavior
An exception is thrown:
It is not related to this particular MsBuild task. AFAIK every task installed from nuget won't work from command line. Everything works when running build with VS 2017 RC (15.0.26020.0 D15REL) or
msbuild
command.Environment data
The text was updated successfully, but these errors were encountered: