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

Add .NET Core builds #264

Closed
wants to merge 10 commits into from
Closed

Conversation

chwarr
Copy link
Member

@chwarr chwarr commented Nov 11, 2016

Note to reviewer/merger: please perform a full merge commit for this.

GitHub is bad about tracking history of code and comments when rebasing. Since this PR consists of multiple commits we want to merge, I'm manually tracking the "iterations" of the PR in branches in my fork.

Iterations

* This allows us to build with the .NET Core tools, currently targeting
  .NET Standard 1.6
* We use a separate build tree under cs/dnc so that we don't interfer
  with the MSBuild-based build. This tree refers to the same .cs files
  as the MSBuild-based build.
  * Sometime soon, .NET Core tooling will switch to using MSBuild. At
    that point, we'll be able to integrate the two builds.
* Much of the generated code is simply checked in right now. A later
  commit will switch to actually running code generation.
* This adds .NET Standard 1.0 support for all assemblies exception
  Bond.IO.
* The lowest standard that Bond.IO can target is .NET Standard 1.3, so
  we target that.
* Removed checked in generated code.
* Uses the same MSBuild codegen targets that we ship in the NuGet
  packages.
* Add a little build.ps1 script to automate the build.
* Build script can be used to pick the configuration.
* Delay signing--like we use for official Bond releases--can be enabled
  by providing a delay sign key. The official Bond delay sign key is NOT
  part of this repository.
@chwarr
Copy link
Member Author

chwarr commented Nov 11, 2016

Closes #165
Closes #166

@@ -43,6 +43,8 @@
- BOND_BUILD: C#
BOND_OUTPUT: Fields
BOND_CONFIG: Fields
- BOND_BUILD: DNC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C#-DNC or C#-dotnetcore? This seems needlessly opaque.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to "C# .NET Core"

}

# We push to a stack other than the default one so that we don't
# accidenally change its contents.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

acciden_t_ally

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks!

#if !(NETSTANDARD1_3 || NETSTANDARD1_6)
string result = new string((sbyte*) buffer, position, size, encoding);
#else
string result = encoding.GetString(buffer + position, size);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just use the encoding.GetString() version everywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we cannot. Encoding.GetString(Byte*, Int32) was added in .NET 4.6.

* Enable script strict mode.
* Be more robust in the face of errors by setting $ErrorActionPreference
  to 'Stop' so that errors cause an immediate failure.
* Enable the build script to be called from a directory other than the
  cs/dnc directory.
This collects up all the assemblies needed in one directory tree,
similar to the copying that is done for targets with
$BondRedistributable==true by the MSBuild's Common.Internal.targets
Instead of using .NET 4.5 builds for .NET Standard 1.0, we now use the
results of the .NET Core builds for the various versions of the standard
that are supported.
* Added to AppVeyor matrix
* Added -Verbosity and -MSBuildLogger switches to .NET Core build script, as
  we want to specify both of these for AppVeyor
* Update required tools with what's needed to build the .NET Core
  version.
* Document which assemblies are available for which frameworks.
* Add cmd wrapper around the .NET Core build script so that it works
  whether or not PowerShell is being used directly.
* Update CHANGELOG
@chwarr
Copy link
Member Author

chwarr commented Nov 14, 2016

Merged in commit f80a8b5. Closing.

@chwarr chwarr closed this Nov 14, 2016
@chwarr chwarr deleted the chwarr/dotnetcore branch November 14, 2016 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants