-
Notifications
You must be signed in to change notification settings - Fork 91
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 to .NetStandard (#90) #128
Build to .NetStandard (#90) #128
Conversation
Build tests to net461 update travis file for build changes Add "other files" folder to solution for travis/readme etc.
@jonnii mind helping me look at this? |
GDAXSharp/GDAXSharp.csproj
Outdated
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<RootNamespace>GDAXSharp</RootNamespace> |
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.
This and the assembly name is now inferred from the project name (which is nice).
FWIW other than the build stuff this looks pretty good to me, I think the majority of your "problems" are from running the CI on travis... it's great, but I've had a much easier time in .net land using appveyor. Here's an example of a script which builds and versions packages using netcore/standard and gitversion. I'm not 100% sure if it's even possible to get a net461 and netstandard (with multiple target frameworks) to work linux, I think you have to do that on windows. It may be easier to just target |
e.g. if you did this https://docs.travis-ci.com/user/languages/csharp/#.NET-Core you could create a matrix build for netcore2.0 and netcore2.1... |
Test against net461 and netappcore2.0
Updated; now building net461 & netstandard2.0 + running tests for each. I'll take a look at what @jonnii linked to tomorrow to see if there is a better or alternative way ahead |
Travis Build This doesn't help us too much, because the root of the issue is that we need to build and/or test the net461 DLL in a different way to the netcore DLLs. (different as in not just parameter changes executed the same way by the same script) The This vstest issue tracks what needs to be "fixed" in the CLI and/or msbuild tools, to address the root of the problem we're faced with. I think where I've ended up is a reasonable solution. We use msbuild to restore / generate the output. Visual Studio Build It would be straightforward to run the netcoreapp2.0 tests via a command prompt with something similar to this; depending on what you need - with or without the --no-build flag Building first time on dev box Most likely, when you pull this new csproj you're going to have old format /obj contents. If you don't delete /obj - you'll get strange compile errors and won't be able to build anything. Further, if you're flipping between branches - and (say) /master is the new format csproj and /feature/xyz is the old format /obj --> you'll have to delete the /obj folders each time you swap over. |
Use What's the story with packaging and deploying a new version? Is that automated too? With the new tooling you can use |
cool... historically I've always used svn so these tips are great. Re packaging... no idea... one for @dougdellolio. I've assumed its a manual process to date.
So... yeah... automating that part should be possible... Question - how does that packaging / push to nuget work when people fork? For example, I've been running this build out of my fork, on travis... how does it stop those builds from getting pushed to NuGet ? |
Although maybe packaging etc. should be a separate PR, which considers moving to Appveyor? |
So what I do on my own projects is this in appveyor:
The condition is to push to nuget when there's a new tag. Tags are used to control versioning, so you can create a release in github and it will automatically tag and push to github. This is controlled using |
That makes sense.... but is that exposing the key which means anyone could mess with the nuget package and publish rouge releases? |
In appveyor that's an encrypted secret. |
all nuget releases I have done have been manual. I’d rather not release a package for every single merge for this project as I don’t think it’s necessary. Had busy day today so didn’t get a chance to look into appveyor and building there but will hopefully get to it tomorrow. |
@dougdellolio you can set it up so only the tagged or labelled releases get published, so you can pick and choose when along with seeing the diff between versions. |
@chrisw000 i have added a build to appveyor #130 . is there anything you want me to try or need me to do? |
I believe it should "just work", merge it into /master if you're done and I'll pull into my branch |
…into feature/netStandardClean
Travis failure due to it being unable to download a mono package. I don't think this has anything to do directly with this project - potentially a travis issue? Fails with: AppVeyor built and passed incredibly quickly.... that build output all looks good for .netStandard2.0 and net461 + 2 sets of tests passing. Should I just remove the Travis file or do you want to keep both for now? |
nice! go for it. I can disable it if it still decides to run |
i tested this with an existing app and everything seems fine... i tried running tests through visual studio and get OutOfMemoryException. Resharper runs tests fine. any idea? otherwise I am ready to merge this |
Yes, I mentioned this on the other thread. In Visual Studio, I got OutOfMemoryExceptions when it tries to auto discover the tests after a build. If you click "Run all Tests" manually it will discover, run and pass all the tests OK. |
@chrisw000 thanks for all of your work here |
actually... just noticed... the .sln file needs a minor tweak - remove the link to the travis file - and put in the appveyor file.... just to tidy it up. |
This PR is from a new branch to one mentioned in #90 - as previously mentioned branch had loads of trial and error noise in the commit history.
Currently targets netStandard1.3, tests target net461; running correctly in visual studio and travis via command line.
netStandard1.3 output can be consumed by a framework 4.6+ application. Referencing the source code directly would require adding a nuget package reference to System.Net.Http v4.3.3
my #90 comments go on a bit... so feel free to just ask any questions?