-
Notifications
You must be signed in to change notification settings - Fork 322
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
Add .NET Core builds #264
Conversation
* 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.
@@ -43,6 +43,8 @@ | |||
- BOND_BUILD: C# | |||
BOND_OUTPUT: Fields | |||
BOND_CONFIG: Fields | |||
- BOND_BUILD: DNC |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acciden_t_ally
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
9749deb
to
e2f34f8
Compare
e2f34f8
to
29ea9e2
Compare
* 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
29ea9e2
to
d2b5504
Compare
Merged in commit f80a8b5. Closing. |
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