This repository was archived by the owner on Dec 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +7
-3
lines changed
CodeGeneration.Roslyn.PluginMetapackage.Sdk/Sdk
CodeGeneration.Roslyn.Templates
CodeGeneration.Roslyn.Tool/build Expand file tree Collapse file tree 5 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 55 <!-- Announce this SDK (add *AsSdk to differentiate between using this as Sdk
66 and normal PackageReference/dependency usage)-->
77 <UsingCodeGenerationRoslynPluginMetapackageSdkAsSdk >true</UsingCodeGenerationRoslynPluginMetapackageSdkAsSdk >
8+ <!-- Prevent running Tool targets in metapackage -->
9+ <UsingCodeGenerationRoslynToolTargets >false</UsingCodeGenerationRoslynToolTargets >
810 </PropertyGroup >
911
1012 <Import Project =" ../build/CodeGeneration.Roslyn.PluginMetapackage.Sdk.props" />
Original file line number Diff line number Diff line change 1414 <PackageReference Include =" CodeGeneration.Roslyn.Tool"
1515 Version =" $(CodeGenerationRoslynPluginMetapackageSdkVersion)"
1616 IsImplicitlyDefined =" true"
17+ ExcludeAssets =" build"
1718 PrivateAssets =" none" />
1819 </ItemGroup >
1920
Original file line number Diff line number Diff line change @@ -16,5 +16,5 @@ while ($InputFile) {
1616 if ($versionSymbol ) {
1717 $versionSymbol.defaultValue = $Version
1818 }
19- New-Item $output - Value (ConvertTo-Json $json ) - Force
19+ $null = New-Item $output - Value (ConvertTo-Json $json ) - Force
2020}
Original file line number Diff line number Diff line change 66 Announce this Tool's build artifacts are being used.
77 Plugins can validate whether the Tool is available to use on this property.
88 -->
9- <UsingCodeGenerationRoslynToolTargets >true</UsingCodeGenerationRoslynToolTargets >
9+ <UsingCodeGenerationRoslynToolTargets Condition = " '$(UsingCodeGenerationRoslynToolTargets)' == '' " >true</UsingCodeGenerationRoslynToolTargets >
1010 </PropertyGroup >
1111
1212 <ItemDefinitionGroup >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<Project xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
33
4- <PropertyGroup >
4+ <PropertyGroup Condition = " '$(UsingCodeGenerationRoslynToolTargets)' != 'false' " >
55 <GenerateCodeFromAttributesDependsOn >
66 $(GenerateCodeFromAttributesDependsOn);
77 ResolveReferences;
1414
1515 <Target
1616 Name =" GenerateCodeFromAttributes"
17+ Condition =" '$(UsingCodeGenerationRoslynToolTargets)' != 'false' "
1718 DependsOnTargets =" $(GenerateCodeFromAttributesDependsOn)"
1819 BeforeTargets =" CoreCompile;PrepareResources" >
1920 </Target >
You can’t perform that action at this time.
0 commit comments