-
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 publish is ignoring --runtime parameter #46053
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
1 similar comment
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
This issue might be connected with this one #46015 , but I'm not sure. |
@iridin do you have a sample project that reproduces the error, or an https://aka.ms/binlog that you are comfortable sharing? That would let us see more directly what's going on. One immediate question I have is if you have |
should be fixed by #46067 |
Thank you @baronfel for your quick response and for the fix you devised. |
Instead of having to modify your FAKE script, you can set a few environment variables and MSBuild itself will create the binlogs for you, if that's easier. |
Yeah, thanks. Here are the build logs. Hope it helps you verify your fix. |
Yes, I think you would 100% be impacted by the bugs fixed in #46067 - your |
Going to close this now that we've merged a fix. Look for it to ship in the February SDK servicing releases. |
Thank you @baronfel for a swift fix. |
I have just tested daily SDK build https://ci.dot.net/public/Sdk/9.0.103-servicing.25065.25/dotnet-sdk-9.0.103-win-x64.exe and I still see the issue. Is 9.0.103-servicing.25065.25 version expected to have the fix? Where can I find a preview/daily build of the SDK with the fix? Thanks |
@michalkovy the change has made it to the release/9.0.1xx branch, my suspicion is that the nightly releases aren't being updated because most servicing releases are handled 'internally' after each quarter's release. I'll follow up on this and confirm. |
I confirmed that the internal builds do have the change. I can't provide those to you at this time, but you can emulate the change by copying the content of the file that I linked to above to the |
Describe the bug
Since the SDK 9.0.102 version, publishing a containerized application that is intended for multiple platforms, no longer works.
When specifying
--runtime linux-x64
parameter, I can see that the dll is compiled both forlinux-x64
andwin-x64
platforms, subsequently causing the following error:With .NET Core SDK '9.0.101' version and all previous (8.0.x) versions, this worked correctly, compiling only for the specified runtime.
To Reproduce
Call this command to publish the solution (while having Docker switched to Linux containers):
dotnet publish XYZ.sln --configuration Release --runtime linux-x64 /t:PublishContainer /nodeReuse:False /p:Configuration=Release /p:GeneratePackageOnBuild=True /p:ContainerRuntimeIdentifier=linux-x64
Get this output (trimmed for brevity):
Exceptions (if any)
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: