Skip to content

Commit

Permalink
Remove ProjectGuids from libs projects and update slngen (dotnet#48551)
Browse files Browse the repository at this point in the history
* Remove ProjectGuids from libs projects

Based on this comment: dotnet/project-system#6830 (comment)

* Update slngen

* Add required NuGet.config
  • Loading branch information
ViktorHofer authored Mar 23, 2021
1 parent cc736fa commit 3c1f142
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"microsoft.visualstudio.slngen.tool": {
"version": "4.4.2",
"version": "5.0.5",
"commands": [
"slngen"
]
Expand Down
2 changes: 1 addition & 1 deletion eng/slngen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
<IncludeInSolutionFile Condition="'$(IsNETCoreAppRef)' == 'true' and '$(MSBuildProjectName)' == 'System.Runtime.CompilerServices.Unsafe'">true</IncludeInSolutionFile>
</PropertyGroup>
<ItemGroup>
<SlnGenCustomProjectTypeGuid Include=".ilproj" ProjectTypeGuid="{F571AB99-FB84-49F4-A0DF-F27AA55F3F3F}" />
<SlnGenCustomProjectTypeGuid Include=".ilproj" ProjectTypeGuid="{9A19103F-16F7-4668-BE54-9A1E7A4F7556}" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<DefaultLanguageSourceExtension>.il</DefaultLanguageSourceExtension>
<Language>IL</Language>
<TargetRuntime>Managed</TargetRuntime>
<DefaultProjectTypeGuid Condition="'$(DefaultProjectTypeGuid)' == ''">{F571AB99-FB84-49F4-A0DF-F27AA55F3F3F}</DefaultProjectTypeGuid>
<DefaultProjectTypeGuid Condition="'$(DefaultProjectTypeGuid)' == ''">{9A19103F-16F7-4668-BE54-9A1E7A4F7556}</DefaultProjectTypeGuid>
<AppDesignerFolder Condition="'$(AppDesignerFolder)' == ''">Properties</AppDesignerFolder>
<AlwaysUseNumericalSuffixInItemNames>true</AlwaysUseNumericalSuffixInItemNames>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<configuration>
<!-- This disables restore in VS for projects that target platform specific target frameworks older than net5.0. -->
<packageRestore>
<!-- The 'automatic' key is set to True when the "Automatically check for missing packages during
build in Visual Studio" checkbox is set. Clearing the box sets this to False and disables
automatic restore. -->
<add key="automatic" value="False" />
<!-- The 'enabled' key is True when the "Allow NuGet to download missing packages" checkbox is set.
Clearing the box sets this to False, disabling command-line, automatic, and MSBuild-integrated restore. -->
<add key="enabled" value="False" />
</packageRestore>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{a32671b6-5470-4f9c-9cd8-4094b9ab0799}</ProjectGuid>
<NoVbRuntimeReference>true</NoVbRuntimeReference>
<VBRuntime>None</VBRuntime>
<OptionStrict>On</OptionStrict>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<!-- Make sure that the DebuggableAttribute is set properly. -->
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;netcoreapp2.0;netstandard1.0;net45</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<!-- Make sure that the DebuggableAttribute is set properly. -->
<DebugOptimization>IMPL</DebugOptimization>
<DebugOptimization Condition="'$(Configuration)' == 'Release'">OPT</DebugOptimization>
</PropertyGroup>
<PropertyGroup>
<CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateVersionFile</CoreCompileDependsOn>
<DocumentationFile>$(MSBuildThisFileDirectory)System.Runtime.CompilerServices.Unsafe.xml</DocumentationFile>
<ProjectGuid>{04BA3E3C-6979-4792-B19E-C797AD607F42}</ProjectGuid>
<ExtraMacros Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)' or '$(TargetFramework)' == 'netcoreapp2.0'">#define netcoreapp</ExtraMacros>
<IlasmFlags>$(IlasmFlags) -DEBUG=$(DebugOptimization)</IlasmFlags>
<TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;netcoreapp2.0;netstandard1.0;net45</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<CoreAssembly>System.Runtime</CoreAssembly>
<CoreAssembly Condition="'$(TargetFramework)' == 'netstandard2.0'">netstandard</CoreAssembly>
</PropertyGroup>
Expand Down Expand Up @@ -85,4 +82,4 @@ $(ExtraMacros)
<ILResourceReference Include="@(ResolvedMatchingContract)" />
</ItemGroup>
</Target>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<ProjectGuid>{3B7489C4-65DB-4E69-BE01-F6234133400C}</ProjectGuid>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TestStrongNameKeyId>Microsoft</TestStrongNameKeyId>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.TestModule.il" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<ProjectGuid>{6B002B34-089C-4BC4-91DD-57D350DEA91C}</ProjectGuid>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TestStrongNameKeyId>Microsoft</TestStrongNameKeyId>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.TestStructs.il" />
</ItemGroup>
</Project>
</Project>
3 changes: 1 addition & 2 deletions src/libraries/slngen.proj
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<!--
Important: This project requires to be invoked from within the VS Developer Command Prompt.
Targets that can be executed individually even though they are sequenced into build already:
- UpdateSolutionFile: Adds/updates solution files with slngen which includes dependencies.
- AddNuGetConfigToSolution: Checks if the solution needs a NuGet.config file to disable restore.
-->
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<ProjTemplatePath>$(RepositoryEngineeringDir)slngen.template.proj</ProjTemplatePath>
<NuGetConfigTemplatePath>$(RepositoryEngineeringDir)slngen.nuget.config</NuGetConfigTemplatePath>
</PropertyGroup>
Expand Down

0 comments on commit 3c1f142

Please sign in to comment.