Skip to content

Commit 995603e

Browse files
committed
Initial driver project
Add Microsoft.AspNet.Identity.Core 2.0.0-alpha1 Enable nuget package restore
1 parent decb03a commit 995603e

File tree

9 files changed

+343
-3
lines changed

9 files changed

+343
-3
lines changed

Diff for: .gitattributes

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

Diff for: .gitignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,10 @@ publish/
9494

9595
# Publish Web Output
9696
*.Publish.xml
97-
*.pubxml
9897

9998
# NuGet Packages Directory
10099
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
101-
#packages/
100+
packages/
102101

103102
# Windows Azure Build Output
104103
csx
@@ -133,6 +132,12 @@ UpgradeLog*.htm
133132
App_Data/*.mdf
134133
App_Data/*.ldf
135134

135+
136+
#LightSwitch generated files
137+
GeneratedArtifacts/
138+
_Pvt_Extensions/
139+
ModelManifest.xml
140+
136141
# =========================
137142
# Windows detritus
138143
# =========================
@@ -147,5 +152,5 @@ Desktop.ini
147152
# Recycle Bin used on file shares
148153
$RECYCLE.BIN/
149154

150-
# Mac crap
155+
# Mac desktop service store files
151156
.DS_Store

Diff for: src/.nuget/NuGet.Config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
</configuration>

Diff for: src/.nuget/NuGet.exe

1.54 MB
Binary file not shown.

Diff for: src/.nuget/NuGet.targets

+136
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
5+
6+
<!-- Enable the restore command to run before builds -->
7+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
8+
9+
<!-- Property that enables building a package from a project -->
10+
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
11+
12+
<!-- Determines if package restore consent is required to restore packages -->
13+
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
14+
15+
<!-- Download NuGet.exe if it does not already exist -->
16+
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
17+
</PropertyGroup>
18+
19+
<ItemGroup Condition=" '$(PackageSources)' == '' ">
20+
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
21+
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
22+
<!--
23+
<PackageSource Include="https://www.nuget.org/api/v2/" />
24+
<PackageSource Include="https://my-nuget-source/nuget/" />
25+
-->
26+
</ItemGroup>
27+
28+
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
29+
<!-- Windows specific commands -->
30+
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
31+
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
32+
</PropertyGroup>
33+
34+
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
35+
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
36+
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
37+
<PackagesConfig>packages.config</PackagesConfig>
38+
</PropertyGroup>
39+
40+
<PropertyGroup>
41+
<!-- NuGet command -->
42+
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
43+
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
44+
45+
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
46+
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
47+
48+
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
49+
50+
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
51+
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
52+
53+
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
54+
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
55+
56+
<!-- Commands -->
57+
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
58+
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
59+
60+
<!-- We need to ensure packages are restored prior to assembly resolve -->
61+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
62+
RestorePackages;
63+
$(BuildDependsOn);
64+
</BuildDependsOn>
65+
66+
<!-- Make the build depend on restore packages -->
67+
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
68+
$(BuildDependsOn);
69+
BuildPackage;
70+
</BuildDependsOn>
71+
</PropertyGroup>
72+
73+
<Target Name="CheckPrerequisites">
74+
<!-- Raise an error if we're unable to locate nuget.exe -->
75+
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
76+
<!--
77+
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
78+
This effectively acts as a lock that makes sure that the download operation will only happen once and all
79+
parallel builds will have to wait for it to complete.
80+
-->
81+
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
82+
</Target>
83+
84+
<Target Name="_DownloadNuGet">
85+
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
86+
</Target>
87+
88+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
89+
<Exec Command="$(RestoreCommand)"
90+
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
91+
92+
<Exec Command="$(RestoreCommand)"
93+
LogStandardErrorAsError="true"
94+
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
95+
</Target>
96+
97+
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
98+
<Exec Command="$(BuildCommand)"
99+
Condition=" '$(OS)' != 'Windows_NT' " />
100+
101+
<Exec Command="$(BuildCommand)"
102+
LogStandardErrorAsError="true"
103+
Condition=" '$(OS)' == 'Windows_NT' " />
104+
</Target>
105+
106+
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
107+
<ParameterGroup>
108+
<OutputFilename ParameterType="System.String" Required="true" />
109+
</ParameterGroup>
110+
<Task>
111+
<Reference Include="System.Core" />
112+
<Using Namespace="System" />
113+
<Using Namespace="System.IO" />
114+
<Using Namespace="System.Net" />
115+
<Using Namespace="Microsoft.Build.Framework" />
116+
<Using Namespace="Microsoft.Build.Utilities" />
117+
<Code Type="Fragment" Language="cs">
118+
<![CDATA[
119+
try {
120+
OutputFilename = Path.GetFullPath(OutputFilename);
121+
122+
Log.LogMessage("Downloading latest version of NuGet.exe...");
123+
WebClient webClient = new WebClient();
124+
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
125+
126+
return true;
127+
}
128+
catch (Exception ex) {
129+
Log.LogErrorFromException(ex);
130+
return false;
131+
}
132+
]]>
133+
</Code>
134+
</Task>
135+
</UsingTask>
136+
</Project>

Diff for: src/AspNet.Identity.MongoDB.sln

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.21005.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNet.Identity.MongoDB", "AspNet.Identity.MongoDB\AspNet.Identity.MongoDB.csproj", "{AD64128A-6855-49F7-A846-1FCDAD368C55}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{AB638C09-B39E-4D06-B59D-C0626D8F188A}"
9+
ProjectSection(SolutionItems) = preProject
10+
.nuget\NuGet.Config = .nuget\NuGet.Config
11+
.nuget\NuGet.exe = .nuget\NuGet.exe
12+
.nuget\NuGet.targets = .nuget\NuGet.targets
13+
EndProjectSection
14+
EndProject
15+
Global
16+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
17+
Debug|Any CPU = Debug|Any CPU
18+
Release|Any CPU = Release|Any CPU
19+
EndGlobalSection
20+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{AD64128A-6855-49F7-A846-1FCDAD368C55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{AD64128A-6855-49F7-A846-1FCDAD368C55}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{AD64128A-6855-49F7-A846-1FCDAD368C55}.Release|Any CPU.ActiveCfg = Release|Any CPU
24+
{AD64128A-6855-49F7-A846-1FCDAD368C55}.Release|Any CPU.Build.0 = Release|Any CPU
25+
EndGlobalSection
26+
GlobalSection(SolutionProperties) = preSolution
27+
HideSolutionNode = FALSE
28+
EndGlobalSection
29+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{AD64128A-6855-49F7-A846-1FCDAD368C55}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>AspNet.Identity.MongoDB</RootNamespace>
11+
<AssemblyName>AspNet.Identity.MongoDB</AssemblyName>
12+
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
15+
<RestorePackages>true</RestorePackages>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="Microsoft.AspNet.Identity.Core">
36+
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.0.0-alpha1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
37+
</Reference>
38+
<Reference Include="System" />
39+
<Reference Include="System.Core" />
40+
<Reference Include="System.Xml.Linq" />
41+
<Reference Include="System.Data.DataSetExtensions" />
42+
<Reference Include="Microsoft.CSharp" />
43+
<Reference Include="System.Data" />
44+
<Reference Include="System.Xml" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<Compile Include="Properties\AssemblyInfo.cs" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<None Include="packages.config" />
51+
</ItemGroup>
52+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
53+
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
54+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
55+
Other similar extension points exist, see Microsoft.Common.targets.
56+
<Target Name="BeforeBuild">
57+
</Target>
58+
<Target Name="AfterBuild">
59+
</Target>
60+
-->
61+
</Project>
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("AspNet.Identity.MongoDB")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("AspNet.Identity.MongoDB")]
13+
[assembly: AssemblyCopyright("Copyright © 2014")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("95d6fb99-0451-44a0-8550-82a9b070208c")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

Diff for: src/AspNet.Identity.MongoDB/packages.config

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Microsoft.AspNet.Identity.Core" version="2.0.0-alpha1" targetFramework="net451" />
4+
</packages>

0 commit comments

Comments
 (0)