-
Notifications
You must be signed in to change notification settings - Fork 42
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
Clean up! (Fixes #21) #23
Conversation
1. Added Sdk support (this only works if the `MSBuildSdksPath` is set or you can copy it to the Sdks folder in VS2017 Installation) 2. I separated the targets by platform along with setting the language targets. (i.e. MonoAndroid -> MonoAndroid.targets, etc...) 3. Added support for generic short frameworks of form (fx.nameNN.N-profile1<+profile2+...>) 4. Some little fixes here and there. (automagically because of restructuring and clean-up) Other than that all of the behaviour remains the same. Almost all private properties' (_SdkExtras...) names are changed, since they are not clear and not to the context.
I used tabs instead of spaces. Oh my reformat tool! 🤣
First thank you, I know this is a lot of work as there's a large surface area here. Overall, I like the improvements. I would ask though that the private variables be restored, or at least prefixed with Also, there seem to be a bunch of extra Given that these are hard to test, I just wanted to see how you've been testing these and ensuring the functionality? Thanks again, it's just a lot of changes and will take time for me to verify as well. |
i.e Removing Import Conditions for sure present files. Also fixed NuGet.Build.Tasks.Pack Imports
I went through the
I ported over these from my repo and it had a lot of redundant checks. It's all fixed now!
|
NuGet.Build.Tasks.Pack v4.3.0 fixes many issues that caused pack to fail with previous versions, there were some workarounds around satellite assemblies and pri files, now those are not needed.
Test with Tizen.NET (need to verify)
Does the NuGet workaround still work with the 1.0.0-1.0.4 SDK? What pulls down the |
Also, the |
The biggest Q is the NuGet one to make sure the workarounds still work on older SDK's. Otherwise, it looks good -- I need to test it more, but I can make some minor clean-ups like the DebugType. |
It works in my setup. Also I deleted the package in my
I'm still testing it. Need to setup a clean VM to test them. Will take a day or two. |
Xamarin SDK supports Portable PDBs now
I removed them. Thanks for the tip. |
I just don't see how the NuGet pack 4.3 targets get downloaded initially...something has to do that. I don't think it's safe to do that without knowing how it'll work. |
See the Restore log. I didn't assume, It worked! And I knew It would work!! 🤗👍👌 Don't worry I'm testing with my personal projects. If it doesn't work I'll revert them, that's why we have git right? 😄 |
When you test, make sure to also have a |
1. Verfied on .NET SDK 1.x-2.x 2. Updated ReadMe.
Everything works just great! We can ship it! |
I have a better idea re the pack targets. How about this -- detect if someone tries to call pack (override the right target or add a BeforeTargets target, and if the SDK version is < 2.0, just throw an error that says there are known issues and to use the 2.0+ SDK to build. The error can be in a condition so it can be suppressed if set at the command line. Then all the NuGet workarounds can go away completely. I think it's better to tell people just to use the latest SDK rather than ship 1.x workarounds... |
It's all fixed now. Works perfectly with all the SDKs! Also please take a look at the review comments. |
Yes, I saw, but still need to test. I'm not sure how the dotnet 1.0.4 SDK would be downloading the nuget pack targets though... |
I've tested with all the SDKs, It works perfectly fine. No issues so far! Even if I missed out any issues, point them to me, I'd be happy to resolve them. |
Thank you -- I've merged this in and made a few changes beyond this. I've pushed out a preview package to NuGet ( |
Nice Changes... Building with If we can, then I can use variants of test projects to test them out, I'll refer to dotnet/sdk tests |
One thing I don't understand is NuGet workarounds, even 1.x sdks can no longer need that except the ones exclusively for that sdk, why are you including them back? If you don't want a dependency then I find a way to dynamically pull them in. |
I'm not sure if ProjectReference won't do that targets/props import the same way as a package, I have not tried it. Not sure I understand the issue with the workarounds? I definitely don't want to have a dependency on the nuget pack package, since they're only needed for the 1.x SDK. I don't want to get out-of-sync as that revs higher for a limited case. For 1.x people who can't move to the 2.0 SDK, at least there's a workaround. |
I definitely agree.
Ok, I understand where you might got me wrong. The dependency on the package does not add it too the latest SDKs. It's only for the 1.x SDKs. I'll try to dynamically pull them in. I did this for my internal SDKs, might be able to port over here easily. |
Can I ask why there's a need for https://www.nuget.org/packages/MSBuild.NET.Extras.Sdk? I'm happy to take PR's here, as you can see, just looking to avoid confusion in the community. Thanks |
That's for myself, more like a private one, It should only contain pre-release packages, even though they are stable packages. I test new things there. Also that Package contains overrides for some defaults that I don't very well receive in the People always use stable packages, so I thought It wouldn't confuse them. Can I can include a message saying it's private and ask them to use yours? |
If you're looking to test things, I'd suggest checking out MyGet.org -- you can get a free public feed there and that's usually where I test things out. Would that work? :) |
This PR is from that repo, after exhaustive testing, I might say 😇
I'm using MyGet, only for CI and those are not stable. plus NuGet is the default provider. |
MSBuildSdksPath
is set or you can copy it to the Sdks folder in VS2017 Installation)Other than that all of the behaviour remains the same.
Almost all private properties' (_SdkExtras...) names are changed, since they are not clear and not to the context.