Skip to content

Commit

Permalink
Merge pull request kspearrin#3 from TerribleDev/update2
Browse files Browse the repository at this point in the history
update to new csproj
  • Loading branch information
kspearrin authored May 30, 2017
2 parents 691b73e + 7c4354c commit 07bb135
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 160 deletions.
18 changes: 0 additions & 18 deletions Otp.NET.nuspec

This file was deleted.

87 changes: 54 additions & 33 deletions Otp.NET.sln
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,33 +1,54 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{57F82DBE-510A-4E78-ADCD-7A18DB80AA87}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E5579496-CD66-4961-8DD1-A53BA74229E3}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
Otp.NET.nuspec = Otp.NET.nuspec
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Otp.NET", "src\Otp.NET\Otp.NET.xproj", "{E630B67F-150A-4978-A2DD-51B8D8E783EF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E630B67F-150A-4978-A2DD-51B8D8E783EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E630B67F-150A-4978-A2DD-51B8D8E783EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E630B67F-150A-4978-A2DD-51B8D8E783EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E630B67F-150A-4978-A2DD-51B8D8E783EF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E630B67F-150A-4978-A2DD-51B8D8E783EF} = {57F82DBE-510A-4E78-ADCD-7A18DB80AA87}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D0E9D08A-7F66-426A-8645-C2D92DB4D200}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Otp.NET", "src\Otp.NET\Otp.NET.csproj", "{EF104BCD-4F86-494E-81E1-D69A5C851430}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Otp.NET.UnitTests", "src\Otp.NET.UnitTests\Otp.NET.UnitTests.csproj", "{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|x64.ActiveCfg = Debug|x64
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|x64.Build.0 = Debug|x64
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|x86.ActiveCfg = Debug|x86
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|x86.Build.0 = Debug|x86
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|Any CPU.Build.0 = Release|Any CPU
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|x64.ActiveCfg = Release|x64
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|x64.Build.0 = Release|x64
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|x86.ActiveCfg = Release|x86
{EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|x86.Build.0 = Release|x86
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|x64.ActiveCfg = Debug|x64
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|x64.Build.0 = Debug|x64
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|x86.ActiveCfg = Debug|x86
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|x86.Build.0 = Debug|x86
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|Any CPU.Build.0 = Release|Any CPU
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|x64.ActiveCfg = Release|x64
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|x64.Build.0 = Release|x64
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|x86.ActiveCfg = Release|x86
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{EF104BCD-4F86-494E-81E1-D69A5C851430} = {D0E9D08A-7F66-426A-8645-C2D92DB4D200}
{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF} = {D0E9D08A-7F66-426A-8645-C2D92DB4D200}
EndGlobalSection
EndGlobal
12 changes: 1 addition & 11 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,8 @@
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto build
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:build
call npm install -g gulp
call npm install -g gulp-cli
call npm install
call gulp
6 changes: 0 additions & 6 deletions global.json

This file was deleted.

110 changes: 58 additions & 52 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
var p = require('./package.json'),
gulp = require('gulp'),
assemblyInfo = require('gulp-dotnet-assembly-info'),
xmlpoke = require('gulp-xmlpoke'),
msbuild = require('gulp-msbuild'),
nuget = require('nuget-runner')({
apiKey: process.env.NUGET_API_KEY,
nugetPath: '.nuget/nuget.exe'
});

gulp.task('default', ['nuget']);

gulp.task('restore', [], function () {
return nuget
.restore({
packages: 'Otp.NET.sln',
verbosity: 'normal'
});
});

gulp.task('build', ['restore'], function () {
return gulp
.src('Otp.NET.sln')
.pipe(msbuild({
toolsVersion: 14.0,
targets: ['Clean', 'Build'],
errorOnFail: true,
configuration: 'Release'
}));
});

gulp.task('nuspec', ['build'], function () {
return gulp
.src('Otp.NET.nuspec')
.pipe(xmlpoke({
replacements: [{
xpath: "//package:version",
namespaces: { "package": "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" },
value: p.version
}]
}))
.pipe(gulp.dest('.'));
});

gulp.task('nuget', ['nuspec'], function () {
return nuget
.pack({
spec: 'Otp.NET.nuspec',
outputDirectory: 'src/Otp.NET/bin/Release',
version: p.version
});
});
var p = require('./package.json');
var gulp = require('gulp');
var path = require('path');
var del = require('del');
var version = p.version;
var configuration = process.env.BUILD_CONFIGURATION || 'Release';
var {restore, build, test, pack, push} = require('gulp-dotnet-cli');

gulp.task('default', ['nuget', 'test']);

gulp.task('clean', [], ()=>del(['output', 'src/**/bin', 'src/**/obj']))

gulp.task('restore', ['clean'], ()=>{

return gulp.src('**/*.sln')
.pipe(restore());

}, {read:false});

gulp.task('build', ['restore'], ()=>{

return gulp.src('**/*.sln')
.pipe(build({
configuration: configuration,
version: version
}));

}, {read:false});

gulp.task('test', ['build'], ()=>{

return gulp.src('**/*UnitTests.csproj')
.pipe(test({
configuration: configuration,
noBuild: true
}));

}, {read:false});

gulp.task('nuget', ['build'], ()=>{

return gulp.src('src/Otp.NET/Otp.NET.csproj')
.pipe(pack({
version: p.version,
configuration: configuration,
output: path.resolve(__dirname, 'output')
}));

}, {read:false});

gulp.task('push', ['default'], ()=>{

return gulp.src('output/**/*.nupkg')
.pipe(push({
apiKey: process.env.NUGET_API_KEY
}));

}, {read:false});
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
"url": "https://github.com/kspearrin/Otp.NET"
},
"dependencies": {
"del": "^2.2.2",
"gulp": "^3.9.0",
"gulp-dotnet-assembly-info": "^0.1.10",
"gulp-msbuild": "^0.2.11",
"gulp-xmlpoke": "^0.2.0",
"nuget-runner": "^0.1.5"
"gulp-dotnet-cli": "^0.3.0"
}
}
17 changes: 17 additions & 0 deletions src/Otp.NET.UnitTests/Otp.NET.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Otp.NET\Otp.NET.csproj" />
</ItemGroup>

