Rothko icon indicating copy to clipboard operation
Rothko copied to clipboard

Create a nuget package

Open haacked opened this issue 10 years ago • 9 comments

Started the work to automatically build NuGet packages. I'm running into a weird problem with how we script the build. I'm using FAKE with FODY and the two don't seem to get along. I think FAKE is building the solution without running the targets that FODY needs to have run beforehand. I don't have time to look into this now.

But maybe @forki or @distantcam will have an idea off the top of their heads? :smile:

haacked avatar Oct 14 '14 20:10 haacked

It looks like you created a new target but didn't put it in any dependency pipeline. Is this intended? On Oct 14, 2014 10:26 PM, "Phil Haack" [email protected] wrote:

Started the work to automatically build NuGet packages. I'm running into a weird problem with how we script the build. I'm using FAKE with FODY and the two don't seem to get along. I think FAKE is building the solution without running the targets that FODY needs to have run beforehand. I don't have time to look into this now.

But maybe @forki https://github.com/forki or @distantcam https://github.com/distantcam will have an idea off the top of their

heads? [image: :smile:]

You can merge this Pull Request by running

git pull https://github.com/Haacked/Rothko nuget-package

Or view, comment on, or merge it at:

https://github.com/Haacked/Rothko/pull/20 Commit Summary

  • Create a nuget package

File Changes

  • M ReleaseNotes.md https://github.com/Haacked/Rothko/pull/20/files#diff-0 (2)
  • A Rothko.nuspec https://github.com/Haacked/Rothko/pull/20/files#diff-1 (18)
  • M Rothko.sln https://github.com/Haacked/Rothko/pull/20/files#diff-2 (4)
  • A packaging/LICENSE-MIT.txt https://github.com/Haacked/Rothko/pull/20/files#diff-3 (18)
  • A packaging/README.md https://github.com/Haacked/Rothko/pull/20/files#diff-4 (38)
  • A packaging/ReleaseNotes.md https://github.com/Haacked/Rothko/pull/20/files#diff-5 (3)
  • A packaging/Rothko.0.0.1-alpha.nupkg https://github.com/Haacked/Rothko/pull/20/files#diff-6 (0)
  • A packaging/lib/net45/rothko.dll https://github.com/Haacked/Rothko/pull/20/files#diff-7 (0)
  • M script/build.fsx https://github.com/Haacked/Rothko/pull/20/files#diff-8 (25)

Patch Links:

  • https://github.com/Haacked/Rothko/pull/20.patch
  • https://github.com/Haacked/Rothko/pull/20.diff

— Reply to this email directly or view it on GitHub https://github.com/Haacked/Rothko/pull/20.

forki avatar Oct 14 '14 20:10 forki

@forki I took it out because it was failing. Try doing a straight up build and you'll see the unit test project fails to build. But if you build from Visual Studio, it succeeds.

haacked avatar Oct 14 '14 20:10 haacked

After updating the xunit runners to 2.0 and FAKE to 3.26.7 (and some minor script adjustments) the tests seem to pass but the script still fails.

=== TEST EXECUTION SUMMARY ===
  Tests  Total: 2, Errors: 0, Failed: 0, Skipped: 0, Time: 0.270s
Running build failed.
Error:
System.Exception: xUnit2 failed for the following assemblies: path_snipped\rothko\Tests\bin\Debug\Tests.dll
   at Microsoft.FSharp.Core.Operators.FailWith[T](String message)
   at Fake.XUnit2Helper.xUnit2(FSharpFunc`2 setParams, IEnumerable`1 assemblies) in C:\code\fake\src\app\FakeLib\UnitTest\XUnit2Helper.fs:line 190
   at [email protected](Unit _arg4) in path_snipped\rothko\script\build.fsx:line 42
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 41

The tests output also seems to indicate that the tests passed

<?xml version="1.0" encoding="utf-8"?>
<assemblies>
  <assembly name="C:\Users\pmacnaughton\Documents\Projects\rothko\Tests\bin\Release\Tests.DLL" environment="64-bit .NET 4.0.30319.18444 [collection-per-class, non-parallel]" test-framework="xUnit.net 2.0.0.2924" run-date="2015-04-07" run-time="08:47:46" config-file="C:\Users\pmacnaughton\Documents\Projects\rothko\tools\xunit\xunit.console.exe.Config" total="2" passed="2" failed="0" skipped="0" time="0.270" errors="0">
    <errors />
    <collection total="2" passed="2" failed="0" skipped="0" name="Test collection for Tests.NullGuardTest" time="0.089">
      <test name="Tests.NullGuardTest.CheckOSVersionImplementation" type="Tests.NullGuardTest" method="CheckOSVersionImplementation" time="0.0871433" result="Pass" />
      <test name="Tests.NullGuardTest.MakeSureNullGuardIsWorking" type="Tests.NullGuardTest" method="MakeSureNullGuardIsWorking" time="0.0021808" result="Pass" />
    </collection>
  </assembly>
</assemblies>

pmacn avatar Apr 07 '15 14:04 pmacn

Looks as if it was failing because it was trying to run the test assemblies found in the Debug folder after it ran the Release ones. Narrowing the file selection to "./Tests/bin/Release/**/Tests.dll" made the script run to completion

pmacn avatar Apr 07 '15 14:04 pmacn

In summary, update xunit runners to 2.0, update FAKE to 3.26.7 (need this for the xUnit2Helper) Update the script to call xUnit2 instead of xUnit and only to run the Release config assemblies Also needed to change the "SolutionInfo.cs" to "./SolutionInfo.cs" when building the assemblyinfo

pmacn avatar Apr 07 '15 15:04 pmacn

Thanks for that investigative work @pmacn! Want to send a PR for that?

haacked avatar Apr 07 '15 15:04 haacked

I'll get one up later today

pmacn avatar Apr 07 '15 15:04 pmacn

This should be fine to just rebase onto master and possibly adding /packaging to .gitignore I'd do it but didn't want to step on any toes since you already have a PR open for it.

On a completely different note. Starting a new job on Monday which will mean that desktop development goes :chart_with_downwards_trend: and web development goes :chart_with_upwards_trend: So a lot less use for Rothko for me :cry:

pmacn avatar Apr 17 '15 02:04 pmacn

This should be fine to just rebase onto master and possibly adding /packaging to .gitignore I'd do it but didn't want to step on any toes since you already have a PR open for it.

Feel free!

So a lot less use for Rothko for me

:cry: Well thank you for all your help so far! And congrats on the new job!

haacked avatar Apr 17 '15 07:04 haacked