Skip to content

Commit

Permalink
Merge pull request #34421 from jaredpar/fix-build
Browse files Browse the repository at this point in the history
Fix build correctness
  • Loading branch information
jaredpar authored Mar 27, 2019
2 parents eeea542 + 263d32a commit 7582489
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Compilers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "CSharpAnalyzerDriver", "src
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "BasicAnalyzerDriver", "src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.shproj", "{E8F0BAA5-7327-43D1-9A51-644E81AE55F1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IlAsmDeploy", "src\Tools\ILAsm\IlAsmDeploy.csproj", "{46B3E63A-C462-4133-9F27-3B85DA5E7D37}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILAsm", "src\Tools\ILTools\ILTools.proj", "{46B3E63A-C462-4133-9F27-3B85DA5E7D37}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Packages", "Packages", "{274B96B7-F815-47E3-9CA4-4024A57A478F}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion Roslyn.sln
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Edit
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnalyzerRunner", "src\Tools\AnalyzerRunner\AnalyzerRunner.csproj", "{60166C60-813C-46C4-911D-2411B4ABBC0F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IlAsmDeploy", "src\Tools\ILAsm\IlAsmDeploy.csproj", "{DA8522ED-02BC-499C-AC71-1DF884F63987}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILTools", "src\Tools\ILTools\ILTools.proj", "{DA8522ED-02BC-499C-AC71-1DF884F63987}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Debugging.Package", "src\Dependencies\CodeAnalysis.Debugging\Microsoft.CodeAnalysis.Debugging.Package.csproj", "{FC2AE90B-2E4B-4045-9FDD-73D4F5ED6C89}"
EndProject
Expand Down
2 changes: 2 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
<MicrosoftNetCoreAnalyzersVersion>$(RoslynDiagnosticsNugetPackageVersion)</MicrosoftNetCoreAnalyzersVersion>
<!-- PROTOTYPE(DefaultInterfaceImplementation): The MicrosoftNetCoreILAsmVersion was 2.0.0 -->
<MicrosoftNetCoreILAsmVersion>3.0.0-preview4-27525-72</MicrosoftNetCoreILAsmVersion>
<MicrosoftNetCoreILAsmVersion>3.0.0-preview4-27525-72</MicrosoftNetCoreILAsmVersion>
<MicrosoftNetCoreILDasmVersion>3.0.0-preview4-27525-72</MicrosoftNetCoreILDasmVersion>
<MicrosoftNETCorePlatformsVersion>2.1.2</MicrosoftNETCorePlatformsVersion>
<!-- Using a private build of Microsoft.Net.Test.SDK to work around issue https://github.com/Microsoft/vstest/issues/1764 -->
<MicrosoftNETTestSdkVersion>15.9.0-dev2</MicrosoftNETTestSdkVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/Test/Utilities/Portable/Metadata/IlasmUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private static string GetIlasmPath()
const string configuration = "Release";
#endif

while (directory != null && !File.Exists(path = Path.Combine(directory, "artifacts", "tools", "ILAsm", configuration, ilasmExeName)))
while (directory != null && !File.Exists(path = Path.Combine(directory, "artifacts", "tools", "ILTools", configuration, ilasmExeName)))
{
directory = Path.GetDirectoryName(directory);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Test/Utilities/Portable/Roslyn.Test.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Note SkipGetTargetFrameworkProperties makes it possible to reference project with incompatible TFM.
GlobalPropertiesToRemove makes sure TargetFramework isn't set as a global property for the target project.
-->
<ProjectReference Include="..\..\..\Tools\ILAsm\IlAsmDeploy.csproj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" GlobalPropertiesToRemove="TargetFramework" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
<ProjectReference Include="..\..\..\Tools\ILTools\ILTools.proj" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" GlobalPropertiesToRemove="TargetFramework" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />

</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -101,4 +101,4 @@
<PackageReference Include="xunit.extensibility.core" Version="$(xunitextensibilitycoreVersion)" />
<PackageReference Include="ICSharpCode.Decompiler" Version="$(ICSharpCodeDecompilerVersion)" />
</ItemGroup>
</Project>
</Project>
5 changes: 5 additions & 0 deletions src/Tools/BuildBoss/ProjectCheckerUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public bool Check(TextWriter textWriter)
allGood &= CheckPackageReferences(textWriter);
allGood &= CheckDeploymentSettings(textWriter);
}
else if (ProjectType == ProjectFileType.Tool)
{
allGood &= CheckPackageReferences(textWriter);
}

return allGood;
}
Expand Down Expand Up @@ -459,6 +463,7 @@ private bool CheckTargetFrameworks(TextWriter textWriter, RoslynProjectData data
case "net472":
case "netcoreapp1.1":
case "netcoreapp2.1":
case "netcoreapp3.0":
case "$(RoslynPortableTargetFrameworks)":
continue;
}
Expand Down
1 change: 1 addition & 0 deletions src/Tools/BuildBoss/ProjectEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ internal static ProjectFileType GetProjectFileType(string path)
case ".csproj": return ProjectFileType.CSharp;
case ".vbproj": return ProjectFileType.Basic;
case ".shproj": return ProjectFileType.Shared;
case ".proj": return ProjectFileType.Tool;
default:
return ProjectFileType.Unknown;
}
Expand Down
1 change: 1 addition & 0 deletions src/Tools/BuildBoss/ProjectType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ internal enum ProjectFileType
CSharp,
Basic,
Shared,
Tool,
Unknown
}
}
2 changes: 1 addition & 1 deletion src/Tools/BuildBoss/SolutionCheckerUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Guid getExpectedGuid(ProjectData data)
}

