Skip to content

Commit

Permalink
Moved Roslyn Analyzers to project.json
Browse files Browse the repository at this point in the history
Introduced two new "dependency" projects that make use of NuGet package inheritance to unify references to Roslyn and xUnit. For example to move the tree to a newer version of Roslyn, you just need to modify Dependencies\CodeAnalysis\project.json, and rerun "NuGet restore".
  • Loading branch information
davkean committed Apr 15, 2016
1 parent c24859d commit d80eb5c
Show file tree
Hide file tree
Showing 218 changed files with 1,252 additions and 6,112 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,9 @@ FakesAssemblies/

# cibuild test results
TestResults.xml

# NuGet V3 artifacts
*-packages.config
*.nuget.props
*.nuget.targets
project.lock.json
15 changes: 15 additions & 0 deletions build/Targets/ProducesNoOutput.Imports.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />

<PropertyGroup>
<TargetPath></TargetPath> <!-- Prevent projects referencing this from trying to pass us to the compiler -->
</PropertyGroup>

<Target Name="CoreCompile" /> <!-- Prevent Csc from being called -->
<Target Name="CopyFilesToOutputDirectory" /> <!-- Prevent non-existent output from being copied -->
<Target Name="GenerateTargetFrameworkMonikerAttribute" /> <!-- Don't generate TFM attribute -->
<Target Name="RuntimeImplementationProjectOutputGroup" /> <!-- Group always attempts resolve runtime, regardless of <CopyNuGetImplementations>-->

</Project>
16 changes: 16 additions & 0 deletions build/Targets/ProducesNoOutput.Settings.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />

<PropertyGroup>
<CopyNuGetImplementations>false</CopyNuGetImplementations>
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
<OutputPath>bin</OutputPath>
<OutputType>Library</OutputType>
<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
</PropertyGroup>

</Project>
77 changes: 5 additions & 72 deletions src/Analyzer.Utilities/Analyzer.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<None Include="app.config" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<Content Include="project.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="AnalyzerUtilitiesResources.Designer.cs">
Expand Down Expand Up @@ -63,82 +61,17 @@
<Compile Include="WordParser.cs" />
<Compile Include="WordParserOptions.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CodeAnalysis, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.CodeAnalysis.Common.1.2.0\lib\portable-net45+win8\Microsoft.CodeAnalysis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.CodeAnalysis.CSharp.1.2.0\lib\portable-net45+win8\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CodeAnalysis.CSharp.Workspaces, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.2.0\lib\portable-net45+win8\Microsoft.CodeAnalysis.CSharp.Workspaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CodeAnalysis.VisualBasic, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.CodeAnalysis.VisualBasic.1.2.0\lib\portable-net45+win8\Microsoft.CodeAnalysis.VisualBasic.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.2.0\lib\portable-net45+win8\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CodeAnalysis.Workspaces, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.2.0\lib\portable-net45+win8\Microsoft.CodeAnalysis.Workspaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Collections.Immutable, Version=1.1.37.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\System.Collections.Immutable.1.1.37\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Composition.AttributedModel, Version=1.0.27.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Composition.Convention, Version=1.0.27.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Composition.Hosting, Version=1.0.27.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Composition.Runtime, Version=1.0.27.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Composition.TypedParts, Version=1.0.27.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Composition.1.0.27\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reflection.Metadata, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\System.Reflection.Metadata.1.2.0\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="AnalyzerUtilitiesResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>AnalyzerUtilitiesResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
<Analyzer Include="..\..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
<ProjectReference Include="..\Dependencies\CodeAnalysis\CodeAnalysis.csproj">
<Project>{434fa01f-b8cb-41f7-88d1-7906003f23bc}</Project>
<Name>CodeAnalysis</Name>
</ProjectReference>
</ItemGroup>
<ImportGroup Label="Targets">
<Import Project="..\..\build\Targets\Analyzers.Imports.targets" />
Expand Down
14 changes: 0 additions & 14 deletions src/Analyzer.Utilities/packages.config

This file was deleted.

7 changes: 7 additions & 0 deletions src/Analyzer.Utilities/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"dependencies": {
},
"frameworks": {
".NETPortable, Version=v4.5, Profile=Profile7": { }
}
}
Loading

0 comments on commit d80eb5c

Please sign in to comment.