Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.

Unify projects to support ASP.NET and ASP.NET Core 2.0 #153

Closed
khalidabuhakmeh opened this issue Mar 15, 2017 · 2 comments
Closed

Unify projects to support ASP.NET and ASP.NET Core 2.0 #153

khalidabuhakmeh opened this issue Mar 15, 2017 · 2 comments
Assignees

Comments

@khalidabuhakmeh
Copy link
Contributor

khalidabuhakmeh commented Mar 15, 2017

Note: This issue is a breaking change and most likely a major version bump. When this is being worked on, no other work should be happening as it will be ignored.


Exploring migrating Stuntman to VS 2017 and I have a working build of the core solution and the tests. Here is what we need to do:

  1. Reduce the Core projects to one project called RimDev.Stuntman and modify namespaces accordingly to match
  2. Reduce all test projects to one
  3. Use compiler directives to target NETSTANDARD1_4 and NET451
  4. Upgrade all old versions of csproj to the latest
  5. Samples need to be migrated too

Current Csproj for RimDev.Stuntman

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <Copyright>Copyright 2017 Ritter Insurance Marketing</Copyright>
    <VersionPrefix>1.7.0</VersionPrefix>
    <Authors>Ritter Insurance Marketing</Authors>
    <TargetFrameworks>net451;netstandard1.4</TargetFrameworks>
    <AssemblyName>RimDev.Stuntman</AssemblyName>
    <PackageId>RimDev.Stuntman</PackageId>
    <PackageTags>rimdev;stuntman;aspnet;identity;impersonation</PackageTags>
    <PackageIconUrl>https://raw.githubusercontent.com/ritterim/stuntman/master/stuntman-icon-128.png</PackageIconUrl>
    <PackageProjectUrl>https://github.com/ritterim/stuntman</PackageProjectUrl>
    <PackageLicenseUrl>https://raw.githubusercontent.com/ritterim/stuntman/master/LICENSE</PackageLicenseUrl>
    <RepositoryType>git</RepositoryType>
    <RepositoryUrl>https://github.com/ritterim/stuntman.git</RepositoryUrl>
    <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
    <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
    <GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
    <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="..\..\common\SolutionInfo.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
    <EmbeddedResource Include="assets\stuntman.css;assets\stuntman-logo.png" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
    <Reference Include="System.IdentityModel" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.Runtime" />
    <Reference Include="System" />
    <Reference Include="Microsoft.CSharp" />
    <PackageReference Include="Microsoft.Owin" Version="3.0.1" />
    <PackageReference Include="Microsoft.Owin.Security" Version="3.0.1" />
    <PackageReference Include="Microsoft.Owin.Security.Cookies" Version="3.0.1" />
    <PackageReference Include="Microsoft.Owin.Security.OAuth" Version="3.0.1" />
    <PackageReference Include="Owin" Version="1.0" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
    <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="1.0.2" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="1.0.2" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="1.0.2" />
    <PackageReference Include="System.Security.Claims" Version="4.0.1" />
    <PackageReference Include="System.IO.FileSystem" Version="4.0.1" />
    <PackageReference Include="System.Net.Http" Version="4.1.1" />
    <PackageReference Include="System.Runtime.Extensions" Version="4.1.0" />
  </ItemGroup>

</Project>
@snebjorn
Copy link
Contributor

snebjorn commented Aug 5, 2017

I've had a stab at this.

Reduce the Core projects to one project called RimDev.Stuntman and modify namespaces accordingly to match
Reduce all test projects to one

Could you elaborate on how you want the structure? Cause I'm not quite sure I fully understand 😃

@snebjorn
Copy link
Contributor

snebjorn commented Aug 5, 2017

Reduce the Core projects to one project called RimDev.Stuntman
Reduce all test projects to one

After playing around with this, I'm not sure this is the right approach.
The tests (especially) diverge quite a bit from each other depending on the target framework.

Anyway here's the branch if you want to have a peak
https://github.com/snebjorn/stuntman/tree/one-project-to-rule-them-all

@kendaleiv kendaleiv self-assigned this Aug 25, 2017
@kendaleiv kendaleiv changed the title Convert To New Csproj Format (VS 2017) Unify projects to combine ASP.NET and ASP.NET Core 2.0 Aug 25, 2017
@kendaleiv kendaleiv changed the title Unify projects to combine ASP.NET and ASP.NET Core 2.0 Unify projects to support ASP.NET and ASP.NET Core 2.0 Aug 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants