Skip to content

Commit 135ee96

Browse files
authored
Pack NuGet.Server from .nuspec instead of .csproj to control content subdirectory (#22)
Make NuGet.Server.Core and NuGet.Server.V2 have net46-only dependencies Use the .pp file to initialize NuGet.Server routes, instead of NuGet.Server.dll Bump dependency versions
1 parent 7b31909 commit 135ee96

29 files changed

Lines changed: 126 additions & 96 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,5 @@ DebugConstants.cs
203203
*.userprefs
204204
src/VsExtension/source.extension.vsixmanifest
205205
!packages/Microsoft.Web.Xdt.1.0.0-alpha/
206-
src/NuGet.Server/packages/*.bin
206+
src/NuGet.Server/packages/*.bin
207+
*.cache.bin

NuGet.Server.sln

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25123.0
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E7B39EAD-EA32-4011-845A-C949A336389A}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A2E61590-0069-4746-A44D-4B2B805EDD91}"
99
ProjectSection(SolutionItems) = preProject
10+
.gitignore = .gitignore
1011
build.cmd = build.cmd
1112
CodeAnalysisDictionary.xml = CodeAnalysisDictionary.xml
13+
NuGet.config = NuGet.config
1214
NuGet.ruleset = NuGet.ruleset
1315
EndProjectSection
1416
EndProject

NuGet.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<packageSources>
1111
<clear />
1212
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
13-
<add key="NuGet-Volatile" value="https://dotnet.myget.org/F/nuget-volatile" />
1413
</packageSources>
1514
<disabledPackageSources>
1615
<add key="Microsoft and .NET" value="true" />

build.cmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ REM Test
3737
call :ExecuteCmd tools\nuget.exe install xunit.runner.console -Version 2.1.0 -OutputDirectory packages
3838
call :ExecuteCmd packages\xunit.runner.console.2.1.0\tools\xunit.console.exe test\NuGet.Server.Core.Tests\bin\%config%\NuGet.Server.Core.Tests.dll
3939
IF %ERRORLEVEL% NEQ 0 goto error
40-
call :ExecuteCmd packages\xunit.runner.console.2.1.0\tools\xunit.console.exe test\NuGet.Server.Tests\bin\%config%\NuGet.Server.Tests.dll
41-
IF %ERRORLEVEL% NEQ 0 goto error
4240
call :ExecuteCmd packages\xunit.runner.console.2.1.0\tools\xunit.console.exe test\NuGet.Server.V2.Tests\bin\%config%\NuGet.Server.V2.Tests.dll
4341
IF %ERRORLEVEL% NEQ 0 goto error
42+
call :ExecuteCmd packages\xunit.runner.console.2.1.0\tools\xunit.console.exe test\NuGet.Server.Tests\bin\%config%\NuGet.Server.Tests.dll
43+
IF %ERRORLEVEL% NEQ 0 goto error
4444

4545

4646
REM Package
4747
mkdir artifacts
4848
mkdir artifacts\packages
4949
call :ExecuteCmd tools\nuget.exe pack "src\NuGet.Server.Core\NuGet.Server.Core.csproj" -symbols -o artifacts\packages -p Configuration=%config% %versionPlaceholder% %version%
5050
IF %ERRORLEVEL% NEQ 0 goto error
51-
call :ExecuteCmd tools\nuget.exe pack "src\NuGet.Server\NuGet.Server.csproj" -symbols -o artifacts\packages -p Configuration=%config% %versionPlaceholder% %version%
52-
IF %ERRORLEVEL% NEQ 0 goto error
5351
call :ExecuteCmd tools\nuget.exe pack "src\NuGet.Server.V2\NuGet.Server.V2.csproj" -symbols -o artifacts\packages -p Configuration=%config% %versionPlaceholder% %version%
5452
IF %ERRORLEVEL% NEQ 0 goto error
53+
call :ExecuteCmd tools\nuget.exe pack "src\NuGet.Server\NuGet.Server.nuspec" -symbols -o artifacts\packages -p Configuration=%config% %versionPlaceholder% %version%
54+
IF %ERRORLEVEL% NEQ 0 goto error
5555

5656

5757
goto end

samples/NuGet.Server.V2.Samples.OwinHost/NuGet.Server.V2.Samples.OwinHost.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,12 @@
6767
<HintPath>..\..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
6868
<Private>True</Private>
6969
</Reference>
70-
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
71-
<SpecificVersion>False</SpecificVersion>
72-
<HintPath>..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
70+
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
71+
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
7372
<Private>True</Private>
7473
</Reference>
75-
<Reference Include="NuGet.Core, Version=2.14.0.830, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
76-
<HintPath>..\..\packages\NuGet.Core.2.14.0-rtm-830\lib\net40-Client\NuGet.Core.dll</HintPath>
74+
<Reference Include="NuGet.Core, Version=2.14.0.832, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75+
<HintPath>..\..\packages\NuGet.Core.2.14.0\lib\net40-Client\NuGet.Core.dll</HintPath>
7776
<Private>True</Private>
7877
</Reference>
7978
<Reference Include="Owin">

samples/NuGet.Server.V2.Samples.OwinHost/app.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</dependentAssembly>
2626
<dependentAssembly>
2727
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
28-
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
28+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
2929
</dependentAssembly>
3030
<dependentAssembly>
3131
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />

samples/NuGet.Server.V2.Samples.OwinHost/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net45" />
1212
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net45" />
1313
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net46" />
14-
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net461" />
15-
<package id="NuGet.Core" version="2.14.0-rtm-830" targetFramework="net46" />
14+
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net46" />
15+
<package id="NuGet.Core" version="2.14.0" targetFramework="net46" />
1616
<package id="Owin" version="1.0" targetFramework="net45" />
1717
<package id="System.Spatial" version="5.7.0" targetFramework="net45" />
1818
</packages>

src/CommonAssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
[assembly: ComVisible(false)]
1414

15-
[assembly: AssemblyVersion("2.14.0.0")]
16-
[assembly: AssemblyFileVersion("2.14.0.0")]
17-
[assembly: AssemblyInformationalVersion("2.14.0.0")]
15+
[assembly: AssemblyVersion("2.15.0.0")]
16+
[assembly: AssemblyFileVersion("2.15.0.0")]
17+
[assembly: AssemblyInformationalVersion("2.15.0.0")]
1818

1919
[assembly: NeutralResourcesLanguage("en-US")]

src/NuGet.Server.Core/NuGet.Server.Core.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@
3535
<HintPath>..\..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
3636
<Private>True</Private>
3737
</Reference>
38-
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
39-
<SpecificVersion>False</SpecificVersion>
40-
<HintPath>..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
38+
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
39+
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
4140
<Private>True</Private>
4241
</Reference>
43-
<Reference Include="NuGet.Core, Version=2.14.0.830, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
44-
<HintPath>..\..\packages\NuGet.Core.2.14.0-rtm-830\lib\net40-Client\NuGet.Core.dll</HintPath>
42+
<Reference Include="NuGet.Core, Version=2.14.0.832, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
43+
<HintPath>..\..\packages\NuGet.Core.2.14.0\lib\net40-Client\NuGet.Core.dll</HintPath>
4544
<Private>True</Private>
4645
</Reference>
4746
<Reference Include="System" />

src/NuGet.Server.Core/NuGet.Server.Core.nuspec

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
<projectUrl>https://github.com/NuGet/NuGet.Server</projectUrl>
1111
<copyright>$copyright$</copyright>
1212
<frameworkAssemblies>
13-
<frameworkAssembly assemblyName="System.Data.Services" />
13+
<frameworkAssembly assemblyName="System.Data.Services" targetFramework="net46" />
1414
</frameworkAssemblies>
1515
<dependencies>
16-
<dependency id="Microsoft.Web.Xdt" version="[2.1.1,)" />
17-
<dependency id="Newtonsoft.Json" version="[8.0.3,)" />
18-
<dependency id="NuGet.Core" version="[2.14.0-rtm-830,)" />
16+
<group targetFramework="net46">
17+
<dependency id="Microsoft.Web.Xdt" version="2.1.1" />
18+
<dependency id="Newtonsoft.Json" version="9.0.1" />
19+
<dependency id="NuGet.Core" version="2.14.0" />
20+
</group>
1921
</dependencies>
2022
</metadata>
2123
</package>

0 commit comments

Comments
 (0)