File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 18
18
<!-- When the property is not set (which will not happen when creating a NuGet package anyway), just default to 4.0.1 -->
19
19
<MvvmToolkitSourceGeneratorRoslynVersion Condition =" '$(MvvmToolkitSourceGeneratorRoslynVersion)' == ''" >4.0.1</MvvmToolkitSourceGeneratorRoslynVersion >
20
20
21
- <!-- The output path will end up being eg. "bin\Debug\roslyn4.0\netstandard2.0" (the trailing "netstandard2.0" is added automatically) -->
22
- <OutputPath >bin\$(Configuration)\roslyn$(MvvmToolkitSourceGeneratorRoslynVersion.Substring(0, 3))\</OutputPath >
21
+ <!--
22
+ The output path will end up being eg. "bin\Debug\roslyn4.0\netstandard2.0" (the trailing "netstandard2.0" is added automatically).
23
+ This is only set when $(MvvmToolkitIsGeneratingNuGetPackage) is set (when packing CommunityToolkit.Mvvm). This avoids unit test issues.
24
+ -->
25
+ <OutputPath Condition =" '$(MvvmToolkitIsGeneratingNuGetPackage)' == 'true'" >bin\$(Configuration)\roslyn$(MvvmToolkitSourceGeneratorRoslynVersion.Substring(0, 3))\</OutputPath >
23
26
24
27
<!-- Also define a "ROSLYN_<MAJOR>_<MINOR>" build constant, so the generator code can multi-target whenever needed and add any required polyfills -->
25
28
<DefineConstants >$(DefineConstants);ROSLYN_$(MvvmToolkitSourceGeneratorRoslynVersion.Substring(0, 3).Replace('.', '_'))</DefineConstants >
Original file line number Diff line number Diff line change 43
43
<!-- Reference the various multi-targeted versions of the source generator project (one per Roslyn version) -->
44
44
<ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
45
45
<ProjectReference Include =" ..\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.csproj" ReferenceOutputAssembly =" false" >
46
- <Properties >MvvmToolkitSourceGeneratorRoslynVersion=4.0.1</Properties >
46
+ <Properties >MvvmToolkitSourceGeneratorRoslynVersion=4.0.1;MvvmToolkitIsGeneratingNuGetPackage=true </Properties >
47
47
</ProjectReference >
48
48
<ProjectReference Include =" ..\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.csproj" ReferenceOutputAssembly =" false" >
49
- <Properties >MvvmToolkitSourceGeneratorRoslynVersion=4.3.0</Properties >
49
+ <Properties >MvvmToolkitSourceGeneratorRoslynVersion=4.3.0;MvvmToolkitIsGeneratingNuGetPackage=true </Properties >
50
50
</ProjectReference >
51
51
</ItemGroup >
52
52
You can’t perform that action at this time.
0 commit comments