-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 1835 handle auto-restore on twice #1836
Merged
forki
merged 5 commits into
fsprojects:master
from
JohanLarsson:Issue_1835_auto-restore_on_twice
Aug 1, 2016
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5cf4ae3
Integration test auto-restore on first run.
JohanLarsson 4e5c336
Repro: failing tests for second run of auto-restore on
JohanLarsson 8f063af
Remove call to TurnOffAutoRestore from TurnOnAutoRestore.
JohanLarsson dd5d90c
Refreshing projects after call to TurnOffAutoRestore in TurnOnAutoRes…
JohanLarsson b444388
Refreshing projects in a more sensible way.
JohanLarsson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
integrationtests/Paket.IntegrationTests/AutoRestoreSpec.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module Paket.IntegrationTests.AutoRestoreSpec | ||
|
||
open System | ||
open System.IO | ||
open Fake | ||
open NUnit.Framework | ||
open FsUnit | ||
|
||
[<Test>] | ||
let ``#1835 auto-restore on downloads targets and updates proj file``() = | ||
let scenario = "i001835-auto-restore-on-twice" | ||
paket "auto-restore on" scenario |> ignore | ||
let scenarioPath = scenarioTempPath scenario | ||
Path.Combine(scenarioPath , ".paket","paket.targets") |> checkFileExists | ||
let projectFile = File.ReadAllText(Path.Combine(scenarioPath, "AutoRestoreTwice" ,"AutoRestoreTwice.csproj")) | ||
StringAssert.Contains("<Import Project=\"..\.paket\paket.targets\" />", projectFile) | ||
|
||
[<Test>] | ||
let ``#1835 auto-restore on twice same result as first run``() = | ||
let scenario = "i001835-auto-restore-on-twice" | ||
paket "auto-restore on" scenario |> ignore | ||
// now running auto-restore a second time on the same project. | ||
directPaket "auto-restore on" scenario |> ignore | ||
let scenarioPath = scenarioTempPath scenario | ||
Path.Combine(scenarioPath , ".paket","paket.targets") |> checkFileExists | ||
let projectFile = File.ReadAllText(Path.Combine(scenarioPath, "AutoRestoreTwice" ,"AutoRestoreTwice.csproj")) | ||
StringAssert.Contains("<Import Project=\"..\.paket\paket.targets\" />", projectFile) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
integrationtests/scenarios/i001835-auto-restore-on-twice/before/AutoRestoreTwice.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
| ||
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}") = ".paket", ".paket", "{CD6F5013-BD01-4288-9851-5EF0390DE813}" | ||
ProjectSection(SolutionItems) = preProject | ||
paket.dependencies = paket.dependencies | ||
EndProjectSection | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoRestoreTwice", "AutoRestoreTwice\AutoRestoreTwice.csproj", "{703EF019-58C4-4D58-B9C0-F20080FD288D}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{703EF019-58C4-4D58-B9C0-F20080FD288D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{703EF019-58C4-4D58-B9C0-F20080FD288D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{703EF019-58C4-4D58-B9C0-F20080FD288D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{703EF019-58C4-4D58-B9C0-F20080FD288D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
47 changes: 47 additions & 0 deletions
47
...s/scenarios/i001835-auto-restore-on-twice/before/AutoRestoreTwice/AutoRestoreTwice.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{703EF019-58C4-4D58-B9C0-F20080FD288D}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>AutoRestoreTwice</RootNamespace> | ||
<AssemblyName>AutoRestoreTwice</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Class1.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\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. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
6 changes: 6 additions & 0 deletions
6
integrationtests/scenarios/i001835-auto-restore-on-twice/before/AutoRestoreTwice/Class1.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace AutoRestoreTwice | ||
{ | ||
public class Class1 | ||
{ | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...cenarios/i001835-auto-restore-on-twice/before/AutoRestoreTwice/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
// 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: AssemblyTitle("AutoRestoreTwice")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("AutoRestoreTwice")] | ||
[assembly: AssemblyCopyright("Copyright © 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("703ef019-58c4-4d58-b9c0-f20080fd288d")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
2 changes: 2 additions & 0 deletions
2
integrationtests/scenarios/i001835-auto-restore-on-twice/before/paket.dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source C:\Tfs\Coromatic\Common\GuGet | ||
source http://www.nuget.org/api/v2/ |
1 change: 1 addition & 0 deletions
1
integrationtests/scenarios/i001835-auto-restore-on-twice/before/paket.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably not the most elegant way.