|
34 | 34 |
|
35 | 35 | <ItemGroup Condition="'$(IsPackable)' == 'true'" Label="NuGet"> |
36 | 36 | <!-- This is compatible with nugetizer and SDK pack --> |
| 37 | + <!-- Only difference is we don't copy either to output directory --> |
37 | 38 |
|
38 | 39 | <!-- Project-level icon/readme will already be part of None items --> |
39 | 40 | <None Update="@(None -> WithMetadataValue('Filename', 'icon'))" |
40 | 41 | Pack="true" PackagePath="%(Filename)%(Extension)" |
| 42 | + CopyToOutputDirectory="Never" |
41 | 43 | Condition="'$(PackageIcon)' != ''" /> |
42 | 44 |
|
43 | 45 | <None Update="@(None -> WithMetadataValue('Filename', 'readme'))" |
44 | 46 | Pack="true" PackagePath="%(Filename)%(Extension)" |
| 47 | + CopyToOutputDirectory="Never" |
45 | 48 | Condition="'$(PackReadme)' != 'false' and '$(PackageReadmeFile)' != ''" /> |
46 | 49 |
|
47 | 50 | <!-- src-level will need explicit inclusion --> |
48 | 51 | <None Include="$(MSBuildThisFileDirectory)icon.png" Link="icon.png" Visible="false" |
49 | 52 | Pack="true" PackagePath="%(Filename)%(Extension)" |
| 53 | + CopyToOutputDirectory="Never" |
50 | 54 | Condition="Exists('$(MSBuildThisFileDirectory)icon.png') and !Exists('$(MSBuildProjectDirectory)\icon.png')" /> |
51 | 55 |
|
52 | 56 | <None Include="$(MSBuildThisFileDirectory)readme.md" Link="readme.md" |
53 | 57 | Pack="true" PackagePath="%(Filename)%(Extension)" |
| 58 | + CopyToOutputDirectory="Never" |
54 | 59 | Condition="'$(PackReadme)' != 'false' and Exists('$(MSBuildThisFileDirectory)readme.md') and !Exists('$(MSBuildProjectDirectory)\readme.md')" /> |
55 | 60 | </ItemGroup> |
56 | 61 |
|
|
101 | 106 | <RepositoryBranch Condition="'$(RepositoryBranch)' == '' and '$(BUDDY_EXECUTION_BRANCH)' != ''">$(BUDDY_EXECUTION_BRANCH)</RepositoryBranch> |
102 | 107 | </PropertyGroup> |
103 | 108 |
|
104 | | - <PropertyGroup Condition="'$(EnableRexCodeGenerator)' == 'true'"> |
105 | | - <!-- VSCode/Razor compatibility --> |
106 | | - <CoreCompileDependsOn>PrepareResources;$(CoreCompileDependsOn)</CoreCompileDependsOn> |
| 109 | + <PropertyGroup> |
| 110 | + <!-- Default to Just Works resources generation. See https://www.cazzulino.com/resources.html --> |
| 111 | + <CoreCompileDependsOn>CoreResGen;$(CoreCompileDependsOn)</CoreCompileDependsOn> |
107 | 112 | </PropertyGroup> |
108 | | - |
| 113 | + |
109 | 114 | <ItemGroup> |
110 | 115 | <!-- Consider the project out of date if any of these files changes --> |
111 | 116 | <UpToDateCheck Include="@(None);@(Content);@(EmbeddedResource)" /> |
112 | | - <!-- We'll typically use ThisAssembly.Strings instead of the built-in resource manager codegen --> |
113 | | - <EmbeddedResource Update="@(EmbeddedResource)" Generator="" Condition="'$(EnableRexCodeGenerator)' != 'true'" /> |
114 | | - <EmbeddedResource Update="@(EmbeddedResource)" Condition="'$(EnableRexCodeGenerator)' == 'true'"> |
| 117 | + <!-- Opt-in to typed resource generation by setting custom tool to MSBuild:Compile --> |
| 118 | + <EmbeddedResource Update="@(EmbeddedResource -> WithMetadataValue('Generator', 'MSBuild:Compile'))" Type="Resx"> |
115 | 119 | <!-- Default to Just Works resources generation. See https://www.cazzulino.com/resources.html --> |
116 | | - <Generator>MSBuild:Compile</Generator> |
117 | 120 | <StronglyTypedFileName>$(IntermediateOutputPath)\$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.'))%(Filename).g$(DefaultLanguageSourceExtension)</StronglyTypedFileName> |
118 | 121 | <StronglyTypedLanguage>$(Language)</StronglyTypedLanguage> |
119 | 122 | <StronglyTypedNamespace Condition="'%(RelativeDir)' == ''">$(RootNamespace)</StronglyTypedNamespace> |
|
0 commit comments