-
Notifications
You must be signed in to change notification settings - Fork 272
Make dotnet build work without having NetFX installed #592
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 without having NetFX installed #592
Conversation
This makes ./build/build.sh compile correctly, but some tests currently fail for netfx. Running: > dotnet test -f netcoreapp2.0 from project root builds correctly.
Hi @joaopgrassi , This is awesome! Thanks! Tested on Mac and compiles main project. 👍 I've sent a PR to add a commit that applies this change to the other csproj files. Unfortunately running If you're happy with that PR, please add it and then I'll merge them both into the main repo. PS: If you've got any ideas for fixing the
|
Hey @dtchepak Great! I didn't want to touch the test projects before getting the green light. I can gladly add your changes to this PR as well. Is that what you meant here?:
I also notice that the project
Sure! I will take a look when I get home and see what I can find. |
Yes, it was just re-applying your change to the other csproj files so I didn't want to make repeat work for you when I could just push up the commit. :) The |
Got it. I'll update this later today with the changes on the test projects :)
If you can pinpoint me to these tests, I can work on porting them :). Also, I will work then on the |
@joaopgrassi Merged, thanks! 👍
Thanks for the offer! I'll take a look through when I get a chance.
Sounds good. 👍 Thanks for the help. 😄 |
@dtchepak pushed again now with the additions also for the test projects. It should be good to go now. Also: I took a brief look at the error while running the tests on linux (using mono). I also got the same as you mentioned. Out of curiosity I did this:
Since the tests pass on .NET Core, and we don't run them on NetFX on CI builds, I'm not sure if we should investigate more. Maybe just skipping them as you said? |
Yeh I think we'll just need to skip them for netfx on non-Windows. Maybe with a comment on the |
.csproj
file to easily identify the supported target frameworksTargetIsNetFx
to easily identify whennetfx
is being used.Tested on WSL (Ubuntu 18.04):
dotnet build
dotnet build -f net45
dotnet build -f net46
As a side note: I think it would be valuable to introuce a Directory.Build.props file in order to improve the overall organization of the
csproj
s files. I took a quick look and I saw there's some repetition in a few things, like:'$(TargetFramework)' == 'net45' OR '$(TargetFramework)'=='net46'"
or<LangVersion>latest</LangVersion>
. These properties can all be defined once in the top-level.props
file and all projects would get these values. This way, the individualcsproj
is even smaller and focused on what they should be focused on. I would be glad to work on it, in case you think it's relevant 😊Closes #335