</Project>
14 changes: 14 additions & 0 deletions src/Otp.NET.UnitTests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Xunit;

namespace Otp.NET.UnitTests
{
public class UnitTest1
{
[Fact]
public void Test1()
{

}
}
}
21 changes: 21 additions & 0 deletions src/Otp.NET/Otp.NET.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.3;net45</TargetFrameworks>
<PackageId>Otp.NET</PackageId>
<Authors>Kyle Spearrin</Authors>
<PackageProjectUrl>https://github.com/kspearrin/Otp.NET</PackageProjectUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/kspearrin/Otp.NET/master/LICENSE.txt</PackageLicenseUrl>
<Title>Otp.NET</Title>
<Description>An implementation of TOTP which is commonly used for multi factor authentication by using a shared key between the client and the server to generate and verify one time use codes. For documentation, visit https://github.com/kspearrin/Otp.NET</Description>
<Summary>An implementation of TOTP which is commonly used for multi factor authentication.</Summary>
<PackageTags>otp,totp,2fa,two factor</PackageTags>
<PackageIconUrl>http://i.imgur.com/XFfC64v.png</PackageIconUrl>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
19 changes: 0 additions & 19 deletions src/Otp.NET/Otp.NET.xproj

This file was deleted.

3 changes: 0 additions & 3 deletions src/Otp.NET/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Otp.NET")]
[assembly: AssemblyTrademark("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand Down
14 changes: 0 additions & 14 deletions src/Otp.NET/project.json

This file was deleted.

0 comments on commit 07bb135

Please sign in to comment.