Skip to content

Commit 27eb792

Browse files
Source Generator for XamlG and CssG (#1006)
* [X] Replace XamlG with source Generator C# HotReload do not support c# files generated through tasks. So we're moving the XamlG capability to a C# Source Generator * package the generator * add the dependencies * CssG is gone * exclude wwwroot
1 parent 817d68b commit 27eb792

28 files changed

+1522
-2401
lines changed

.nuspec/Microsoft.Maui.Controls.DefaultItems.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

33
<ItemGroup Condition="'$(EnableDefaultItems)'=='True' And '$(EnableDefaultXamlItems)'=='True' And '$(EnableDefaultEmbeddedResourceItems)'=='True'">
4-
<EmbeddedResource Include="**\*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" SubType="Designer" Generator="MSBuild:UpdateDesignTimeXaml" />
4+
<MauiXaml Include="**\*.xaml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)"/>
55
</ItemGroup>
66

77
<ItemGroup Condition="'$(EnableDefaultItems)'=='True' And '$(EnableDefaultCssItems)'=='True' And '$(EnableDefaultEmbeddedResourceItems)'=='True'">
8-
<EmbeddedResource Include="**\*.css" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
8+
<MauiCss Include="**\*.css" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" />
99
</ItemGroup>
1010

1111
<Import Project="Microsoft.Maui.Controls.SingleProject.props" />

.nuspec/Microsoft.Maui.Controls.DefaultItems.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<Compile Update="**\*.xaml$(DefaultLanguageSourceExtension)" DependentUpon="%(Filename)" SubType="Code" />
1212
<None Remove="**\*.xaml" Condition="'$(EnableDefaultNoneItems)'=='True'" />
1313
</ItemGroup>
14+
1415
<ItemGroup Condition="'$(EnableDefaultItems)'=='True' And '$(EnableDefaultCssItems)'=='True' And '$(EnableDefaultEmbeddedResourceItems)'=='True'">
1516
<None Remove="**\*.css" Condition="'$(EnableDefaultNoneItems)'=='True'" />
1617
</ItemGroup>

.nuspec/Microsoft.Maui.Controls.props

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
32

43
<!--
@@ -16,4 +15,12 @@
1615
<_IsHotRestartDefined>$([System.Text.RegularExpressions.Regex]::IsMatch('$(DefineConstants.Trim())', '(^|;)HOTRESTART($|;)'))</_IsHotRestartDefined>
1716
<DefineConstants Condition="!$(_IsHotRestartDefined) And '$(IsHotRestartBuild)' == 'true'">HOTRESTART;$(DefineConstants)</DefineConstants>
1817
</PropertyGroup>
18+
19+
<ItemGroup>
20+
<CompilerVisibleItemMetadata Include="AdditionalFiles" MetadataName="GenKind" />
21+
<CompilerVisibleItemMetadata Include="AdditionalFiles" MetadataName="ManifestResourceName" />
22+
<CompilerVisibleItemMetadata Include="AdditionalFiles" MetadataName="TargetPath" />
23+
<CompilerVisibleItemMetadata Include="AdditionalFiles" MetadataName="ItemSpec" />
24+
</ItemGroup>
25+
1926
</Project>

.nuspec/Microsoft.Maui.Controls.targets

Lines changed: 58 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

3-
<UsingTask TaskName="Microsoft.Maui.Controls.Build.Tasks.XamlGTask" AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.Build.Tasks.dll" />
4-
<UsingTask TaskName="Microsoft.Maui.Controls.Build.Tasks.CssGTask" AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.Build.Tasks.dll" />
53
<UsingTask TaskName="Microsoft.Maui.Controls.Build.Tasks.XamlCTask" AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Maui.Controls.Build.Tasks.dll" />
64

75
<PropertyGroup>
86
<SynthesizeLinkMetadata>true</SynthesizeLinkMetadata>
97
<EnableDefaultXamlItems Condition="'$(EnableDefaultXamlItems)'==''">True</EnableDefaultXamlItems>
10-
<_DefaultXamlItemsEnabled>False</_DefaultXamlItemsEnabled>
118
<EnableDefaultCssItems Condition="'$(EnableDefaultCssItems)'==''">True</EnableDefaultCssItems>
12-
<_DefaultCssItemsEnabled>False</_DefaultCssItemsEnabled>
139
<!-- The WINUI check for this only runs when there is an empty string so I just convert false to an empty string to fall in line with our other properties -->
1410
<SkipMicrosoftUIXamlCheckTargetPlatformVersion Condition="'$(SkipMicrosoftUIXamlCheckTargetPlatformVersion)'==''">true</SkipMicrosoftUIXamlCheckTargetPlatformVersion>
1511
<SkipMicrosoftUIXamlCheckTargetPlatformVersion Condition="'$(SkipMicrosoftUIXamlCheckTargetPlatformVersion)'=='false'"></SkipMicrosoftUIXamlCheckTargetPlatformVersion>
@@ -19,6 +15,8 @@
1915

2016
<ItemGroup>
2117
<ProjectCapability Include="Maui" Condition="'$(_ExcludeMauiProjectCapability)' != 'true'" />
18+
<AvailableItemName Include="MauiXaml" />
19+
<AvailableItemName Include="MauiCss" />
2220
</ItemGroup>
2321

2422
<!-- Check Tasks ABI and other validations -->
@@ -48,50 +46,64 @@
4846
Text="Microsoft.Maui requires .NETFramework >= v4.6.1. You have '$(TargetFrameworkVersion)'" />
4947
</Target>
5048

51-
<!-- XamlG -->
52-
<Target
53-
Name="UpdateDesignTimeXaml"
54-
DependsOnTargets="XamlG"/>
5549

56-
<PropertyGroup>
57-
<CoreCompileDependsOn>
58-
XamlG;
59-
$(CoreCompileDependsOn);
60-
</CoreCompileDependsOn>
61-
</PropertyGroup>
50+
<!-- Inject MauiXaml and MauiCss as AdditionalFiles for partial type generation-->
51+
<Target Name="_MauiInjectXamlCssAdditionalFiles"
52+
BeforeTargets="GenerateMSBuildEditorConfigFileShouldRun"
53+
DependsOnTargets="$(CreateManifestResourceNamesDependsOn)">
54+
<ItemGroup>
55+
<_MauiXamlWithResourceNames Remove="@(_MauiXamlWithResourceNames)" />
56+
<_MauiXamlWithTargetPath Remove="@(_MauiXamlWithTargetPath)" />
57+
<_MauiCssWithResourceNames Remove="@(_MauiCssWithResourceNames)" />
58+
<_MauiCssWithTargetPath Remove="@(_MauiCssWithTargetPath)" />
59+
</ItemGroup>
60+
61+
<CreateCSharpManifestResourceName
62+
ResourceFiles="@(MauiXaml)"
63+
RootNamespace="$(RootNamespace)"
64+
UseDependentUponConvention="$(EmbeddedResourceUseDependentUponConvention)">
65+
<Output TaskParameter="ResourceFilesWithManifestResourceNames" ItemName="_MauiXamlWithResourceNames" />
66+
</CreateCSharpManifestResourceName>
67+
68+
<CreateCSharpManifestResourceName
69+
ResourceFiles="@(MauiCss)"
70+
RootNamespace="$(RootNamespace)"
71+
UseDependentUponConvention="$(EmbeddedResourceUseDependentUponConvention)">
72+
<Output TaskParameter="ResourceFilesWithManifestResourceNames" ItemName="_MauiCssWithResourceNames" />
73+
</CreateCSharpManifestResourceName>
74+
75+
<AssignTargetPath Files="@(_MauiXamlWithResourceNames)" RootFolder="$(MSBuildProjectDirectory)">
76+
<Output TaskParameter="AssignedFiles" ItemName="_MauiXamlWithTargetPath" />
77+
</AssignTargetPath>
78+
79+
<AssignTargetPath Files="@(_MauiCssWithResourceNames)" RootFolder="$(MSBuildProjectDirectory)">
80+
<Output TaskParameter="AssignedFiles" ItemName="_MauiCssWithTargetPath" />
81+
</AssignTargetPath>
82+
83+
<ItemGroup>
84+
<AdditionalFiles Include="@(_MauiXamlWithTargetPath)" ManifestResourceName="%(ManifestResourceName)" TargetPath="%(TargetPath)" ItemSpec="%(OriginalItemSpec)" GenKind="Xaml"/>
85+
<AdditionalFiles Include="@(_MauiCssWithTargetPath)" ManifestResourceName="%(ManifestResourceName)" TargetPath="%(TargetPath)" ItemSpec="%(OriginalItemSpec)" GenKind="Css"/>
86+
<_MauiXamlWithResourceNames Remove="@(_MauiXamlWithResourceNames)" />
87+
<_MauiXamlWithTargetPath Remove="@(_MauiXamlWithTargetPath)" />
88+
<_MauiCssWithResourceNames Remove="@(_MauiCssWithResourceNames)" />
89+
<_MauiCssWithTargetPath Remove="@(_MauiCssWithTargetPath)" />
90+
</ItemGroup>
91+
</Target>
6292

63-
<Target
64-
Name="_FindXamlGFiles"
65-
DependsOnTargets="PrepareResourceNames">
66-
<ItemGroup>
67-
<_XamlGInputs
68-
Include="@(EmbeddedResource)"
69-
Condition="'%(Extension)' == '.xaml' AND '$(DefaultLanguageSourceExtension)' == '.cs' AND '%(TargetPath)' != ''" />
70-
<_XamlGOutputs
71-
Include="@(_XamlGInputs->'$(IntermediateOutputPath)%(TargetPath).g.cs')" />
72-
</ItemGroup>
73-
</Target>
7493

75-
<Target
76-
Name="XamlG"
77-
BeforeTargets="BeforeCompile"
78-
DependsOnTargets="_FindXamlGFiles; PrepareResourceNames; AfterResolveReferences"
79-
Inputs="@(_XamlGInputs)"
80-
Outputs="@(_XamlGOutputs)">
81-
<PropertyGroup>
82-
<ReferencedAssemblies>@(ReferencePath)</ReferencedAssemblies>
83-
</PropertyGroup>
84-
<XamlGTask
85-
XamlFiles="@(_XamlGInputs)"
86-
OutputFiles="@(_XamlGOutputs)"
87-
Language="$(Language)"
88-
References = "$(ReferencedAssemblies)"
89-
AssemblyName="$(AssemblyName)" />
90-
<ItemGroup>
91-
<FileWrites Include="@(_XamlGOutputs)" />
92-
<Compile Include="@(_XamlGOutputs)" />
93-
</ItemGroup>
94-
</Target>
94+
<!-- re-add MauiXaml and MauiCss as EmbeddedResources -->
95+
<PropertyGroup>
96+
<PrepareResourcesDependsOn>
97+
_MauiAddXamlEmbeddedResources;
98+
$(PrepareResourcesDependsOn);
99+
</PrepareResourcesDependsOn>
100+
</PropertyGroup>
101+
<Target Name="_MauiAddXamlEmbeddedResources">
102+
<ItemGroup>
103+
<EmbeddedResource Include="@(MauiXaml)" />
104+
<EmbeddedResource Include="@(MauiCss)" />
105+
</ItemGroup>
106+
</Target>
95107

96108
<!-- XamlC -->
97109
<PropertyGroup>
@@ -103,10 +115,9 @@
103115

104116
<Target Name="XamlC"
105117
AfterTargets="AfterCompile"
106-
DependsOnTargets="_FindXamlGFiles"
107118
Inputs="$(IntermediateOutputPath)$(TargetFileName)"
108119
Outputs="$(IntermediateOutputPath)XamlC.stamp"
109-
Condition=" '$(DesignTimeBuild)' != 'True' AND '@(_XamlGInputs->Count())' != '0' ">
120+
Condition=" '$(DesignTimeBuild)' != 'True' AND '@(MauiXaml)' != ''">
110121
<PropertyGroup>
111122
<_MauiXamlCValidateOnly>$(MauiXamlCValidateOnly)</_MauiXamlCValidateOnly>
112123
<_MauiXamlCValidateOnly Condition="'$(BuildingForLiveUnitTesting)' == 'True' ">True</_MauiXamlCValidateOnly>
@@ -124,33 +135,6 @@
124135
<FileWrites Include="$(IntermediateOutputPath)XamlC.stamp" />
125136
</ItemGroup>
126137
</Target>
127-
128-
<!-- CssG -->
129-
<PropertyGroup>
130-
<CoreCompileDependsOn>
131-
CssG;
132-
$(CoreCompileDependsOn);
133-
</CoreCompileDependsOn>
134-
</PropertyGroup>
135-
136-
<Target Name="_FindCSSFiles" DependsOnTargets="PrepareResourceNames">
137-
<ItemGroup>
138-
<_CSSInputs Include="@(EmbeddedResource)" Condition="'%(Extension)' == '.css' AND '$(DefaultLanguageSourceExtension)' == '.cs' AND '%(TargetPath)' != ''" />
139-
<_CSSOutputs Include="@(_CSSInputs->'$(IntermediateOutputPath)%(TargetPath).g.cs')" />
140-
</ItemGroup>
141-
</Target>
142-
143-
<Target Name="CssG" BeforeTargets="BeforeCompile" DependsOnTargets="_FindCSSFiles" Inputs="@(_CSSInputs)" Outputs="@(_CSSOutputs)">
144-
<CssGTask
145-
CSSFiles="@(_CSSInputs)"
146-
OutputFiles="@(_CSSOutputs)"
147-
Language = "$(Language)"
148-
AssemblyName = "$(AssemblyName)" />
149-
<ItemGroup>
150-
<FileWrites Include="@(_CSSOutputs)" />
151-
<Compile Include="@(_CSSOutputs)" />
152-
</ItemGroup>
153-
</Target>
154138

155139
<!--
156140
Platform Specific Targets.

Microsoft.Maui-net6.sln

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Core.Design-net6",
7272
EndProject
7373
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Xaml.Design-net6", "src\Controls\src\Xaml.Design\Controls.Xaml.Design-net6.csproj", "{F9AEE4C0-9E67-4B87-932E-26EDF0FC932A}"
7474
EndProject
75-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MauiRazorClassLibrarySample", "src\BlazorWebView\samples\MauiRazorClassLibrarySample\MauiRazorClassLibrarySample.csproj", "{4515DAA4-9801-401D-A7A0-38D019B3B19F}"
75+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiRazorClassLibrarySample", "src\BlazorWebView\samples\MauiRazorClassLibrarySample\MauiRazorClassLibrarySample.csproj", "{4515DAA4-9801-401D-A7A0-38D019B3B19F}"
76+
EndProject
77+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.SourceGen-net6", "src\Controls\src\SourceGen\Controls.SourceGen-net6.csproj", "{22C17254-2CB4-4AE7-A558-E3208E1D19D3}"
7678
EndProject
7779
Global
7880
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -167,6 +169,10 @@ Global
167169
{4515DAA4-9801-401D-A7A0-38D019B3B19F}.Debug|Any CPU.Build.0 = Debug|Any CPU
168170
{4515DAA4-9801-401D-A7A0-38D019B3B19F}.Release|Any CPU.ActiveCfg = Release|Any CPU
169171
{4515DAA4-9801-401D-A7A0-38D019B3B19F}.Release|Any CPU.Build.0 = Release|Any CPU
172+
{22C17254-2CB4-4AE7-A558-E3208E1D19D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
173+
{22C17254-2CB4-4AE7-A558-E3208E1D19D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
174+
{22C17254-2CB4-4AE7-A558-E3208E1D19D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
175+
{22C17254-2CB4-4AE7-A558-E3208E1D19D3}.Release|Any CPU.Build.0 = Release|Any CPU
170176
EndGlobalSection
171177
GlobalSection(SolutionProperties) = preSolution
172178
HideSolutionNode = FALSE
@@ -196,6 +202,7 @@ Global
196202
{F2A419ED-B18E-4075-9969-536C2EC67F82} = {50C758FE-4E10-409A-94F5-A75480960864}
197203
{F9AEE4C0-9E67-4B87-932E-26EDF0FC932A} = {50C758FE-4E10-409A-94F5-A75480960864}
198204
{4515DAA4-9801-401D-A7A0-38D019B3B19F} = {1614D1A4-5C3D-4D5B-8C89-426E37A564EF}
205+
{22C17254-2CB4-4AE7-A558-E3208E1D19D3} = {50C758FE-4E10-409A-94F5-A75480960864}
199206
EndGlobalSection
200207
GlobalSection(ExtensibilityGlobals) = postSolution
201208
SolutionGuid = {0B8ABEAD-D2B5-4370-A187-62B5ABE4EE50}

Microsoft.Maui.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Compatibility.ControlGaller
132132
EndProject
133133
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Compatibility", "src\Compatibility\Core\src\Compatibility.csproj", "{9FAA9654-80E6-4664-9702-47998A04E8FE}"
134134
EndProject
135+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.SourceGen", "src\Controls\src\SourceGen\Controls.SourceGen.csproj", "{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}"
136+
EndProject
135137
Global
136138
GlobalSection(SharedMSBuildProjectFiles) = preSolution
137139
src\Compatibility\ControlGallery\src\Issues.Shared\Compatibility.ControlGallery.Issues.Shared.projitems*{ae2513cb-4e5e-4e5c-8237-88954d4c9433}*SharedItemsImports = 13
@@ -1121,6 +1123,34 @@ Global
11211123
{9FAA9654-80E6-4664-9702-47998A04E8FE}.Release|x64.Build.0 = Release|Any CPU
11221124
{9FAA9654-80E6-4664-9702-47998A04E8FE}.Release|x86.ActiveCfg = Release|Any CPU
11231125
{9FAA9654-80E6-4664-9702-47998A04E8FE}.Release|x86.Build.0 = Release|Any CPU
1126+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1127+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
1128+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|ARM.ActiveCfg = Debug|Any CPU
1129+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|ARM.Build.0 = Debug|Any CPU
1130+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|ARM64.ActiveCfg = Debug|Any CPU
1131+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|ARM64.Build.0 = Debug|Any CPU
1132+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
1133+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|iPhone.Build.0 = Debug|Any CPU
1134+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
1135+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
1136+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|x64.ActiveCfg = Debug|Any CPU
1137+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|x64.Build.0 = Debug|Any CPU
1138+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|x86.ActiveCfg = Debug|Any CPU
1139+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Debug|x86.Build.0 = Debug|Any CPU
1140+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
1141+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|Any CPU.Build.0 = Release|Any CPU
1142+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|ARM.ActiveCfg = Release|Any CPU
1143+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|ARM.Build.0 = Release|Any CPU
1144+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|ARM64.ActiveCfg = Release|Any CPU
1145+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|ARM64.Build.0 = Release|Any CPU
1146+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|iPhone.ActiveCfg = Release|Any CPU
1147+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|iPhone.Build.0 = Release|Any CPU
1148+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
1149+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
1150+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|x64.ActiveCfg = Release|Any CPU
1151+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|x64.Build.0 = Release|Any CPU
1152+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|x86.ActiveCfg = Release|Any CPU
1153+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD}.Release|x86.Build.0 = Release|Any CPU
11241154
EndGlobalSection
11251155
GlobalSection(SolutionProperties) = preSolution
11261156
HideSolutionNode = FALSE
@@ -1173,6 +1203,7 @@ Global
11731203
{AE2513CB-4E5E-4E5C-8237-88954D4C9433} = {75A2CD30-BB85-4CA6-AC95-86A8A538A690}
11741204
{B5F94CCB-5868-43BD-89B5-B66C97C3A741} = {75A2CD30-BB85-4CA6-AC95-86A8A538A690}
11751205
{9FAA9654-80E6-4664-9702-47998A04E8FE} = {29AC50BF-B4FB-450B-9386-0C5AD4B84226}
1206+
{061EC251-FB7A-43B2-A6AD-065D2CCEF1BD} = {D5B986A3-7FC9-437E-8030-349AA4698DFD}
11761207
EndGlobalSection
11771208
GlobalSection(ExtensibilityGlobals) = postSolution
11781209
SolutionGuid = {650AE971-2F29-46A8-822C-FB4FCDC6A9A0}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<Project>
22
<Import Project="..\..\..\..\..\.nuspec\Microsoft.Maui.Controls.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true' AND Exists('$(_MauiBuildTasksLocation)Microsoft.Maui.Controls.Build.Tasks.dll')" />
33
<Import Project="..\..\..\..\..\.nuspec\Microsoft.Maui.Controls.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true'" />
4+
5+
<ItemGroup Condition="$(TargetFramework.Contains('net6')) != 'true'">
6+
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\..\..\..\..\src\Controls\src\SourceGen\Controls.SourceGen.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
7+
</ItemGroup>
8+
<ItemGroup Condition="$(TargetFramework.Contains('net6')) == 'true'">
9+
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\..\..\..\..\src\Controls\src\SourceGen\Controls.SourceGen-net6.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
10+
</ItemGroup>
411
</Project>

0 commit comments

Comments
 (0)