Skip to content
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

Build: how to get release configuration packages? #28244

Closed
Wraith2 opened this issue Dec 20, 2018 · 2 comments · Fixed by #40134
Closed

Build: how to get release configuration packages? #28244

Wraith2 opened this issue Dec 20, 2018 · 2 comments · Fixed by #40134

Comments

@Wraith2
Copy link
Contributor

Wraith2 commented Dec 20, 2018

I'm working with System.Data.SqlClient making some perf improvements. To produce sensible PR's in need to show the performance difference before and after my changes. I'm having trouble doing this and my options keep decreasing.

I can't use BDN and advanced inner-loop method because because I can't get BDN to work with CoreRun correctly issue and I can't use a profiler anymore because it is no longer compatible with .net core. So I need to produce packages and consume them.

The only way to reliably produce a package seems to be to use build -allconfigurations but i'm having problems with that as well. A clean master will produce a nuget package in artifacts\packages\Debug that BDN (in inproc mode) will accept and use because it's compiled in release configuration. I know it has to be this package because i'm forcing the version in the project and that version can only come from my build folder, my nuget.config file only includes the debug packages directory.

I've just done a clean -all and build -allconfigurations on my branch and when I clear the nuget cache and restore the reference to my newly compiled package version then run I'm told that the package isn't compiled in release mode. There are a lot of asserts in the library, the debug and release versions are 200K+ different in size and so there will be a performance difference if I disable the debug warning in BDN. I need a release version. My branch contains no changes to the build configuration or any project files, the code changes are very small and isolated.

So if you're still following in want to build nuget for System.Data.SqlClient which contains release configuration binaries. First I delete the nuget package from artifacts\packages\Debug because I want to recreate it and be certain I've rebuilt it. Now I need to re-create it.

  • build src\System.Data.SqlClient\pkg [|-release|-debug|-allconfigurations] command completes successfully but does nothing, the package isn't re-created
  • build src\System.Data.SqlClient -release /p:BuildPackages=true command completes but doesn't create the package
  • dotnet msbuild src\System.Data.SqlClient\pkg\System.Data.SqlClient.pkgproj fails with an msbuild task error, will file an issue.
  • build /p:BuildAllConfigurations=true /p:BuildNative=false /p:BuildManaged=false /p:BuildPackages=true creates a package with debug build inside

So. How? Any why would code only changes affect what binary gets put into the nuget package?

@Wraith2 Wraith2 changed the title Build: release packages Build: how to get release configuration packages? Dec 20, 2018
@ViktorHofer
Copy link
Member

Sorry that you hit all these kinds of issues. There is currently a bug that binaries don't have a unique configuration location means that debug and release overwrite each other. cc @ericstj

Have you tried the following commands together?

dotnet msbuild src\System.Data.SqlClient\src /p:ConfigurationGroup=Release
build src\System.Data.SqlClient\pkg

@Wraith2
Copy link
Contributor Author

Wraith2 commented Dec 21, 2018

I have now, They complete but the package in artifacts\packages\Debug isn't rebuild, a Release one isn't generated. The package rebuild just doesn't seem to work unless my expectation of the output location is wrong.

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the Future milestone Feb 1, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@ViktorHofer ViktorHofer removed the untriaged New issue has not been triaged by the area owner label Jul 8, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants