-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
dotnet build with runtime specified does not create the right output #527
Comments
Just to clarify - is the platform-specific binaries not getting generated at all or is it getting generated in the wrong folder? |
They are not generated at all on build. I searched them but never found them, so I guess they are not generated. |
@piotrpMSFT @eerhardt @livarcocc I cannot reproduce this with project.json. My steps are below. What am I missing?
|
Nevermind, my problem was that I still had type: "platform" on the Microsoft.NETCore.App ref. Now I see the old behavior described. Thanks to @eerhardt for helping me offline. He also has some reservations about replicating this in msbuild. I'll let him comment on that. |
I just wanted to follow up - is there a work-around to this issue (not being able to cross compile into Mac/Linux) or do we just have to wait for this to be fixed and released? |
Note that when fixing this, we need to ensure <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.0.0-beta-001482-00</RuntimeFrameworkVersion>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
</PropertyGroup>
</Project> To enable this, I think the things that need to be done are:
See https://github.com/dotnet/cli/blob/rel/1.0.0-preview2.1/src/Microsoft.DotNet.Compiler.Common/Executable.cs#L96-L108 for how this worked on project.json based projects. Specifically the |
@vad710 - no workaround for You can use |
@vad710 At least currently, you'll need to pass the -r used for publish to restore as well. |
I used the |
Also pass it to restore: dotnet restore -r [rid] |
You're sure it's working? I just tried different versions of the .net cli and swapped the sdk files with the master repo files, but I still don't get the output |
Nope, I'm on Windows 10. The dotnet publish command still creates a runnable output, but the dotnet build command not with a set rid (at least for me) |
We decided not to change the default output folder this late in the cycle. You can set AppendRuntimeIdentifierToOutputputPath=true to opt in to that behavior. |
Moved from https://github.com/dotnet/cli/issues/5039 on behalf of @Fabi, @nguerrera
Steps to reproduce
Expected behavior
After running the dotnet build -r win10-x64 command a folder with the build files (including an .exe file not only dll) should be created at ".\bin\Debug\netcoreapp1.0<runtime_identifier>"
Actual behavior
There is no runtime folder with executables generated. That only works with the publish command now.
Before on json based project files it worked fine.
Environment data
dotnet --info
output:@nguerrera this is the standalone publish scenario. It should work like this:
on build
Build produces the portable output as well as a RID-specific output. The RID-specific output contains the portable output + the appropriate RID-specific host for the app. That host still uses deps.json, etc. to load Shared Framework artifacts from the nuget cache
on publish
The publish output is RID specific. It includes everything from the RID-specific build output + everything from the RID-specific Shared Framework. The publish output can now be zip'd and then deployed to any host with a matching RID.
The text was updated successfully, but these errors were encountered: