-
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
Building existing .fsproj with xplat MSBuild #709
Comments
Does that Maybe I'm unclear on the scenario, though--can you describe it in more detail? |
@rainersigwald "Should we expect the latest xplat MSBuild 14.1 configured like this to be able to compile existing projects that use non-netcore compilers in the build steps? Or do the projects first needs to go through some transformation to use different targets and compiler versions?" My apologies if the question does not make much sense. |
@ncave Perhaps add the "Repro", "Expected", "Actual" description for the issue? With step-by-step repro? Just so we can clarify the expectation and what you're actually seeing in a reproducible step-by-step way |
@ncave I f you are interested, it would be great if you could look at what might be needed and make a proposal, or even a PR. I know that the F# community would help out. Thanks for the report, Kevin |
@KevinRansom Hmmm... For x-plat... Mono XBuild can build existing F# projects just fine. I don't understand why existing projects on Windows wouldn't build just fine with the opensource MSBuild. What's it doing that's not compatible? And what's the point of Microsoft open-sourcing and releasing an non-backwards compatible version of MSBuild? That would seem worse than doing nothing at all, it would needlessly split F# and C# projects between "old" projects (which work with existing tooling) and "new" ones (which only work with new tooling). Perhaps I'm just not understanding this penchant for breaking compat. I thought the open source MSBuild would surely be compatible and able to act as a replacement for the existing MSBuild on Windows. |
This is definitely confusing today and we haven't totally figured out the future yet. I filed some issues to capture what we're thinking about for this. @ncave @dsyme Existing projects on Windows will be able to build with MSBuild 15, but they may require that you build with MSBuild hosted on the desktop CLR. That's because some of the mechanisms used to target the full framework are pretty entangled with CLR features that don't exist in .NET Core, like the GAC. See #713 for details. Mono is an interesting case to compare, because it implements concepts (like the GAC) that were deliberately left out of .NET Core. MSBuild/Mono should be able to build existing projects, just like MSBuild/desktop. And it should be able to do so even on other OSes. But MSBuild/netcore won't be able to resolve from the (nonexistent) GAC on macOS. On Windows, there's a possibility that we could push the full-framework-dependent work into a full-framework executable (#711). But I'm not sure that solves everything. As @KevinRansom mentioned, part of making F# fit fully into the new xplat/.NET Core world will be (re)designing targets so that they don't depend on things that don't make sense in .NET Core. The new targets should be able to produce assemblies that work on both .NET Core and the full desktop framework, but they may have to be constructed slightly differently (for instance, referring to packages when you want platform assemblies, instead of names that get resolved from the GAC). This is ongoing for C# as well, and we can learn from decisions made for that. |
Thank you @rainersigwald and @KevinRansom for the thorough explanation. |
@rainersigwald Yes, thanks for the explanation. I hadn't realized how entangled this was with the fact you're using .NET Core 1.0 to execute the OSS MSBuild. I guess I expected the behaviour of MSBuild to be independent of the machinery being used to execute the tool - though of course the fact that you can load addin tasks into the tool is a big issue too. (Note, we have some similar issues with the F# compiler and F# Interactive scripting tools too - so we know it's not easy) |
@dsyme an example of improve msbuild target (using a new target compatibile with old, but .net core ready), c# is cleaning up in dotnet/project-system#40 |
If I create a new FSharp .fsproj project using the VS2015 F# console project template,
should I be able to build it using the latest xplat MSBuild 14.1 configured like this?
The build fails because paths are incorrect, but even after overwriting the properties with correct paths to F# targets, still getting this:
How can I add this missing dependency to the build task?
The same project builds just fine with MSBuild 14.0 on the same machine, so all the required dependencies are there.
The text was updated successfully, but these errors were encountered: