-
-
Notifications
You must be signed in to change notification settings - Fork 761
Don't hardcode NuGet source #2076
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
Conversation
So, it looks like on my local machine, that file should be found from Currently, when building packages, the script attempts to find msbuild in this order:
I propose that if there is an msbuild available in the environment, we should use that, otherwise it should look for the version bundled with Visual Studio before the standalone MSBuild. I don't know that any scenario is foolproof, unless maybe we search specifically for Thoughts @tpluscode @galatrash @ahoefling @mitchelsellers? |
This is tricky abit. When I created this batch file I tried under different environment but was not exhaustive. I didn't want to look in the registry which requires elevated rights; I wanted it to be simple CLI job. If you have a better way to do it, please do and submit a PR. |
@@ -140,7 +140,7 @@ | |||
</Target> | |||
|
|||
<Target Name="NugetRestore"> | |||
<Exec Command="$(PlatformCheckout)\.nuget\NuGet.exe restore "$(PlatformCheckout)\DNN_Platform.sln" -Source https://api.nuget.org/v3/index.json"/> | |||
<Exec Command="$(PlatformCheckout)\.nuget\NuGet.exe restore "$(PlatformCheckout)\DNN_Platform.sln""/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact the used sources are already added in the "$(PlatformCheckout)\.nuget\NuGet.Config
file. So, this change is ok.
@bdukes :
I agree that we should pull msbuild out of the environment. We should pick a minimum version of visual studio and support that version to the latest. I have always found it weird that the script looks for a particular version of msbuild and tries to fall through to the next. I'm sure there was a great reason for it but this has the potential to cause a lot of build side-effects.
|
I pushed the change to the build scripts which uses the MSBuild available in the environment, and only looks in those specific paths if it isn't defined. I think there may still be something off with the script, because it generates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good to me, hopefully it'll get us closer to consistent builds across different environments. Thanks @bdukes for submitting the pull request!
This has been approved by two reviewers, is there anything holding up a merge? |
With a clean clone, there are still issues running
./Build_Install_Package.bat
, the first of which is an error resolving the new ClientDependency NuGet package from #2068. Currently, this PR fixes that NuGet issue by adjusting thenuget restore
call done in the build process to use thenuget.config
file instead of passing a-Source
URL directly.At this point, I'm now getting errors from the
DotNetNuke.Modules.DDRMenu
andDotNetNuke.Modules.HtmlEditorManager
projects: