Skip to content

Commit

Permalink
Renovate repo for VS2017
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Oct 7, 2018
2 parents 24eb8b7 + 460c7fe commit 2d6a1b8
Show file tree
Hide file tree
Showing 65 changed files with 499 additions and 1,095 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ local.properties
*.sln.ide
UpgradeLog*htm
.vs/
launchSettings.json

# Build results
[Dd]ebug/
Expand All @@ -66,6 +67,7 @@ UpgradeLog*htm
.builds
*.dotCover
*.log
*.binlog

packages/
*.nuget.props
Expand Down
38 changes: 5 additions & 33 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,20 @@ This project is actively developed using the following software.
It is highly recommended that anyone contributing to this library use the same
software.

1. [Visual Studio 2015][VS].
2. [NuProj for VS2015][NuProj]
1. [Visual Studio 2017][VS].

All other dependencies are acquired via NuGet.

## Building

To build this repository from the command line, you must first execute our init.ps1 script,
which downloads NuGet 3.3.0 and uses it to restore packages.
Assuming your working directory is the root directory of this git repo, the command is:

.\init

Everything in the repo may be built via building the solution file
either from Visual Studio 2015 or the command line:

msbuild src\ImmutableObjectGraph.sln

### Important notice when developing with Visual Studio

The NuGet package restore functionality in Visual Studio does not work for this project, which relies
on newer functionality than comes with Visual Studio 2015 Update 3. You should disable automatic
package restore on build in Visual Studio in order to build successfully and have a useful Error List
while developing.

Follow these steps to disable automatic package restore in Visual Studio:

1. Tools -> Options -> NuGet Package Manager -> General
2. *Clear* the checkbox for "Automatically check for missing packages during build in Visual Studio

With this setting, you can still execute a package restore within Visual Studio by right-clicking
on the _solution_ node in Solution Explorer and clicking "Restore NuGet Packages". But do not ever
execute that on this project as that will corrupt the result of `init.ps1`.
either from Visual Studio 2017 or the command line:

Before developing this project in Visual Studio, or after making project or project.json changes,
or to recover after Visual Studio executes a package restore, run the `init` script again.
msbuild /restore src\ImmutableObjectGraph.sln /t:pack

## Testing

The Visual Studio 2015 Test Explorer will list and execute all tests.
The Visual Studio 2017 Test Explorer will list and execute all tests.

## Pull requests

Expand Down Expand Up @@ -106,6 +80,4 @@ the embedded resource at test execution time, execute code generation, and compi
result. This style is best suited for tests that want to assert API aspects of the generated
code (such as asserting that no public constructor exists).

[VS]: https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx
[NuProj]: https://onedrive.live.com/redir?resid=63D0C265F96E43D!2477835&authkey=!AHh2k9FoNR-nFHo&ithint=file%2cmsi
[NuGetClient]: https://dist.nuget.org/win-x86-commandline/v3.3.0/nuget.exe
[VS]: https://www.visualstudio.com/downloads/
51 changes: 24 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ImmutableObjectGraph
=======================
# ImmutableObjectGraph

