Skip to content

Commit a6a2d7b

Browse files
author
Kapil Borle
committed
Compile resource file
The workaround is to create a new .cs file that depends on strings.rex. For now we will have to manually edit/generate the file whenever we change strings.resx. For FullCLR though, it will autogenerate.
1 parent 6b5d945 commit a6a2d7b

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

Engine/ScriptAnalyzerEngine.csproj

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,17 @@
5151
<ErrorReport>prompt</ErrorReport>
5252
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
5353
</PropertyGroup>
54-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'CoreCLR Debug|AnyCPU'">
54+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'CoreCLR Debug|AnyCPU'">
5555
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
56-
<TargetFrameworkVersion>v0.1</TargetFrameworkVersion>
5756
<DebugSymbols>true</DebugSymbols>
5857
<OutputPath>bin\CoreCLR Debug\</OutputPath>
5958
<DefineConstants>TRACE;DEBUG;CORECLR</DefineConstants>
6059
<DebugType>full</DebugType>
6160
<PlatformTarget>AnyCPU</PlatformTarget>
6261
<ErrorReport>prompt</ErrorReport>
6362
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
63+
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
64+
<TargetFrameworkVersion>v0.1</TargetFrameworkVersion>
6465
</PropertyGroup>
6566
<Choose>
6667
<When Condition="'$(Configuration)|$(Platform)' != 'CoreCLR Debug|AnyCPU'">
@@ -106,10 +107,13 @@
106107
<Compile Include="Helper.cs" />
107108
<Compile Include="IOutputWriter.cs" />
108109
<Compile Include="Loggers\WriteObjectsLogger.cs" />
109-
<Compile Include="SafeDirectoryCatalog.cs" Condition="'$(Configuration)|$(Platform)' != 'CoreCLR Debug|AnyCPU'"/>
110+
<Compile Include="SafeDirectoryCatalog.cs" Condition="'$(Configuration)|$(Platform)' != 'CoreCLR Debug|AnyCPU'" />
110111
<Compile Include="ScriptAnalyzer.cs" />
111112
<Compile Include="SpecialVars.cs" />
112-
<Compile Include="Strings.Designer.cs">
113+
<Compile Include="Strings.Designer.Core.cs" Condition="'$(Configuration)|$(Platform)' == 'CoreCLR Debug|AnyCPU'">
114+
<DependentUpon>Strings.resx</DependentUpon>
115+
</Compile>
116+
<Compile Include="Strings.Designer.cs" Condition="'$(Configuration)|$(Platform)' != 'CoreCLR Debug|AnyCPU'">
113117
<AutoGen>True</AutoGen>
114118
<DesignTime>True</DesignTime>
115119
<DependentUpon>Strings.resx</DependentUpon>
@@ -130,12 +134,18 @@
130134
</ItemGroup>
131135
<ItemGroup>
132136
<EmbeddedResource Include="Strings.resx">
133-
<Generator>ResXFileCodeGenerator</Generator>
137+
<Generator Condition="'$(Configuration)|$(Platform)' != 'CoreCLR Debug|AnyCPU'">ResXFileCodeGenerator</Generator>
134138
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
139+
<SubType>Designer</SubType>
135140
</EmbeddedResource>
141+
<!--<EmbeddedResource Include="Strings.resx">
142+
<Generator>ResXFileCodeGenerator</Generator>
143+
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
144+
<SubType>Designer</SubType>
145+
</EmbeddedResource>-->
136146
</ItemGroup>
137-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" Condition="'$(Configuration)|$(Platform)' != 'CoreCLR Debug|AnyCPU'"/>
138-
<Import Project="$(SolutionDir)\Microsoft.CoreSys.CSHARP.Targets" Condition="'$(Configuration)|$(Platform)' == 'CoreCLR Debug|AnyCPU'"/>
147+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" Condition="'$(Configuration)|$(Platform)' != 'CoreCLR Debug|AnyCPU'" />
148+
<Import Project="$(SolutionDir)\Microsoft.CoreSys.CSHARP.Targets" Condition="'$(Configuration)|$(Platform)' == 'CoreCLR Debug|AnyCPU'" />
139149
<ProjectExtensions>
140150
<VisualStudio AllowExistingFolder="true" />
141151
</ProjectExtensions>

0 commit comments

Comments
 (0)