-
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
Support "portable" (.NET Standard 2.0) tasks #2738
Comments
Does the world get simpler here if we change the minimum required desktop version of MSBuild to be 4.6.1? |
I've resolved this with my latest changes. GenAPI creates source files which are used to create reference assemblies that go in the NuGet packages. The MSBuild APIs themselves are still compatible with .NET Standard 1.3, so I am compiling the reference assemblies for .NET Standard 1.3 in addition to .NET 4.6 and 2.0, and putting them all in the NuGet package. |
It looks like this may be a problem once again. Enabling binary serialization is causing types to be used in public APIs which aren't available in .NET Standard 1.3. |
Cross-linking this with dotnet/sdk#1855 (comment) by @ericstj
|
This mostly works today: if your task has no references outside of .NET Standard 2.0 itself, it'll work fine on both flavors of MSBuild. This part remains
And we should still publish better guidance (#4198). |
Currently, MSBuild targets .NET Standard 1.3 and .NET Framework 4.6. If you want to build a task that runs on both .NET Core and full framework MSBuild, you can reference the .NET Core versions of the MSBuild libraries, which target .NET Standard 1.3. When running on full framework MSBuild, these references would bind to the full framework implementations (similar to the "bait and switch" technique).
As part of upgrading to .NET Core 2.0, the .NET Core versions of the MSBuild libraries will target .NET Standard 2.0. This means they won't load on .NET 4.6. They can load on .NET 4.6.1, but the proper .NET Standard facades need to be available.
The text was updated successfully, but these errors were encountered: