Skip to content
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

make "dotnet build" work on non-Windows platforms #1449

Merged
merged 8 commits into from
May 21, 2019

Conversation

filipw
Copy link
Member

@filipw filipw commented Apr 9, 2019

This follows a similar solution from the F# compiler dotnet/fsharp#4391

We now import Mono reference assemblies to allow commands like dotnet build or dotnet test to work outside of Windows.
This simplifies and helps development as you can quickly build without having to use the build script and it's bootstrapping features.

At the moment trying to run dotnet build on non-Windows against omnisharp-roslyn results in a flood of errors like these:

The reference assemblies for framework 
".NETFramework,Version=v4.7.2" were not found. To resolve this, install the
 SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or
 Targeting Pack installed. Note that assemblies will be resolved from the
 Global Assembly Cache (GAC) and will be used in place of reference 
assemblies. Therefore your assembly may not be correctly targeted for the 
framework you intend.

@@ -6,6 +6,8 @@
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>

<Import Project="../../build/netfx.props" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be brought in via Directory.build.props or Directory.build.targets?

Seems silly to have to add it to all project files if we could avoid it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that but it doesn't get loaded at all then. Seems like <Import Project="..." /> doesn't work via those extensibility points.

@filipw
Copy link
Member Author

filipw commented May 20, 2019

I have removed the original quite "hacky" approach and used the new Microsoft.NETFramework.ReferenceAssemblies (see dotnet/designs#33 (comment)). This is now a clean approach and should be good to merge.

@filipw filipw merged commit d642aef into master May 21, 2019
@filipw filipw deleted the feature/dotnet-build-unix branch May 21, 2019 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants