Is it possible to build installer using local corefx packages?
We have a complete fork of corefx with slightly modified cryptography and would like to build sdk and redist for it.
I've tried to add local package source (\corefx\artifacts\packages\Debug) to dir.props and NuGet.config, but after I run build -SkipTests=true the following happens:
C:\_self\git\core-setup\Tools\dotnetcli\sdk\2.1.401\NuGet.targets(114,5): error : The local source 'C:\_self\git\core-setup\tools-local\tasks\https:\dotnetfeed.blob.core.windows.net\dotnet-core\index.json' doesn't exist. [C:\_self\git\core-setup\tools-local\tasks\core-setup.tasks.csproj] [C:\_self\git\core-setup\build.proj]
C:\_self\git\core-setup\build.proj(60,5): error MSB3073: The command ""C:\_self\git\core-setup\Tools/dotnetcli/dotnet.exe" restore --packages "C:\_self\git\core-setup\packages" --source C:\_self\git\corefx\artifacts\packages\Debug --source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json --source https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json --source https://www.myget.org/F/nugetbuild/api/v3/index.json --source https://api.nuget.org/v3/index.json --source https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json --source C:\_self\git\corefx\artifacts\packages\Debug --source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json --source https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json --source https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json --source https://www.myget.org/F/nugetbuild/api/v3/index.json --source https://api.nuget.org/v3/index.json --source https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json "C:\_self\git\core-setup\tools-local\tasks\core-setup.tasks.csproj" /p:OSGroup=Windows_NT /p:PortableBuild=true /p:TargetArchitecture=x64 /p:ConfigurationGroup=Debug /p:VersionSuffix=preview-27503-0 /p:OutputRid=win-x64" exited with code 1.
Looks like nuget get part of online source path as local path. Is there any solution to this or other correct way of building from local corefx?
It looks like you hit known CLI/NuGet bug https://github.com/dotnet/cli/issues/8149. It's pretty silly: the local source can't be the first one. Try moving your local source in dir.props to be after an internet source and see if that works.
One more thing: you need to change the corresponding versions in eng/Versions.props to match what you built. After that, I'd expect this approach to work and give you a shared framework installer.
Another way to do this is to use the source-build process: https://github.com/dotnet/source-build/tree/master/Documentation#building-a-custom-net-runtime. However, source-build master is currently on 3.0 Preview 2 commits, which might be too old for your branch.
I'm going to close this as answered, but please do comment again if you have any more trouble. 馃檪
@dagood thanks a lot! I'll give it a try next week.
Most helpful comment
Another way to do this is to use the source-build process: https://github.com/dotnet/source-build/tree/master/Documentation#building-a-custom-net-runtime. However, source-build
masteris currently on 3.0 Preview 2 commits, which might be too old for your branch.