Closed andrewlock closed 8 years ago
Make sure you sign up for Hacktoberfest, so you get a free TShirt.
Pulled and reviewed and LGTM. The only head scratcher is how to build these two parallel projects. This looks like more research.
I assume the following would not work for the csproj
projects.
> dotnet restore
> dotnet build **/project.json
@khalidabuhakmeh @andrewlock: if you really want the t-shirt, maybe close this PR and open a new one in a couple days...
Rules To get a shirt, you must make four pull requests between October 1 and October 31.
Four!!!!
Haha, yeah I may have to!;)
WRT building, we can't build csproj with dotnet, no, but I think we can do the reverse, with a dotnet hook into msbuild..
I've pushed up a commit which hopefully will fix the build (hard to know as can't see the details though!)
We are working on making our team city publicly accessible it is annoying when working remote because we have to VPN in. That said, our CI just runs build.cmd which you can run locally.
Good to know, running build.cmd locally seems to work and produces the NuGet file - can you confirm it works locally on your machine? I assume the CI server has the .NET Core SDK installed?
What version of Nuget are you using? I assume 3, and our build server is using 2.something
. Just wanting to confirm. Thanks.
Build output is below. It seems like we may just need to update the cli
on our build agents.
I'll check when I'm back later, but pretty sure it's NuGet 3. I'm not 100%, but I think you have to be on 3 for it to work with project.json?
@andrewlock Can you try adding this global.json
to the root of the repository?
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003121"
}
}
The latest version is 1.0.0-preview2-003133
that takes into account the 1.0.1
patch release.
Oops, hadn't noticed I'd missed that (normally created automatically with sln
, but I just added to the existing one)
Open in IDE
GETSDKTOOLINGINFO The project is configured to use .NET Core SDK version 1.0.0-preview2-003133 which is not installed or cannot be found under the path C:\Program Files\dotnet. These components are required to build and run this project. Download the version of .NET Core SDK specified in global.json or update the SDK version in global.json to the version that is installed.
Step Build Script (Command Line) failed
@andrewlock be sure you do a git clean -xdf
and then run build.cmd
. @jrusbatch and I are seeing issues with references in the sample projects.
Argh nuts, will do. I had repeated issues trying to get the naming correct. The problem is that project.json currently leans heavily on the name of the project being the same as the folder. I thought I'd found a setup that works, but clearly not.
In keeping with the other Core project I tried updating the Assembly and package name in project.json
to the full RimDev.Stuntman
etc package name, while keeping the folder as Core.AspNetCore
. The problem is that the VS tooling doesn't seem to like various combinations of this when these do not all match.
A very simple fix would be to rename the Core.AspNetCore
folder to RimDev.Stuntman.Core.AspNetCore
, but that obviously goes against the current convention. Otherwise I think either the package name created by dotnet pack
or the assembly dll name (I can't remember which) may need to be Core.AspNetCore
for the references to work out, both on the command line and in VS.
I'll take a look a little later, but how do you feel about renaming the folder if I can't find another approach?
running build.cmd
twice works...
I think this is an ordering thing that MSBuild isn't handling correctly.
Note: It works in Visual Studio the first time you build.
Doh, really thought I'd got it that time - it works first time after a git clean -xdf
now...
@andrewlock The build is passing now. We just needed to update the .NET Core SDK on our TeamCity build agents.
The new package was published to https://www.nuget.org/packages/RimDev.Stuntman.Core.AspNetCore. Did we want to have this new package be RimDev.Stuntman.AspNetCore
instead?
Yes. I am going to rename and submit a PR shortly.
Fixes #62
I think this provides the most amount of reuse possible - currently the vast majority of files are shared between the Core and Core.AspNetCore projects, with files added as links. The
IApplicationBuilderExtensions
andIAppBuilderExtensions
are isolated to their respective projects.Similarly for the test project, common files are shared between projects, with the OWIN and ASP.NET Core interfaces in their respective projects.
Duplicate UsageSamples for the standard and MVC projects have been created for the ASP.NET Core versions.
The build and NuGet package builds have not yet been updated