var allGood = true;
foreach (var data in dataList)
foreach (var data in dataList.Where(x => x.ProjectEntry.ProjectType != ProjectFileType.Tool))
{
var guid = getExpectedGuid(data.ProjectData);
if (guid != data.ProjectEntry.TypeGuid)
Expand Down
9 changes: 0 additions & 9 deletions src/Tools/ILAsm/Program.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>

<!--
When the project is published as a self-contained app do not require the latest runtime patch.
This is ok since the app is only used for testing.
This is not actually a code building project. Disable all the parts of the SDK
which are involed in copying around build assets
-->
<TargetLatestRuntimePatch>false</TargetLatestRuntimePatch>
<SelfContained>true</SelfContained>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<SkipCopyBuildProduct>true</SkipCopyBuildProduct>
<GenerateDependencyFile>false</GenerateDependencyFile>
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<EnableSourceLink>false</EnableSourceLink>

<PublishDir>$(ArtifactsDir)tools\ILAsm\$(Configuration)\</PublishDir>
<PublishDir>$(ArtifactsDir)tools\ILTools\$(Configuration)\</PublishDir>
</PropertyGroup>

<Choose>
Expand All @@ -33,9 +34,9 @@
</When>
</Choose>

<ItemGroup>
<PackageReference Include="Microsoft.NETCore.ILAsm" Version="$(MicrosoftNETCoreILAsmVersion)" />
</ItemGroup>
<!-- Required by common targets but have no implementation in this proj -->
<Target Name="CreateManifestResourceNames" />
<Target Name="CoreCompile" />

<!-- Workaround for https://github.com/dotnet/sdk/issues/2573 -->
<PropertyGroup>
Expand All @@ -55,4 +56,17 @@
<Output TaskParameter="TouchedFiles" ItemName="FileWrites"/>
</Touch>
</Target>

<!-- Import design time targets for Roslyn Project System. These are only available if Visual Studio is installed. -->
<!-- Required for project to load in Visual Studio. -->
<PropertyGroup>
<ManagedDesignTimeTargetsPath Condition="'$(ManagedDesignTimeTargetsPath)'==''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets</ManagedDesignTimeTargetsPath>
</PropertyGroup>
<Import Project="$(ManagedDesignTimeTargetsPath)" Condition="'$(ManagedDesignTimeTargetsPath)' != '' and Exists('$(ManagedDesignTimeTargetsPath)')" />

<ItemGroup>
<PackageReference Include="Microsoft.NETCore.ILAsm" Version="$(MicrosoftNETCoreILAsmVersion)" />
<PackageReference Include="Microsoft.NETCore.ILDAsm" Version="$(MicrosoftNETCoreILDAsmVersion)" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsVersion)" />
</ItemGroup>
</Project>

0 comments on commit 7582489

Please sign in to comment.