Skip to content

Commit

Permalink
[nuget] Cleanup location used for nuget downloads so it works with VS…
Browse files Browse the repository at this point in the history
… as well
  • Loading branch information
hazendaz committed Dec 23, 2016
1 parent 698bc86 commit 349d7f9
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 20 deletions.
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ target
.iml

# .net
.vs
GlobalAssemblyInfo.cs
Version.properties
Version.wxi
bin
obj
Debug
Release
TestResult.xml
Tools
Waffle.sln.cache
Waffle.suo
*.csproj.user
.vs

# nuget
.nuget

# nunit
TestResult.xml

# sonarqube
.sonar_lock
Expand Down
6 changes: 6 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value=".nuget\packages" />
</config>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="..\..\.nuget\packages\WiX.4.0.0.4506-pre\build\wix.props" Condition="Exists('..\..\.nuget\packages\WiX.4.0.0.4506-pre\build\wix.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<ProductVersion>3.0</ProductVersion>
<ProjectGuid>{8e2e9431-3fd1-41e9-97cf-cc96dd32386f}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Waffle.Windows.AuthProvider</OutputName>
<OutputType>Module</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixToolPath>$(ProgramFiles)\WiX Toolset v3.7\bin</WixToolPath>
<WixToolPath>..\..\.nuget\packages\WiX.4.0.0.4506-pre\tools</WixToolPath>
<RunWixToolsOutOfProc>true</RunWixToolsOutOfProc>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
Expand Down Expand Up @@ -105,7 +107,16 @@
<ItemGroup>
<Compile Include="WindowsAuthProviderMergeModule.wxs" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\.nuget\packages\WiX.4.0.0.4506-pre\build\wix.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\.nuget\packages\WiX.4.0.0.4506-pre\build\wix.props'))" />
</Target>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<?define Configuration=Release?>
<?endif ?>
<?endif ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Module Id="WindowsAuthProviderMSM" Language="1033" Version="$(var.ProductVersion)">
<Package Id="80101f8b-1c44-4c7d-969b-0731b162d54b" Manufacturer="$(var.CompanyName)" InstallerVersion="200" />
<Directory Id="TARGETDIR" Name="SourceDir">
Expand Down
4 changes: 4 additions & 0 deletions Source/WindowsAuthProviderMergeModule/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WiX" version="4.0.0.4506-pre" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -53,9 +55,9 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Tools\NUnit\lib\net40\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\.nuget\packages\NUnit.3.5.0\lib\net40\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down Expand Up @@ -99,6 +101,9 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
5 changes: 5 additions & 0 deletions Source/WindowsAuthProviderUnitTests/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.5.0" targetFramework="net40" />
<package id="NUnit.ConsoleRunner" version="3.5.0" targetFramework="net40" />
</packages>
7 changes: 4 additions & 3 deletions Waffle.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

<PropertyGroup>
<BuildFolder>$(MSBuildProjectDirectory)\Build</BuildFolder>
<ToolFolder>$(MSBuildProjectDirectory)\Tools</ToolFolder>
<PackagesFolder>$(MSBuildProjectDirectory)\.nuget\packages</PackagesFolder>
<SourceFolder>$(MSBuildProjectDirectory)\Source</SourceFolder>

<MSBuildCommunityTasksPath>$(ToolFolder)\MSBuildTasks\tools</MSBuildCommunityTasksPath>
<MSBuildCommunityTasksPath>$(PackagesFolder)\MSBuildTasks.1.5.0.214\tools</MSBuildCommunityTasksPath>
<NUnitConsoleRunnerPath>$(PackagesFolder)\NUnit.ConsoleRunner.3.5.0\tools</NUnitConsoleRunnerPath>
</PropertyGroup>

<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets"/>
Expand Down Expand Up @@ -64,7 +65,7 @@
<Output TaskParameter="Include" ItemName="UnitTestAssemblies"/>
</CreateItem>
<Message Text="@(UnitTestAssemblies)" />
<exec Command="Tools\NUnit.ConsoleRunner\tools\nunit3-console.exe &quot;@(UnitTestAssemblies)&quot;"/>
<exec Command="$(NUnitConsoleRunnerPath)\nunit3-console.exe &quot;@(UnitTestAssemblies)&quot;"/>
</Target>
<Target Name="drop" DependsOnTargets="version;configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<CreateItem Include="Source\**\%(Configuration.Identity)/Waffle.*.dll" Exclude="Source\**\%(Configuration.Identity)/Waffle.*UnitTests.dll">
Expand Down
6 changes: 4 additions & 2 deletions Waffle.sln
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ Global
{1DA8F5AA-2EE1-4204-A72F-0373BF541395}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1DA8F5AA-2EE1-4204-A72F-0373BF541395}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1DA8F5AA-2EE1-4204-A72F-0373BF541395}.Release|Any CPU.Build.0 = Release|Any CPU
{8E2E9431-3FD1-41E9-97CF-CC96DD32386F}.Debug|Any CPU.ActiveCfg = Debug|x86
{8E2E9431-3FD1-41E9-97CF-CC96DD32386F}.Release|Any CPU.ActiveCfg = Release|x86
{8E2E9431-3FD1-41E9-97CF-CC96DD32386F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E2E9431-3FD1-41E9-97CF-CC96DD32386F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E2E9431-3FD1-41E9-97CF-CC96DD32386F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E2E9431-3FD1-41E9-97CF-CC96DD32386F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
10 changes: 5 additions & 5 deletions bootstrap.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
Rmdir .\Tools\ /s /q
NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
NuGet.exe install NUnit -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive -Version 3.4.1
NuGet.exe install NUnit.ConsoleRunner -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive -Version 3.4.1
NuGet.exe install WiX -Pre -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
Rmdir .nuget\packages\ /s /q
NuGet.exe install MSBuildTasks -OutputDirectory .nuget\packages\ -NonInteractive -Version 1.5.0.214
NuGet.exe install NUnit -OutputDirectory .nuget\packages\ -NonInteractive -Version 3.5.0
NuGet.exe install NUnit.ConsoleRunner -OutputDirectory .nuget\packages\ -NonInteractive -Version 3.5.0
NuGet.exe install WiX -OutputDirectory .nuget\packages\ -NonInteractive -Version 4.0.0.4506-pre -Pre
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if NOT "%ProgramFiles(x86)%"=="" set ProgramFilesDir=%ProgramFiles(x86)%
set VisualStudioCmd=%ProgramFilesDir%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
if EXIST "%VisualStudioCmd%" call "%VisualStudioCmd%"

set NUnitDir=Tools\NUnit.ConsoleRunner
set NUnitDir=.nuget\packages\NUnit.ConsoleRunner.3.5.0

if EXIST "%NUnitDir%\tools" set NUnitBinDir=%NUnitDir%\tools

Expand Down

0 comments on commit 349d7f9

Please sign in to comment.