1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 17:44:48 +09:00

Corefx Windows build on .NET Core MSBuild (dotnet/corefx#30675)

* Corefx Windows build on .NET Core MSBuild

Note:  Need to move to the 3.0 SDK because the DiaSymReader.Native shipped in .NET Core's shared framework is out of date.  See https://github.com/dotnet/core-setup/issues/4291.

* Workaround .NET Core MSBuild bug.

MSBuild on .NET Core doesn't support non-string resources. However, the ResourceManager tests need to test this scenario. Using the .NET Framework's resgen.exe during the build until the MSBuild bug is fixed.

* Update BuildTools to 2.2.0-preview1-02928-01


Commit migrated from 50ba6a21d8
This commit is contained in:
Eric Erhardt 2018-06-28 17:32:38 -05:00 committed by GitHub
parent 7955437fe6
commit ce62cc1df7
4 changed files with 31 additions and 11 deletions

View file

@ -1 +1 @@
2.1.301
3.0.100-preview1-009019

View file

@ -151,7 +151,7 @@ if "%__BuildArch%" == "arm64" (
set __msbuildArgs=/p:Platform=%__BuildArch% /p:PlatformToolset="%__PlatformToolset%"
)
call %__rootDir%/run.cmd build-managed -project="%__IntermediatesDir%\install.vcxproj" -- /t:rebuild /p:Configuration=%CMAKE_BUILD_TYPE% %__msbuildArgs%
call msbuild "%__IntermediatesDir%\install.vcxproj" /t:rebuild /p:Configuration=%CMAKE_BUILD_TYPE% %__msbuildArgs%
IF ERRORLEVEL 1 (
goto :Failure
)
@ -174,7 +174,7 @@ popd
if not exist "%__IntermediatesDir%\install.vcxproj" goto :Failure
call %__rootDir%/run.cmd build-managed -project="%__IntermediatesDir%\install.vcxproj" -- /t:rebuild /p:Configuration=%CMAKE_BUILD_TYPE% %__msbuildArgs%
call msbuild "%__IntermediatesDir%\install.vcxproj" /t:rebuild /p:Configuration=%CMAKE_BUILD_TYPE% %__msbuildArgs%
IF ERRORLEVEL 1 (
goto :Failure
)

View file

@ -19,21 +19,41 @@
<Compile Include="SatelliteContractVersionAttributeTests.cs" />
<Compile Include="MissingSatelliteAssemblyException.cs" />
<Compile Include="ResourceSetTests.cs" />
<EmbeddedResource Include="Resources\TestResx.netstandard17.resx">
<_WorkaroundCoreMSBuildResource Include="Resources\TestResx.netstandard17.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>TestResx.netstandard17.Designer.cs</LastGenOutput>
</EmbeddedResource>
</_WorkaroundCoreMSBuildResource>
<Compile Include="Resources\TestResx.netstandard17.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>TestResx.netstandard17.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\TestResx.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>TestResx.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<!--
MSBuild on .NET Core doesn't support non-string resources.
See https://github.com/Microsoft/msbuild/issues/1352 and https://github.com/Microsoft/msbuild/issues/2221
Workaround this for now by invoking the desktop resgen.exe on Windows.
-->
<Target Name="WorkaroundCoreMSBuildResources"
BeforeTargets="PrepareResources"
Condition="'$(OS)' == 'Windows_NT'">
<PropertyGroup>
<_ResourceRelativeDir>%(_WorkaroundCoreMSBuildResource.RelativeDir)</_ResourceRelativeDir>
<_ResourceRelativeDir>$(_ResourceRelativeDir.TrimEnd('\'))</_ResourceRelativeDir>
<_ResourceOutputName>$(IntermediateOutputPath)$(RootNamespace).$(_ResourceRelativeDir).%(_WorkaroundCoreMSBuildResource.FileName).resources</_ResourceOutputName>
</PropertyGroup>
<Exec Command="resgen.exe %(_WorkaroundCoreMSBuildResource.Identity) $(_ResourceOutputName)" />
<ItemGroup>
<EmbeddedResource Include="$(_ResourceOutputName)"
WithCulture="false"
Type="Non-Resx" />
</ItemGroup>
</Target>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View file

@ -646,12 +646,12 @@
"msbuild": {
"osSpecific": {
"windows": {
"defaultParameters": "/nologo /verbosity:minimal /clp:Summary /maxcpucount /nodeReuse:false /l:BinClashLogger,Tools\\net46\\Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log",
"path": "Tools/msbuild.cmd"
"defaultParameters": "msbuild /nologo /verbosity:minimal /clp:Summary /maxcpucount /nodeReuse:false /l:BinClashLogger,Tools\\Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log",
"path": "Tools/dotnetcli/dotnet"
},
"unix": {
"defaultParameters": "/nologo /verbosity:minimal /clp:Summary /maxcpucount /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log",
"path": "Tools/msbuild.sh"
"defaultParameters": "msbuild /nologo /verbosity:minimal /clp:Summary /maxcpucount /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log",
"path": "Tools/dotnetcli/dotnet"
}
},
"valueTypes": {