Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
    _   _ _____ _____   ____            _        _
   | \ | | ____|_   _| |  _ \ ___   ___| | _____| |
   |  \| |  _|   | |   | |_) / _ \ / __| |/ / __| |
  _| |\  | |___  | |   |  _ < (_) | (__|   <\__ \_|
 (_)_| \_|_____| |_|   |_| \_\___/ \___|_|\_\___(_)
  • Loading branch information
dotnet-bot committed Nov 8, 2014
0 parents commit f11305d
Show file tree
Hide file tree
Showing 600 changed files with 154,435 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax: glob
*.user
*.suo
bin
obj
msbuild.log
packages
*.sln.ide
*.metaproj
*.metaproj.tmp
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing

Information on contributing is in the [Contributing Guide](https://github.com/Microsoft/dotnet/blob/master/CONTRIBUTING.md).
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2014 Microsoft Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# .NET Core

This repository contains the class libraries for .NET Core. This is currently a
work in progress, and does not currently contain the entire set of libraries
that we plan on open sourcing. Make sure to watch this repository in order to be
notified as we make changes to and expand it. Check out this [blog post] that
explains our OSS strategy and road map in more detail.

Today, it contains the following components:

* **Immutable Collections**. A set of collection types that make it easy to keep
mutable state under control without sacrificing performance or memory
footprint. You can read more about them on [MSDN][immutable-msdn].

* **ECMA-335 Metadata Reader**. This is a highly tuned low-level metadata reader
that allows [Roslyn] to parse assemblies.

* **SIMD enabled vector types**. We've recently added a set of basic vector
types that leverage single instruction, multiple data (SIMD) CPU instructions.
See our [recent announcement][simd-post] for more details.

* **XML**. This includes the DOM APIs such as the `XDocument` and `XmlDocument`
types, XLinq as well the corresponding XPath extension methods.

More is coming soon. Stay tuned!

[blog post]: http://blogs.msdn.com/b/dotnet
[roslyn]: https://roslyn.codeplex.com/
[immutable-msdn]: http://msdn.microsoft.com/en-us/library/dn385366(v=vs.110).aspx
[simd-post]: http://blogs.msdn.com/b/dotnet

## Related Projects

For an overview of all the .NET related projects, have a look at the
[.NET home repository](https://github.com/Microsoft/dotnet).

## License

This project is licensed under the [MIT license](LICENSE).

## .NET Foundation

This project is a part of the [.NET Foundation](http://www.dotnetfoundation.org/projects).

## How to Engage, Contribute and Provide Feedback

To contribute to .NET Core, see the [Contributing Guide](https://github.com/Microsoft/dotnet/blob/master/CONTRIBUTING.md).

You are also encouraged to start a discussion by filing an issue or creating a
gist. See the contributing guides for more details. You can discuss .NET OSS
more generally in the [.NET Foundation forums](http://www.dotnetfoundation.org/).

## Building and Testing

To find out how you can build and test .NET Core, see the [Developer Guide](docs/Developers.md).
22 changes: 22 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@echo off

:: Note: We've disabled node reuse because it causes file locking issues.
:: The issue is that we extend the build with our own targets which
:: means that that rebuilding cannot successully delete the task
:: assembly.

:: Log build command line
set buildprefix=echo
set buildpostfix=^> "%~dp0msbuild.log"
call :build %*

:: Build
set buildprefix=
set buildpostfix=
call :build %*

goto :eof

:build
%buildprefix% "%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" "%~dp0build.proj" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%~dp0msbuild.log";Append %* %buildpostfix%
goto :eof
86 changes: 86 additions & 0 deletions build.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<BuildToolsVersion>1.0.10-prerelease</BuildToolsVersion>
</PropertyGroup>

<PropertyGroup>
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
<SourceDir>$(ProjectDir)src\</SourceDir>
<BinDir>$(ProjectDir)bin\</BinDir>
<ToolsDir>$(BinDir)tools\</ToolsDir>

<NuGetToolPath>$(ToolsDir)NuGet.exe</NuGetToolPath>

<NuGetConfigFile>$(SourceDir)nuget\NuGet.Config</NuGetConfigFile>
<NuGetConfigCommandLine
Condition="Exists($(NuGetConfigFile))">-ConfigFile &quot;$(NuGetConfigFile)&quot;</NuGetConfigCommandLine>
<PackagesDir>$(SourceDir)packages\</PackagesDir>
</PropertyGroup>

<ItemGroup>
<PackageConfigs Include="$(SourceDir)*\packages.config" />
</ItemGroup>

<UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Address ParameterType="System.String" Required="true"/>
<FileName ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System" />
<Code Type="Fragment" Language="cs">
<![CDATA[
var directory = System.IO.Path.GetDirectoryName(FileName);
System.IO.Directory.CreateDirectory(directory);
new System.Net.WebClient().DownloadFile(Address, FileName);
]]>
</Code>
</Task>
</UsingTask>

<Target Name="Clean">
<!-- Execute build tools -->
<MSBuild
Projects="$(ToolsDir)fxbuild.proj"
SkipNonexistentProjects="true"
Targets="Clean" />
</Target>

<Target Name="Build" DependsOnTargets="_RestoreBuildTools">
<!-- Execute build tools -->
<MSBuild
Projects="$(ToolsDir)fxbuild.proj"
Targets="Build" />
</Target>

<Target Name="BuildFxLocalDependency" DependsOnTargets="_RestoreBuildTools" Returns="$(ProducedPackages)">
<!-- Execute build tools -->
<MSBuild
Projects="$(ToolsDir)fxbuild.proj"
Targets="BuildFxLocalDependency">
<Output TaskParameter="TargetOutputs" ItemName="ProducedPackages" />
</MSBuild>
</Target>

<Target
Name="_RestoreBuildTools"
Condition="!Exists('$(PackagesDir)Microsoft.DotNet.BuildTools.$(BuildToolsVersion)') Or !Exists('$(ToolsDir)fxbuild.proj')">
<!-- Download latest nuget.exe -->
<DownloadFile
Condition="!Exists($(NuGetToolPath))"
Address="http://nuget.org/nuget.exe"
FileName="$(NuGetToolPath)" />

<!-- Restore build tools -->
<Exec
StandardOutputImportance="Low"
Command="&quot;$(NuGetToolPath)&quot; install Microsoft.DotNet.BuildTools -Prerelease -Version $(BuildToolsVersion) -o &quot; $(PackagesDir) &quot; $(NuGetConfigCommandLine)" />

<!-- Copy build tools to tools directory -->
<Exec
Command="xcopy /e /y &quot;$(PackagesDir)Microsoft.DotNet.BuildTools.$(BuildToolsVersion)\lib\*&quot; &quot;$(ToolsDir)&quot; > $(ToolsDir)BuildTools.xcopy.log" />
</Target>

</Project>
57 changes: 57 additions & 0 deletions docs/Developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Developer Guide

## Building, Testing, and Running

You can build .NET Core either via the command line or by using Visual Studio.
We currently only support building and running on Windows. Other platforms will
come later.

The command line build is invoked via

```
build.cmd
```

In order to build successfully, you must have Visual Studio 2013 or higher
installed.

### Running Tests

We use the OSS testing framework [xUnit.net][xunit].

Running the tests from the command line is as simple as invoking `build.cmd`.

You can also run the tests from within Visual Studio. See [this page][xunit-runner]
for more details on how to install the required test runner and how you can
invoke the tests using Test Explorer.

[xunit]: http://xunit.github.io/
[xunit-runner]: https://xunit.codeplex.com/wikipage?title=HowToUseVs2012

## Strong Name Signing

All .NET Core binaries are strong named. In order for us to enable you to build
binaries that have a matching identity we leverage a mechanism called
*OSS signing*.

OSS signing is essentially just [delay signing][delay-signing] the assembly
except that the resulting assembly is marked as fully signed. This allows you to
load the assembly in most contexts, or more precisely in any context that
doesn't require validating the strong name identity. This means that you can't
install OSS signed assemblies into the GAC nor can you use it in partial trust.

OSS signing allows you to produce binaries that match the strong name identity
of the official binaries as released by Microsoft without having to add skip
verification entries to your machine.

When running on the .NET Framework (desktop) we only support using OSS signed
binaries for debugging and testing purposes. In other words, we don't guarantee
that you can successfully load OSS signed assemblies in all scenarios that are
required for production use.

However, in the context of ASP.NET Core and .NET Native on Windows we support
loading OSS signed binaries in production. But keep in mind that Microsoft
doesn't support the binaries themselves -- we only support the ability to load
them.

[delay-signing]: http://msdn.microsoft.com/en-us/library/t07a3dye.aspx
45 changes: 45 additions & 0 deletions src/System.Collections.Immutable.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Collections.Immutable", "System.Collections.Immutable\src\System.Collections.Immutable.csproj", "{1DD0FF15-6234-4BD6-850A-317F05479554}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Collections.Immutable.Tests", "System.Collections.Immutable\tests\System.Collections.Immutable.Tests.csproj", "{95DFC527-4DC1-495E-97D7-E94EE1F7140D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1DD0FF15-6234-4BD6-850A-317F05479554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1DD0FF15-6234-4BD6-850A-317F05479554}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1DD0FF15-6234-4BD6-850A-317F05479554}.Debug|ARM.ActiveCfg = Debug|Any CPU
{1DD0FF15-6234-4BD6-850A-317F05479554}.Debug|x64.ActiveCfg = Debug|Any CPU
{1DD0FF15-6234-4BD6-850A-317F05479554}.Debug|x86.ActiveCfg = Debug|Any CPU
{1DD0FF15-6234-4BD6-850A-317F05479554}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1DD0FF15-6234-4BD6-850A-317F05479554}.Release|Any CPU.Build.0 = Release|Any CPU
{1DD0FF15-6234-4BD6-850A-317F05479554}.Release|ARM.ActiveCfg = Release|Any CPU
{1DD0FF15-6234-4BD6-850A-317F05479554}.Release|x64.ActiveCfg = Release|Any CPU
{1DD0FF15-6234-4BD6-850A-317F05479554}.Release|x86.ActiveCfg = Release|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Debug|x64.ActiveCfg = Debug|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Debug|x86.ActiveCfg = Debug|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Release|Any CPU.Build.0 = Release|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Release|ARM.ActiveCfg = Release|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Release|x64.ActiveCfg = Release|Any CPU
{95DFC527-4DC1-495E-97D7-E94EE1F7140D}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
14 changes: 14 additions & 0 deletions src/System.Collections.Immutable/src/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in the
// Code Analysis results, point to "Suppress Message", and click
// "In Suppression File".
// You do not need to add suppressions to this file manually.

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Collections.Generic")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1016:MarkAssembliesWithAssemblyVersion", Justification = "The official build system adds this attribute.")]
Loading

2 comments on commit f11305d

@0xD7ba952CE8A0976e8d9852b7649bf01c30146

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Come back to this comment in the future.

@mustakimali
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw the beginning of making history 🎉

Please sign in to comment.