[![Build status](https://ci.appveyor.com/api/projects/status/sc0w4vlceulc2try?svg=true)](https://ci.appveyor.com/project/AArnott/immutableobjectgraph)
[![NuGet package](https://img.shields.io/nuget/v/ImmutableObjectGraph.svg)](https://nuget.org/packages/ImmutableObjectGraph)
Expand All @@ -23,34 +22,33 @@ These codebases for immutable objects can be quite large.

To reduce the burden of writing and maintaining such codebases, this project
generates immutable types for you based on a minimal definition of a class
that you define.

Supported features
------------------

* Field types may be value or reference types.
* When field types are collections, immutable collections should be used that
support the Builder pattern.
* When field types refer to other types also defined in the template
file, an entire library of immutable classes with members that
reference each other can be constructed.
* Batch property changes can be made with a single allocation using a single
invocation of the `With` method.
* Builder classes are generated to allow efficient multi-step mutation
without producing unnecessary GC pressure.
* Version across time without breaking changes by adding Create and With method
overloads with an easy application of `[Generation(2)]`.

Usage
-----
that you define.

## Supported features

* Field types may be value or reference types.
* When field types are collections, immutable collections should be used that
support the Builder pattern.
* When field types refer to other types also defined in the template
file, an entire library of immutable classes with members that
reference each other can be constructed.
* Batch property changes can be made with a single allocation using a single
invocation of the `With` method.
* Builder classes are generated to allow efficient multi-step mutation
without producing unnecessary GC pressure.
* Version across time without breaking changes by adding Create and With method
overloads with an easy application of `[Generation(2)]`.

## Usage

You can begin using this project by simply installing a NuGet package:

Install-Package ImmutableObjectGraph.Generation -Pre

On any source file that you use the `[GenerateImmutable]` attribute in,
set the Custom Tool property to: `MSBuild:GenerateCodeFromAttributes`

## Example source file
### Example source file

```csharp
[GenerateImmutable]
Expand All @@ -61,7 +59,7 @@ partial class Fruit
}
```

## Example generated code
### Example generated code

The following code will be generated automatically for you and added to a source file
in your intermediate outputs folder:
Expand Down Expand Up @@ -165,10 +163,9 @@ partial class Fruit
The integration of the code generator support in Visual Studio allows for you to
conveniently maintain your own code, and on every save or build of that file,
the code generator runs and automatically creates or updates the generated partial
class.
class.

Known Issues
------------
## Known Issues

When defining more than one immutable type, you may need to keep the arguments
to the `[GenerateImmutable]` attribute consistent for every type. The generator
Expand Down
1 change: 0 additions & 1 deletion init.cmd

This file was deleted.

27 changes: 0 additions & 27 deletions init.ps1

This file was deleted.

Binary file added lib/netstandard1.0/CG.Pluralization.dll
Binary file not shown.
66 changes: 66 additions & 0 deletions lib/netstandard1.0/CG.Pluralization.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/.RepoSrcRoot

This file was deleted.

31 changes: 31 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\'))</RepoRoot>
<BaseIntermediateOutputPath>$(RepoRoot)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRoot)bin\$(MSBuildProjectName)\</BaseOutputPath>
<PackageOutputPath>$(RepoRoot)bin\Packages\$(Configuration)\</PackageOutputPath>

<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)StrongNameKey.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>

<Authors>Andrew Arnott</Authors>
<Owners>Andrew Arnott</Owners>
<PackageProjectUrl>https://github.com/aarnott/immutableobjectgraph</PackageProjectUrl>
<LicenseUrl>https://raw.githubusercontent.com/AArnott/ImmutableObjectGraph/$GitCommitIdShort$/LICENSE.txt</LicenseUrl>
<Copyright>Copyright © Andrew Arnott</Copyright>
<PackageTags>immutable</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.1.23" PrivateAssets="all" />
<!-- <PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta006" PrivateAssets="all" /> -->
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" />
</ItemGroup>
<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<PackageLicenseUrl>https://raw.githubusercontent.com/aarnott/ImmutableObjectGraph/$(GitCommitIdShort)/LICENSE.txt</PackageLicenseUrl>
</PropertyGroup>
</Target>
</Project>
19 changes: 19 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project>
<PropertyGroup>
<CodeGenerationRoslynVersion>0.4.88</CodeGenerationRoslynVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="CodeGeneration.Roslyn.Attributes" Version="$(CodeGenerationRoslynVersion)" />
<PackageReference Update="CodeGeneration.Roslyn" Version="$(CodeGenerationRoslynVersion)" />
<PackageReference Update="CodeGeneration.Roslyn.BuildTime" Version="$(CodeGenerationRoslynVersion)" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.9.0" />
<PackageReference Update="System.Collections.Immutable" Version="1.4.0" />
<PackageReference Update="Validation" Version="2.4.18" />
<PackageReference Update="Microsoft.Build" Version="14.3.0" />
<PackageReference Update="xunit" Version="2.3.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Update="dotnet-codegen" Version="$(CodeGenerationRoslynVersion)" />
</ItemGroup>
</Project>

This file was deleted.

30 changes: 0 additions & 30 deletions src/ImmutableObjectGraph.Core.NuGet/ImmutableObjectGraph.nuspec

This file was deleted.

Loading

0 comments on commit 2d6a1b8

Please sign in to comment.