-
Notifications
You must be signed in to change notification settings - Fork 35
Add aspnetcore support #127
Add aspnetcore support #127
Conversation
Replace ApplicationException with Exception Replace GetExecutingAssembly with GetTypeInfo().Assymbly Replace WebClient with HttpClient
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
|
@khalidabuhakmeh @andrewlock: if you really want the t-shirt, maybe close this PR and open a new one in a couple days...
|
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 |
Build output is below. It seems like we may just need to update the
|
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 {
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003121"
}
} |
The latest version is |
Oops, hadn't noticed I'd missed that (normally created automatically with |
|
@andrewlock be sure you do a
|
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 A very simple fix would be to rename the I'll take a look a little later, but how do you feel about renaming the folder if I can't find another approach? |
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 |
@andrewlock The build is passing now. We just needed to update the .NET Core SDK on our TeamCity build agents. |
Because tooling is not quite where we want it with respect to project name vs. NuGet package name AND referencing projects via project.json, we decided to rename the .NET Core project directory. Note: original attempt to update project.json with: { "name": "RimDev.Stuntman.Core.AspNetCore" } fails since the project can no longer be referenced by other projects (i.e. test projects). The project by itself compiles just fine, however >:(
Update assembly/package naming behavior
The new package was published to https://www.nuget.org/packages/RimDev.Stuntman.Core.AspNetCore. Did we want to have this new package be |
Yes. I am going to rename and submit a PR shortly. |
Ref. #131 |
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